This is a Nuxt 4 + TypeScript app. Keep feature logic close to existing folders:
app.vueandnuxt.config.tsdefine the app shell and runtime modules.server/contains backend runtime code (config.ts,libs/,utils/).assets/stores CSS, SQL scripts, JSON schema/data assets.public/stores static files served as-is (icons,robots.txt).data/config.jsonholds runtime config and database file paths (data/*.db).
pnpm install: install dependencies.pnpm dev: run local development server.pnpm build: build production server/client bundles.pnpm preview: run the built app locally for verification.pnpm generate: generate static output where applicable.pnpm format: formatvue/ts/js/jsonfiles with Prettier.
Formatting is enforced by .editorconfig and .prettierrc:
- 4-space indentation, LF line endings, UTF-8, final newline.
- Single quotes and semicolons in TypeScript/JavaScript.
- Keep Vue templates readable; avoid dense one-line markup.
Naming:
- Use
camelCasefor variables/functions. - Use descriptive utility filenames like
parseDateAsTimestamp.ts. - Keep SQL scripts in
assets/sql/with verb-based names.
Prioritize reusing existing code rather than adding new functions. Place utility classes in either utils/ (client-side code) or server/utils (server-side code). You should check whether the utility function is declared in other places.
Inline SQL statements are strictly forbidden.
When SSR code calls this app's own /api endpoints, service-side requests must use useRequestFetch() in server context so request identity, cookies, and quota bucket resolution stay consistent with direct API access.
There is no automated test framework configured yet. Required validation for changes:
- Run
pnpm typecheck:serverif you only modify the code in server. - Run
pnpm typecheckafter you change the code.
In each PR, include clear manual verification steps and expected outcomes.
Use Conventional Commits:
feat: add train route lookup cachefix: handle empty schedule payloadchore: format server utils
If committing command fails, please request permission upgrades, do not use --no-gpg-sign.
PRs should include:
- concise change summary and scope
- linked issue/task (if available)
- validation commands run
- screenshots for UI-visible changes
- Do not commit secrets or environment-specific credentials.
- Treat
data/config.jsonas operational config; keep schema-compatible withassets/json/configScheme.json. - Review
nuxt.config.tssecurity settings carefully before relaxing headers or CSRF protections. - If apply patch tool cannot work, please use js_repl to make commits on file. Never using PowerShell Script to edit file, which will cause file encoding fault.
- Please do not output any LF or CRLF when you are chatting with users.