Module 10 · Technical
Signed off 26-10-2026 · frozenUpdated 26-10-2026
Definition and examples
What the calculator is built on, where it runs, how it is kept safe and how it is tested. Example: Burundi's installation is the vertical-base template with the calculator's modules, one Postgres database, at calculator-bi.eregistrations.dev.
Functions
Build
- Template:
unctad-ai/vertical-base (Next.js, Prisma, Postgres), brought in at step 7 with its origin commit recorded, and its later fixes taken with template:pull D6, D18.
- Code layout: the contract (search, details, reference tables, estimate, specified field by field in step 4), the providers, the engine and the connectors in the domain; nothing country-specific in code. The template's applicant accounts and registration are set aside.
Run
- One installation per country: its own database and address,
calculator-<code>.eregistrations.dev D20, D26, deployed on push.
- Secrets: credentials kept encrypted in the database, written from the administration page; the encryption key in the host's environment.
- Backups: the database every day.
Protect
- Headers: a content security policy;
frame-ancestors from the allowed sites on the embedded page, 'none' everywhere else; noindex on administration.
- Limits: estimates limited per address, held in memory and never stored, trusting only the known proxy; reference answers cached; calls to the customs service capped per minute. The numbers are set in step 4 (?33, deferred); v7's start the discussion: 120 a minute, one IPv6 /64 as one client.
- Certificate: a customs server's missing intermediate carried, never verification switched off.
Test
- The gate: lint, types, tests, build and a smoke test on every pull request; styles built by it, never by hand; every catalogue code displayed and read back unchanged (ERN-1299).
- What it cannot see: each phase of step 7 also closes a real-integration check, a security check, accessibility and a person using the page, clearing every box and switching product and tab mid-answer (ERN-1303).
- Never the real service: adapters are tested with the network replaced; golden cases replay stored answers.
The contract · Module 4 · Module 5 · Module 8 · Concept note §5 and §6 · Dictionary: vertical-base, template pull, four doors
Rules
- A stand-in provider cannot start in a live installation.
- No secret, key or personal data in the repository.
- A failed request never stops the server: one bad request once took the documents site down.
- Every change goes through a pull request and the gate; nothing is merged red.
- What one country asked for ships behind its installation's setting, off elsewhere; codes sent to a provider come from its tables or settings, never from code.
Decisions needed
None open. ?33, the limit per address and the cap on customs calls, is deferred to step 4, when OBR's quota is known.
Sources
unctad-ai/vertical-base as of 26-09-2026: README.md, docs/method/M1 and M5.
- v7's
TariffsRateLimiting.cs; the documents site's crash of 29-09-2026 and its fix.
- The concept note, frozen 30-09-2026, §5 and §6.
- What 7.x's tariff page gained, rows I, K, M and O.
- Not seen: OBR's quota on its tariff API; Coolify's backup settings for these installations.