Generated Files Overview
Types & Schemas
TypeScript types and Zod schemas *.types.ts, sonamu.generated.ts
API Clients
HTTP client functions services.generated.ts
Query Helpers
Subset query functions sonamu.generated.sso.ts
React Components
Form, List, Select components view_*.tsx
Core Generated Files
1. Entity Types ({entity}.types.ts)
TypeScript types and Zod schemas are generated per Entity.
api/src/application/user/user.types.ts (auto-generated)
pnpm sonamu sync
Editable: ❌ Auto-regenerated (custom types in separate file)
2. Generated Base (sonamu.generated.ts)
Base types and Enums for the entire project.
api/src/application/sonamu.generated.ts (auto-generated)
pnpm sonamu sync
Editable: ❌ Auto-regenerated
3. Subset Queries (sonamu.generated.sso.ts)
Query functions per Subset.
api/src/application/sonamu.generated.sso.ts (auto-generated)
4. API Services (services.generated.ts)
API client functions.
web/src/services/services.generated.ts (auto-generated)
@api decorator changes
Editable: ❌ Auto-regenerated
Target-specific generation: Copied to each target specified in
sync.targets in
sonamu.config.ts (web, app, etc.).5. HTTP Test File (sonamu.generated.http)
HTTP test file for REST Client.
api/sonamu.generated.http (auto-generated)
React Components
React UI components can be generated via Scaffold.6. List Component
pnpm sonamu generate view_list --entity User
Editable: ✅ Editable after initial generation
7. Form Component
web/src/pages/user/UserForm.tsx
pnpm sonamu generate view_form --entity User
Editable: ✅ Editable after initial generation
8. Select Components
SSR Related Files
Files for Server-Side Rendering are auto-generated.9. Queries (queries.generated.ts)
For APIs with the tanstack-query client enabled, this file exports SSR-side descriptors (SSRQuery) grouped by model namespace. The api-side ssr/routes.ts uses these descriptors via registerSSR(...) to compose preload configs.
api/src/application/queries.generated.ts (auto-generated)
10. Entry Server (entry-server.generated.tsx)
TanStack Router-based SSR entry point. It exports a render(url, preloadedData) function called by the web side, not a per-route loader. Data prefetched during SSR (preloadedData) is injected via queryClient.setQueryData(queryKey, data), then dehydrated for client hydration.
web/src/entry-server.generated.tsx (auto-generated)
Internationalization Files
Generated when i18n configuration exists.11. Sonamu Dictionary (sd.generated.ts)
api/src/sd.generated.ts (auto-generated)
api, web, app each
Generated Files Summary Table
Next Steps
Syncer
Understanding the core Syncer system
When Files Regenerate
Learn when files are regenerated
Customizing Generated Code
How to customize generated code
Creating Entities
Define Entities and generate files