machina-cli
v5.3.4
Published
**Production-grade Next.js monorepo boilerplate for rapidly building SaaS apps.**
Readme
🔥 Spark
Production-grade Next.js monorepo boilerplate for rapidly building SaaS apps.
Overview
Spark is a customized Turborepo template based on next-forge, stripped down and optimized for fast project bootstrapping. It's the spark that ignites your next big thing.
Philosophy
- Fast — Quick to build, run, deploy, and iterate
- Lean — Only what you need, nothing you don't
- Modern — Latest stable features from Next.js 16+
- Type-safe — End-to-end TypeScript with strict mode
Structure
spark/
├── apps/
│ ├── app/ # Main application (port 3000)
│ ├── web/ # Marketing website (port 3001)
│ ├── api/ # API server (port 3002)
│ ├── email/ # Email templates
│ └── studio/ # Drizzle Studio
└── packages/
├── ai/ # Vercel AI SDK integration
├── analytics/ # PostHog analytics
├── auth/ # Clerk authentication
├── database/ # Drizzle + Neon
├── design-system/ # shadcn/ui components
├── email/ # Resend email
├── feature-flags/ # Feature flag management
├── next-config/ # Shared Next.js config
├── observability/ # Sentry error tracking
├── payments/ # Stripe integration
├── rate-limit/ # Upstash rate limiting
├── seo/ # Metadata & JSON-LD
└── typescript-config/ # Shared TS configGetting Started
# Clone for a new project
git clone https://github.com/thetomtimus/spark my-new-project
cd my-new-project
# Install dependencies
pnpm install
# Set up environment variables (creates .env.local files)
pnpm setup
# Run development servers
pnpm devThe pnpm setup command copies all .env.example files to .env.local. Fill in your actual values before running pnpm dev.
Required Services
Configure these in your .env.local files:
- Clerk — Authentication (
CLERK_SECRET_KEY) - Neon — Database (
DATABASE_URL) - Stripe — Payments (
STRIPE_SECRET_KEY) - Resend — Email (
RESEND_TOKEN) - PostHog — Analytics (
NEXT_PUBLIC_POSTHOG_KEY) - Sentry — Error tracking (
SENTRY_DSN)
Scripts
pnpm setup # Create .env.local files from .env.example
pnpm dev # Start all apps in dev mode
pnpm build # Build all apps
pnpm migrate # Push database schema changes
pnpm clean # Clean all node_modulesLicense
MIT
