Wrap up the PDF backend for production: Strapi data import, lookup data and admin tasks
I maintainer di solito rispondono entro 1 giorno
@kusssal ci sta già lavorando.
Dal 7/10/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
What
govtool/govtool-pdf-backend already serves every call pdf-ui makes. Before it can replace the Strapi backend in production, three things are still missing: the existing Strapi data has to be moved across, the lookup tables need the full production lists, and the admin tasks that were done in the Strapi admin panel need a replacement.
Part of #4253. Target: Friday 2026-10-09.
Data import from Strapi
- Write a one-off importer from the Strapi database into the new Prisma schema
- Check whether the source data uses the Strapi 4 or Strapi 5 layout and handle it
- Users: lowercase
username(wallet reward address) and merge case duplicates, so existing users keep their account at first login; carry overgovtool_username,is_validatedandblocked - Proposals: contents (including constitution and hard-fork content), links, likes, polls and poll votes, comments with replies
- Keep
submitted/submission_tx_hashon proposal contents, so governance action pages still link to their discussion - Budget proposals: every version of each
master_idchain with all sections, BD polls and DRep votes,submitted_for_vote, and BD drafts - Keep user, proposal and budget-proposal ids so existing
/proposal_discussion/<id>and/budget_discussion/<id>links keep working, thensetvalthe sequences - Map lookup and governance action type ids by name, including "Hard fork" and any type added through the admin panel
- Remove duplicate likes, comment reports and DRep votes (the new schema enforces uniqueness), and drop orphan rows and blank links
- Recompute every counter (comments, likes and dislikes, poll results) instead of copying them
- Check every
bdsrow hasmaster_idbefore droppingold_ver, and list what is not carried over (proposal_submitions, committee-content,wallet_types) - Dry-run on a copy of the data and compare row counts per table
Lookup data
- Stop
src/start.tsfrom re-seeding lookups on every start.src/seed/seed-lookups.tsupserts by fixed id and resets names on each restart, which would relabel imported data. Seed only empty tables, or move seeding to a separate command. - Load the full lists (countries, currencies, BD types, road maps, committees, contract types, governance action types) instead of the dev seed in
src/seed/lookups.data.ts(10 countries, 5 currencies)
Admin tasks without the Strapi admin panel
Provide an admin script or command, with a short how-to, for:
- Marking a budget proposal as submitted for vote (
bds.submitted_for_vote) - Closing a BD poll at the end of the voting window (
bd_polls.is_active) - Setting the verified badge (
users.is_validated) - Blocking a user (
users.blocked) - Removing a comment or proposal and correcting its counters
- Adding or renaming lookup entries (road maps and committees change each budget cycle)
Done when
- Imported proposals, budget proposals, comments and polls display correctly in the GovTool proposal discussion pages
- Governance action pages link to their existing discussions
- Restarting the backend leaves lookup names unchanged
- Lingua principale
- HTML
- Stelle
- 22
- Fork
- 28
- Merge medio
- 20h 44m
- PR unite (30g)
- 33
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di IntersectMBO/govtool
-
🏗 Infrastructure
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
IntersectMBO/govtool#4297 ·
I maintainer di solito rispondono entro 1 giorno
-
⚙ Backend 📜 Proposal Pillar 2026-Revamp
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
IntersectMBO/govtool#4279 ·
I maintainer di solito rispondono entro 1 giorno
-
🖥 Frontend 2026-Revamp
Difficoltà 4/5 3-5 giorni Idoneità per principianti 65/100
IntersectMBO/govtool#4275 ·
I maintainer di solito rispondono entro 1 giorno
-
🐛 Bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 58/100
IntersectMBO/govtool#4274 ·
I maintainer di solito rispondono entro 1 giorno
-
💡 Feature idea
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
IntersectMBO/govtool#4268 ·
I maintainer di solito rispondono entro 1 giorno