Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Wrap up the PDF backend for production: Strapi data import, lookup data and admin tasks

Aperta
#4,278 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

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

⚙ Backend 📜 Proposal Pillar 2026-Revamp
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 over govtool_username, is_validated and blocked
  • Proposals: contents (including constitution and hard-fork content), links, likes, polls and poll votes, comments with replies
  • Keep submitted / submission_tx_hash on proposal contents, so governance action pages still link to their discussion
  • Budget proposals: every version of each master_id chain 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, then setval the 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 bds row has master_id before dropping old_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.ts from re-seeding lookups on every start. src/seed/seed-lookups.ts upserts 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

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di IntersectMBO/govtool

Tutte le issue di IntersectMBO/govtool

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.