Who Is This Framework For
Productivity-Focused Developers
Teams That Trust Type Safety
Backend Developers Collaborating with Frontend
Startups Needing Rapid Prototyping
Core Philosophy: Single Source of Truth
Define one Entity, and TypeScript handles the rest.🎬 Full flow: Entity creation → Migration execution → Auto-generation of types/schemas/APIs → Frontend Service generation
Backend and Frontend Type Synchronization
Typically, when building backend APIs and using them on the frontend, type synchronization is difficult. With Sonamu, backend changes are immediately reflected on the frontend, catching errors at compile time.- Manual Approach
- Sonamu Approach

📸 Compile error shown when accessing non-existent property in Sonamu approach
Fully Type-safe Query Builder: Puri
Sonamu provides Puri, a type-safe query builder based on Knex. Table names, column names, and relationships are all type-checked.🎬 Needed: Writing type-safe queries with Puri - table name, column name autocomplete
- ✅ Types auto-extracted from Entity definition
- ✅ Autocomplete for table names, column names, and relationships
- ✅ Wrong column names cause compile errors
- ✅ All Knex features supported
Puri Guide
Frontend Integration
When you define a backend API, frontend Services and TanStack Query Hooks are automatically generated.🎬 Write backend @api method → Frontend Service auto-generated → Use useQuery
Optimization with Subsets
Query only the fields you need to reduce network costs and improve performance. Exact TypeScript types are automatically generated for each Subset.SSR
Supports server-side rendering based on Vite + React. Register SSR routes withregisterSSR and preload necessary data on the server with the preload callback.
- ✅ Backend changes detected immediately via compile errors
- ✅ Clean structure with Namespace-based organization
- ✅ TanStack Query auto-integration (caching, revalidation, optimistic updates)
- ✅ Accurate type inference per Subset
- ✅ SSR support for SEO optimization
Using Services
TanStack Query
SSR
Testing
Sonamu includes powerful built-in tools for testing.Fixture System
Easily load pre-seeded test data from Fixture DB withcreateFixtureLoader.
Naite: Test Data Tracking & Visualization
Track and visualize all data changes during test execution. Debugging becomes much easier.📸 Naite Viewer screen - UI that visually shows database changes during test execution
Automatic Transaction Rollback
Each test runs in an isolated Transaction and automatically rolls back. Test isolation is guaranteed and no data cleanup is needed.- ✅ Reuse test data with Fixtures
- ✅ Visualize data changes with Naite
- ✅ Isolated tests with automatic Transaction rollback
Fixture System
Naite Guide
AI Ready
Sonamu natively supports features for the AI era.Vector Search (pgvector)
Define AI embedding search as an Entity field and you’re done. Native support for pgvector.🎬 Define vector field in Entity → Auto-generate migration → Implement vector search API
AI SDK Integration
Seamlessly integrates with Vercel AI SDK. Streaming responses are simple.SSE (Server-Sent Events)
Easily use SSE for real-time streaming with the@stream decorator.
AI Agent Integration
Create Entities in natural language using AI chat in Sonamu UI.🎬 Type 'Create an e-commerce order system' in Sonamu UI → 4 Entities auto-generated
- ✅ Native pgvector support (vector search)
- ✅ Seamless AI SDK integration (streaming)
- ✅ Real-time events with SSE
- ✅ Auto-generate Entities with AI Agent
Vector Search
SSE Streaming
Seamless DX
Sonamu is designed with developer experience as the top priority.HMR (Hot Module Replacement)
When you modify code, it’s instantly reflected without server restart. Whether you modify Entity, Model, or API, 2 seconds is all you need.Sonamu UI
Define Entities, manage Subsets, and run Migrations directly in the web UI. No need to edit JSON manually.🎬 Entity definition and management in Sonamu UI
Fast Feedback Loop
Entity change → Auto-generate types/schemas → Re-register APIs → Update frontend Services — everything is automatic. Key Features:- ✅ Develop without server restart using HMR
- ✅ Visual Entity management with Sonamu UI
- ✅ Syncer auto-synchronizes all code
- ✅ Detect type errors immediately on change
Learn More
How HMR Works
Sonamu UI
Production Ready
Sonamu includes powerful features built for production environments.BentoCache: Multi-Layer Caching
Easily use memory + Redis multi-layer caching.Cache-Control: Response Caching
Set HTTP response caching strategies simply with decorators.i18n: Type-Safe Internationalization
Entity title, prop.desc, and enumLabels are automatically extracted to the dictionary. Manage translations with the type-safeSD() function, and non-existent keys are caught at compile time.
Workflow: Complex Business Logic Management
Systematically manage complex multi-step business logic.Built-in Performance Optimization
N+1 problem auto-resolution and query optimization are provided by default.- ✅ Multi-layer caching with BentoCache (memory + Redis)
- ✅ HTTP response caching with Cache-Control
- ✅ Type-safe internationalization with i18n
- ✅ Complex business logic management with Workflow
- ✅ N+1 problem auto-resolution
BentoCache
i18n
Simple Example
The complete flow from defining an Entity to using it.Note: Auto-generated files
api/src/application/sonamu.generated.ts- All types, schemas, Enumsweb/src/services/sonamu.generated.ts- Frontend types (synchronized)web/src/services/services.generated.ts- All Service methodsweb/src/services/{entity}/{entity}.types.ts- Custom types (manually written)
1. Define Entity
🎬 Defining User Entity in Sonamu UI
2. Run Migration and Sync
Save Entity → Run Migration →pnpm sync:
✅ TypeScript types (sonamu.generated.ts)✅ Zod schemas (BaseSchema, BaseListParams)
✅ DB migrations
✅ Frontend Service (
services.generated.ts)✅ TanStack Query Hooks
3. Write Business Logic in Model
4. Use Immediately in React
🎬 Complete flow: Entity definition → Migration → Model writing → Usage in React
Getting Started
3 minutes is all you need.Quick Start
Installation
Core Concepts
Development Workflow
Community
GitHub
With Sonamu, developing in TypeScript becomes enjoyable.