The api crash-looped because DATABASE_URL had an un-encoded special-char
password (@/!), so SQLAlchemy parsed part of the password as the host
("...@db" → name resolution failure).
db.py now prefers building the connection from POSTGRES_USER/PASSWORD/DB via
SQLAlchemy URL.create(), which encodes the password automatically — any
password works with no manual escaping. DATABASE_URL remains an optional
override (still must be hand-encoded if used). docker-compose now passes the
POSTGRES_* vars to the api container; DEPLOYMENT.md updated (incl. a Portainer
env-vars note).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
server/seed_demo.py seeds a realistic DEMO project (complete SOP + a spread of
Work Packages: issued, gated, multi-discipline master with split instances,
overdue, over-threshold draft) via the API. --clean removes it. DEPLOYMENT.md
documents both smoketest.py and seed_demo.py, including the localStorage caveat
(seeded project shows in the UI picker; seeded SOP/WPs are SQL-only until Phase 2).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- API smoke test (server/smoketest.py): stdlib end-to-end check of health,
projects, SOPs, WPs, the AWP issue gate (409 → 200), status, metrics,
comments, and cascade delete. Referenced from DEPLOYMENT.md.
SOP config:
- Constraints: fix custom constraints never appearing — renderStandardConstraints
no longer clobbers state.constraints; customs render in their own list with
remove buttons; modal gains a free-text "Add" field.
- Sources: add column headers (Data Type / Location-Platform / URL / Notes);
preset data types are now fixed labels, "Add Source" creates an editable
custom row.
- Issuance strategy: add a tooltip + worked examples for each option.
- Remove the "Comment submitted" acknowledgement popup (home + suite); keep the
commenter name between comments.
WP creator:
- Clearing the last open constraint now offers to mark the package Issued and
scrolls to the status control.
- Form sections are collapsible (click a section heading to fold it).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replaces the stale non-Docker/systemd guide with an admin-facing, start-to-
finish guide for the actual stack (nginx serving html/, FastAPI api, Postgres
db). Covers prerequisites (external proxy network), the root .env credentials,
reverse-proxy wiring, bring-up, and verification. Adds the current data model
(projects + project_id/parent_id/issued_at columns), the full endpoint list, a
"what's stored in SQL today vs Phase 2" table, backups, and the schema-migration
caveat (create_all adds tables, not columns). Points to server/README.md for the
deep container reference.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- server/: FastAPI app with SQLAlchemy models for sops, work_packages, comments
- Endpoints for SOP/WP upsert+list+get+delete and comment create+list;
/api/feedback kept as an alias so the existing client keeps working
- Portable across engines (PostgreSQL prod, SQLite dev fallback)
- requirements.txt, .env.example, and server/README.md (Postgres + systemd)
- NGINX now proxies /api/ to the API (replaces the Power Automate hop;
comments persist to SQL)
- Rewrite DEPLOYMENT.md for the API + database architecture
- Add .gitignore for venv/.env/sqlite
Phase 2 (wire the client apps to the API) is next.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Add nginx-wp-suite.conf: static site + /api/feedback proxy to the Power
Automate trigger (SNI on, Host header, POST-only, body cap)
- Remove IIS web.config
- Update feedback-config.js comment and DEPLOYMENT.md to the NGINX setup
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Set FEEDBACK_ENDPOINT to same-origin /api/feedback (no CORS, hides trigger URL)
- Add web.config with ARR/URL-Rewrite proxy rule (placeholder trigger URL),
HTTPS/POST/static-content setup
- DEPLOYMENT.md: concrete IIS + Power Automate steps and the HTTP-trigger
Request Body JSON Schema matching the app payload
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
WP type discipline removal:
- SOP WP Types step now has Enabled / Special Rules-Notes / WO Complete
Approval columns (discipline column and DISCIPLINES/type-discipline maps gone)
- WP Creator: drop the derived Discipline field, the type-trade number code,
and discipline from saved packages and output; number tokens are now generic
- Default WP number format no longer includes [Discipline]
- Harden buildConstraints against object-shaped constraint names
Firewall hosting:
- Remove external Google Fonts @import; fall back to system fonts (no
outbound calls, runs fully behind a firewall)
Feedback collection:
- Add shared feedback-config.js with a single FEEDBACK_ENDPOINT hook +
best-effort postFeedback() (backend or Power Automate/SharePoint)
- Add Export / Import to home and SOP feedback; wire central-post on all three
surfaces (home, SOP step comments, WP review comments)
- Add DEPLOYMENT.md documenting hosting and both feedback paths
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>