Skip to main content
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.
# Traditional approach: Modify Entity β†’ Restart server β†’ Wait 30 seconds
# Sonamu approach: Modify Entity β†’ Save β†’ Reflected in 2 seconds βœ…
# Console output example
πŸ”„ Invalidated:
- src/application/user/user.model.ts (with 8 APIs)

βœ… All files are synced!
If you make 50 modifications a day? Traditional approach wastes 25 minutes, Sonamu takes only 1.7 minutes.

How HMR Works

Learn how the HMR system works internally

Sonamu UI

Define Entities, manage Subsets, and run Migrations directly in the web UI. No need to edit JSON manually.

Sonamu UI Guide

Getting started with Sonamu UI

Fast Feedback Loop

Entity change β†’ Auto-generate types/schemas β†’ Re-register APIs β†’ Update frontend Services β€” everything is automatic.

What Syncer Does

  1. File Change Detection: Watches filesystem with chokidar
  2. ESM Cache Invalidation: Clears cache for changed modules and dependencies
  3. Auto Code Generation: Generates type, schema, and Service files
  4. Module Reload: Reloads with latest code
  5. API Re-registration: Re-registers changed API endpoints

Understanding Syncer

The core of the auto-generation system

Key Features Summary

HMR

Instant reflection without restartModify β†’ Save β†’ Test in 2 seconds

Sonamu UI

Visual Entity managementNo JSON editing required

Syncer

Auto-sync all codeTypes, schemas, Services

Type Error Detection

Compile errors on changePrevent runtime errors

Next Steps