- Stack: Vue 3 + Vue Router (SSR) + PrimeVue, NestJS + Fastify, Rsbuild 2, TypeScript.
- Directories:
src/client: browser app and SSR app compositionsrc/server: backend and SSR deliverysrc/shared: runtime-agnostic shared codescripts: build/dev bootstrap only
- Do not import
src/server/**fromsrc/client/**. - Do not use browser-only APIs in
src/server/**. - Keep
src/shared/**side-effect free. - Use aliases consistently:
@shared/*;@client/*only in server-side SSR code. - Keep backend modules lightweight under
src/server/modules/*.
- Keep SSR flow:
createApp+router.push(url)+router.isReady(). - Router catch-all redirects to home; SSR maps catch-all to 404.
- Route changes must check both
src/client/router.tsand SSR behavior.
- Use
ApiControllerfor API route prefixing (/api/*). - Keep controller/service return values business-focused.
- Current implementation has no global response-envelope interceptor.
- DTO validation uses
nestjs-zod+ZodValidationPipe.
- Use TypeScript with explicit, minimal types at public boundaries.
- Prefer small reusable helpers in
src/sharedorsrc/server/utils. - Keep naming and import style consistent with the existing codebase.
- Minimize diffs; avoid broad refactors.
npm run lintnpm run type-check
- Use PrimeVue as the default UI component source.
- Thin wrappers are optional; if needed, keep only
Button,Input,Dialog. - Theme scope is Light only; do not implement multi-theme support.
- Variant scope is fixed to:
primary,secondary,ghost. - Size scope is fixed to:
sm,md. - Do not build a full design system or complex abstraction.