@masst/cli
v0.0.7
Published
SaaS Starter Kit Generator - scaffold production-ready monorepos in seconds
Downloads
15
Maintainers
Readme
@masst/cli
SaaS Starter Kit Generator - scaffold production-ready monorepos in seconds.
Installation
npm install -g @masst/cli
# or
pnpm add -g @masst/cliQuick Start
# Create a new SaaS project
mst init my-saas-app
# Start development (one command!)
cd my-saas-app
mst devThat's it! Your app is running at:
- Web: http://localhost:3000
- API: http://localhost:4000
- Docs: http://localhost:4000/api/docs
Demo credentials: [email protected] / demo123
What You Get
my-saas-app/
├── apps/
│ ├── web/ # Next.js 15 + @masst/ui
│ │ ├── app/
│ │ │ ├── (auth)/ # Login & Signup pages
│ │ │ └── dashboard/ # Protected dashboard with sidebar
│ │ └── components/ # AppSidebar, LoginForm, etc.
│ │
│ └── api/ # NestJS Backend
│ └── src/
│ ├── auth/ # JWT authentication
│ ├── users/ # User management
│ ├── tenants/ # Multi-tenant support
│ └── health/ # Health checks
│
├── packages/
│ └── database/ # Prisma + PostgreSQL
│ └── prisma/
│ └── schema.prisma # Multi-tenant schema
│
├── docker-compose.yml # PostgreSQL + Redis
├── turbo.json # Turborepo config
└── .github/workflows/ # CI/CD pipelinesCommands
mst init
Create a new SaaS project.
# Interactive mode
mst init
# Non-interactive mode
mst init my-app -y
# With options
mst init my-app -y --db my_database --no-redis| Option | Description |
| ---------------- | -------------------------- |
| -y, --yes | Skip prompts, use defaults |
| --db <name> | Database name |
| --no-redis | Exclude Redis |
| --skip-install | Skip pnpm install |
| --skip-git | Skip git initialization |
mst dev
Start the development environment with one command.
# Full start (Docker + DB + servers)
mst dev
# Using external database
mst dev --no-docker
# Force re-seed demo data
mst dev --seed
# Reset database completely
mst dev --fresh| Option | Description |
| ------------- | -------------------------------------------- |
| --no-docker | Skip Docker, use external database |
| --seed | Force database seeding (even if data exists) |
| --fresh | Reset database and seed fresh data |
Smart Seeding Behavior:
- First run: auto-seeds demo data
- Subsequent runs: preserves your data
- Use
--seedto force re-seeding - Use
--freshto completely reset
mst build
Build all applications for production.
mst buildmst deploy
Deploy to production.
# Build Docker images
mst deploy
# Deploy to Railway
mst deploy --platform railway
# Deploy to Fly.io
mst deploy --platform fly
# Deploy to Render
mst deploy --platform render
# Custom image tag
mst deploy --tag v1.0.0| Option | Description |
| ----------------------- | ------------------------------------------------------- |
| --platform <platform> | Deployment target: docker, railway, fly, render |
| --tag <tag> | Docker image tag (default: latest) |
mst stop
Stop Docker containers.
mst stopmst db
Database management commands.
# Open Prisma Studio (visual database browser)
mst db studio
# Create a new migration
mst db migrate --name add_users
# Deploy migrations (production)
mst db migrate --deploy
# Reset database (drops all data)
mst db reset
# Push schema without migrations
mst db push
# Seed database
mst db seed
mst db seed --force # Force reseed| Subcommand | Description |
| ---------- | ------------------------------------------- |
| studio | Open Prisma Studio at http://localhost:5555 |
| migrate | Create or deploy migrations |
| reset | Drop and recreate database |
| push | Push schema changes (no migration) |
| seed | Seed with demo data |
mst logs
View Docker container logs.
# View all logs
mst logs
# Follow logs (like tail -f)
mst logs -f
# View specific service
mst logs --service postgres
# Last 50 lines
mst logs -n 50| Option | Description |
| -------------------- | ----------------------------------- |
| -f, --follow | Follow log output |
| --service <name> | Filter by service (postgres, redis) |
| -n, --tail <lines> | Number of lines (default: 100) |
mst add
Add features to your project.
# Add Stripe billing
mst add stripe
# Add email support (Resend)
mst add emails
# Add analytics (PostHog)
mst add analytics| Feature | What it adds |
| ----------- | ---------------------------------------- |
| stripe | Stripe SDK, billing types, webhook setup |
| emails | Resend, React Email components |
| analytics | PostHog, tracking provider |
mst upgrade
Upgrade @masst packages to latest versions.
# Check for updates
mst upgrade --check
# Upgrade all @masst packages
mst upgrademst i / mst install
Install packages with auto @masst/ scoping.
# Install @masst/ui
mst i ui
# Install without scope
mst i lodash --skip-scope
# Force specific package manager
mst i ui --pm npmDevelopment Workflow
Daily Development
# Start everything
mst dev
# Stop when done
mst stopUsing External Database
# Set DATABASE_URL in .env
DATABASE_URL="postgresql://user:pass@host:5432/db"
# Start without Docker
mst dev --no-dockerFresh Start
# Reset database and reseed
mst dev --freshProduction
# Build
mst build
# Deploy
mst deploy --platform railwayTech Stack
- Monorepo: Turborepo
- Frontend: Next.js 15, React 19, @masst/ui
- Backend: NestJS, Prisma
- Database: PostgreSQL + Redis
- Auth: NextAuth.js + JWT
- CLI: Commander.js, Chalk, @clack/prompts
Requirements
- Node.js >= 18
- pnpm >= 9
- Docker (for local development)
License
MIT
