Adding Apps
Use npx tsdevstack add-service to add new applications to your monorepo.
Adding services
Use the interactive mode (recommended):
This walks you through:
- App type - SPA, Next.js, or NestJS
- Name - Your service name (NestJS names must end with
-service) - Database - Whether to include Prisma (for NestJS services)
Or pass flags directly:
NestJS service
This creates a NestJS backend service at apps/payments-service/ with:
- NestJS application scaffold
- OpenAPI decorators configured
- Database connection ready
- Health check endpoint
Next.js frontend
This creates a Next.js application at apps/web-app/.
SPA frontend
This creates a Rsbuild-based SPA at apps/admin-dashboard/.
Workers
Workers live inside a service and handle background job processing. They share the service's codebase:
By default, workers run in the same container as the service. If you need to deploy them to a separate container for independent scaling, register them as detached workers:
After adding an app
After adding a service:
The new app will be available:
- NestJS services: APIs at
http://localhost:8000/<short-name>/...(e.g.,payments-service→/payments/), service runs on its own port (e.g.,:3004) - Frontends:
http://localhost:3000(or configured port)
Removing apps
Use the remove-service command to remove an app:
If no service name is provided, it will prompt you to select from available services.
The framework will remove the service directory, its database container, and update Docker Compose and Kong configuration.