TypeScript and NestJS
Choose TypeScript when your team wants a NestJS service with TypeORM, class-validator, Jest, and Swagger/OpenAPI. Apso generates ordinary framework source that can run without an Apso runtime dependency.
Create the service
apso init --name project-api --language typescript --skip-platform
cd project-apiTo link the project to Apso Cloud during initialization, run apso login and remove --skip-platform.
Configure local development
Use PGlite for the shortest local path:
DATABASE_TYPE=pglite
DATABASE_SYNC=true
APP_PORT=3100Generate and run the service:
apso schema validate
apso generate
apso devOpen http://localhost:3100/_docs and exercise the generated routes.
Project structure
project-api/
├── .apsorc
├── .env
├── package.json
└── src/
├── autogen/ # Generated entities, DTOs, services, controllers, modules
├── extensions/ # Product-specific logic preserved across generation
├── config/ # Application, database, HTTP, and OpenAPI setup
├── migrations/ # Reviewed database changes
├── app.module.rest.ts
├── main.ts
└── orm.config.tsThe generated entity folders use the entity names from .apsorc. Route names are plural and case-preserving, such as /Projects and /Tasks.
Common commands
| Task | Command |
|---|---|
| Start with file watching | apso dev or npm run start:dev |
| Generate framework layers | apso generate |
| Validate the schema | apso schema validate |
| Test a migration locally | apso migrate |
| Run unit tests | npm test |
| Run end-to-end tests | npm run test:e2e |
| Check lint | npm run lint |
| Build production output | npm run build |
| Run TypeORM migrations | npm run db:migrate |
Add product logic
Keep generated CRUD layers under src/autogen/. Add custom controllers, services, integrations, and hooks under src/extensions/, then register them through the extension module pattern used by the generated project.
Do not make product changes directly in src/autogen/. Run apso generate after schema changes and expect those files to be replaced.
Production boundary
The output is a NestJS application. You can deploy it through Apso Cloud, build its Dockerfile, or use the standard NestJS build and process model in your own infrastructure. Commit .apsorc, generated source, migrations, extensions, package manifests, and tests.