create-sonamu package to create a new Sonamu project.
System Requirements
The following environment is required to use Sonamu:- Node.js v22 or higher
- pnpm v10.23 or higher
- Docker (for running the database)

Running node --version, pnpm --version, docker --version in terminal
Creating a Project
Run the following command in your terminal to create a new Sonamu project:Inline Options
You can pass the project name as an argument or use options to skip interactive prompts:In
--pnpm y and --docker y, you can also use yes, true, or 1 instead of y. Similarly,
n can be replaced with no, false, or 0.Running pnpm create sonamu with inline options default values
1
Enter Project Name
Enter the name of the project to create. A directory will be created with this name.
2
pnpm Setup
Choose whether to automatically set up pnpm. This is the recommended option.
3
Database Setup
Choose whether to set up a PostgreSQL database using Docker. If you select Yes:
- Docker Compose project name
- Database username
- Container name
- Database name
- Database password
packages/api/.env file will be automatically generated with this information.
Project creation completion message and generated directory structure
Generated Project Structure
create-sonamu creates the following monorepo structure:

Directory tree structure of the project opened in VS Code
myapp
packages
api (Backend API server)
web (Frontend web app)
pnpm-workspace.yaml (Workspace configuration)
README.md
Key Configuration Files
pnpm Workspace
The rootpnpm-workspace.yaml manages monorepo packages and common dependency versions:
pnpm-workspace.yaml
API Server Entry Point
The entry point of the generated API server is as follows:
packages/api/src/index.ts file opened in VS Code
Sonamu Configuration
Manage your project’s main settings insonamu.config.ts:
packages/api/src/sonamu.config.ts
Docker Compose Configuration
PostgreSQL database is managed with Docker:packages/api/database/docker-compose.yml
Frontend Configuration
A Vite + React + TanStack Router + SSR based application is generated:packages/web/vite.config.ts
Port Configuration
Default ports are configured as follows:- Sonamu UI: Access via the API server’s
/sonamu-uipath, not a separate port. - API server port: Modify theportconstant inpackages/api/src/sonamu.config.ts(in this case, also modifyAPI_PORTinpackages/web/.sonamu.env) - Web app port: Modifyserver.portinpackages/web/vite.config.ts