Server backup 2026-11-07 of uncommitted work in projects/pharma-web-celtic

Snapshot of the working tree on srv1071960 (branch main), taken during
server cleanup. .env files, node_modules, builds, logs and media were excluded.
This commit is contained in:
Shubhankar45
2026-11-07 05:43:12 +00:00
parent b001e2d03c
commit 0d30c58bf0
98 changed files with 1878 additions and 573 deletions
+5 -5
View File
@@ -44,8 +44,8 @@ Every command below was run against this codebase's Docker stack unless it is ma
Persistent state lives in exactly two volumes: **`pgdata`** (the database) and **`pdfstore`**
(approved DCR PDFs). `caddydata` holds certificates. Everything else is rebuilt from the code.
Roles: MR (medical representative), AM (area manager), GM (general manager), ADMIN. The MR
files daily call reports and company forms, the AM approves, the GM has read access across
Roles: MR (medical representative), ABM (Area Business Manager), AGM (Assistant General Manager), ADMIN. The MR
files daily call reports and company forms, the ABM approves, the AGM has read access across
territories, the ADMIN maintains people, organisation and master data.
## 2. Requirements
@@ -107,7 +107,7 @@ short-lived bootstrap and do the following **before the server is reachable by a
changed later from the app, so choose them as final and hand them over securely.
4. Sign out, sign in as the **new** administrator, open **Users** and **deactivate all four demo
accounts** (deactivation also revokes their sessions). Verify `adm001` can no longer sign in.
5. Assign an Area Manager to each headquarters, then assign doctors and chemists to MRs
5. Assign an Area Business Manager to each headquarters, then assign doctors and chemists to MRs
(**Setup → Assignments**).
If you would rather not keep the demo doctors, chemists and the `BBSR` headquarters, deactivate
@@ -337,7 +337,7 @@ docker compose up -d
2. Real headquarters and users created; **all demo accounts deactivated** (section 4).
3. Reference data loaded (section 5): Products page shows 26 products; Sales Projection shows the
product list.
4. One end-to-end pass with real accounts: MR files a DCR → AM approves → PDF downloads and
4. One end-to-end pass with real accounts: MR files a DCR → ABM approves → PDF downloads and
opens; each company form downloads a PDF that matches the printed original.
5. HTTPS works on the final domain; HSTS enabled.
6. Firewall: only 80/443 (or the proxy) open.
@@ -355,7 +355,7 @@ docker compose up -d
there is no self-service recovery and no email flow.
- **Company-form approval is per form, not per row.** Tour plan, standard tour plan and fare chart
each have one approval state, stored on the server (`form_approval`): the MR sends a form that has
rows, the Area Manager approves it, and the PDF signature shows that name. Any change to the rows
rows, the Area Business Manager approves it, and the PDF signature shows that name. Any change to the rows
withdraws the approval. The signature is decided by the server, never by the browser.
- **Audit-log immutability is opt-in** (section 8) and untested with the shipped compose file.
- **No built-in alerting or error tracking**; only health checks and logs.