Always read FEATURES.md before editing README.md or making any claims about what is or isn't implemented. It is the authoritative record of every feature, API route, config key, DB table, and known stub/gap. Do not rely on README.md alone — it has drifted from reality before.
When a feature is added, changed, or removed, update both README.md and FEATURES.md in the same commit.
- No
Co-Authored-By: Claudelines — ever. - Commit messages should explain why, not just what.
- README.md and FEATURES.md must stay in sync with the code.
- Do not document things that aren't implemented. Known stubs (Toast POS webhook, Square POS webhook) are noted in FEATURES.md — do not present them as working features.
- Database: PostgreSQL via
pg(node-postgres).DATABASE_URLenv var required. Migrations:npm run db:migrate. NOT SQLite. - Payments: Square (cards, Google Pay, Apple Pay, card-on-file) and QuickBooks (ACH/invoice). Stripe is not present and was never implemented.
- Email: Nodemailer over SMTP. NOT SendGrid.
- Deployment: PM2 + nginx. NOT Render or any cloud PaaS.
- Config: Almost everything lives in the
site_configDB table, editable via Admin → Settings. OnlyAUTH_SECRETandNEXTAUTH_URLare required in.env.local. - Auth: NextAuth v5. Edge-safe split between
auth.config.ts(middleware) andauth.ts(Node.js). OAuth credentials are read from the DB at runtime and require a server restart to take effect. - PWA and offline support are fully implemented (
public/sw.js,public/manifest.json,/app/offline/,WakeLock.tsx). Do not remove this from documentation. toastindesk/page.tsxis a UI notification component, not the Toast POS system.- Toast POS webhook (
/api/webhooks/toast/route.ts): fully implemented — HMAC-SHA256 verification, CHECK_CLOSED handling, member name matching, dedup viaexternal_id. Square POS webhook (/api/webhooks/square) is still a stub. member_chargeshassource(manual/toast) andexternal_id(unique dedup) columns added via migration.
- Keep changes minimal and focused — do not refactor or clean up surrounding code unless asked.
- Run
npm run buildto verify changes compile before committing. - When the build passes, commit and push in the same step unless told otherwise.