Guidance for coding agents working in this repo.
- DO NOT edit generated output in
server/public/**orclient/dist/**. - DO NOT hardcode secrets, tokens, or passwords.
- Keep diffs minimal and consistent with existing patterns.
- Locate relevant files first (use
rgandrg --files). - Follow existing architecture and naming conventions.
- If you add or change an API, update both server route/controller and client API helpers.
- Note any commands you ran. If you did not run tests or checks, say so.
- Monorepo:
client/(Svelte + Vite) andserver/(Fastify + Sequelize + SQLite). - Client routes in
client/src/routes. Server routes inserver/src/routes. - DB models in
server/src/modelsand must be imported inserver/src/index.ts. - Desktop work should live in
desktop/if/when Electron is added; keep the shell separate fromclient/andserver/.
- Prefer Electron for the desktop shell in this repo unless the user explicitly asks for a different runtime.
- Reuse the existing Fastify server and Svelte build; do not rewrite APIs just for desktop.
- Desktop-specific runtime data must live in the OS user-data directory, not under
server/data/**or the install directory. - Desktop-embedded server should listen on
127.0.0.1and use a configurable port and SQLite path. - Keep front-end API calls relative (
/api/*) so web and desktop builds can share the same client code. - Treat native Node modules such as
sqlite3as packaging-sensitive; document anyasarUnpackor rebuild requirements when touching desktop packaging.
- Install:
pnpm i(preferred). Root scripts callyarn. - Dev:
cd server && npm run dev;cd client && npm run dev. - Build:
yarn build. - Format:
yarn prettierorcd client && npm run prettier.