Appearance
Schema and web changes
The game and web applications share a database but have different data-access layers. Keep schema, constants, permissions and cache-refresh behaviour aligned when extending either side.
SQL ownership
database/schema.sql describes clean installation. Existing servers need explicit additive migrations; the web-specific migration is web-platform/web/prisma/sql/framework-web.sql.
The Prisma schema intentionally models only the web’s subset of the game schema. Update it when the web needs a field, then run npm run db:generate. Do not use prisma db push to make the live database resemble that subset.
Web reads and writes
Use lib/dal.ts for signed-in users, staff checks and owned/faction characters. Validate input with appropriate schemas and enforce authorization again in each server action/route. A hidden link or client-side disabled button is not an access control.
For ACP changes, call the audit helper with a meaningful actor/action/target/reason. Understand its current non-transactional failure behaviour; use a stronger design if your new operation requires guaranteed audit persistence.
Shared definitions
Keep lib/constants.ts aligned with Pawn for staff ranks, faction types, squads and other shared numeric codes. Update reference tools under lib/data/ when changing their corresponding game data. Otherwise a polished catalogue can still show the wrong capacity or price.
Cache and online-state design
Before adding a web editor, define when the game reads the field and whether it may overwrite it. Prefer offline-only character edits or a deliberate game-side update/reload path. Document which reload command applies.
Custom model metadata needs matching files and a full game restart. An SQL write alone cannot replace a previously registered client model.
Extend the API scaffold
The optional Fastify API currently offers /health. Add authentication, authorization, input validation, rate limits and tests appropriate to any new endpoint. Do not reuse a browser-visible value as an administrative secret. CORS configuration alone is not access control.
Work on the project documentation
The documentation source is in the separate website repository. Set FRAMEWORK_ROOT to your framework checkout when regenerating source references. Review generated output alongside any command/permission change and update the explanatory workflow pages as well.