# EVENTSA Backend P0 Fixed Release

Date: 2026-09-16

This package is based on the uploaded production backend source and contains the P0 hardening/fix work performed in this conversation.

## Verification completed

- `npm run build` -> PASS
- `npm test` -> 5 suites / 18 tests PASS
- Real `.env`, `.git`, `node_modules`, and runtime user uploads are intentionally excluded.
- Built `dist/` is included.

## Important deployment order

1. Back up the target database and current backend.
2. Create a real `.env` from `.env.example` and insert production secrets/URLs locally on the server.
3. Install locked dependencies with `npm ci` using the production Node version validated for the server.
4. Apply `migrations/2026-09-16-p0-hardening.sql` to a PostgreSQL 15 test copy first.
5. Start the backend against the test database and run smoke/integration tests.
6. Only after validation, apply the migration and release to production.

Rollback SQL is included at:
`migrations/2026-09-16-p0-hardening.rollback.sql`

## Important scope note

This is the corrected P0 backend baseline, not a claim that all Excel/DOCX feature requirements are complete. Major remaining feature work includes full multi-level judging workflow, OTP/Google login, comprehensive reporting/CIVILICA/ISC, certificates, and remaining event-scope enforcement across all modules.
