π§ What I Learned
While building the Luff Microservices Boilerplate, my primary focus was not just on writing code, but on designing a system that is scalable, maintainable, and production-ready.
Here are the key areas I focused on:
π§ End-to-End Architecture & Scalability
Designed a microservices-based system with clear separation of concerns, enabling independent scaling of services.βοΈ CI/CD & DevOps Practices
Implemented modern development workflows including automated setups, containerization, and deployment-ready infrastructure.
This project helped me understand how real-world systems are structured beyond just frontend and backend covering infrastructure, deployment, and system design.
π Description
A modern, production-grade microservices monorepo designed to help developers build scalable applications quickly using Next.js, Express, Prisma, and PostgreSQL all powered by Turborepo and optimized for real-world deployment.
π Check out the package here:
https://www.npmjs.com/package/create-luff-app
π Introduction
Building scalable applications from scratch can be time-consuming and complex. Setting up authentication, APIs, databases, infrastructure, and developer tooling often takes longer than building the actual product.
Thatβs where Luff Microservices Boilerplate comes in.
Itβs a production-ready monorepo designed to eliminate setup friction and let you focus on building features not infrastructure.
β‘ Why Luff Boilerplate?
This boilerplate is built with a strong focus on:
- π Speed β Instant project setup with CLI
- π§± Scalability β Microservices architecture
- π§βπ» Developer Experience β Clean structure + modern tooling
- π Production Readiness β Auth, DB, infra all pre-configured
ποΈ Architecture Overview
The system follows a clean microservices architecture:
- API Gateway handles routing and rate limiting
- Auth Service manages authentication via Google OAuth + JWT
- Posts Service handles blog/content operations
- Frontend App connects everything via a unified UI
This separation ensures:
- Better scalability
- Independent deployments
- Clean service boundaries
π οΈ Tech Stack Breakdown
Frontend
- Next.js (App Router)
- Tailwind CSS
- React Query
Backend
- Node.js + Express
- TypeScript
Database
- PostgreSQL
- Prisma ORM
Authentication
- Google OAuth (PostMessage flow)
- JWT-based sessions
Infrastructure
- Docker (local + production)
- Kubernetes (ArgoCD-ready)
Monorepo
- Turborepo
- npm workspaces
π Quick Start
You can bootstrap your entire project in seconds:
npx create-luff-app my-app
This command:
- Clones the repo
- Installs dependencies
- Sets up project structure
βοΈ Local Development Setup
1. Install Dependencies
npm install
2. Setup Environment
npm run setup
3. Start Databases (Docker)
docker compose -f docker/docker-compose.yml up auth-db posts-db -d
4. Initialize Databases
cd backend/auth && npm run db:push && npm run db:generate
cd backend/posts && npm run db:push && npm run db:generate
5. Run the App
npm run dev
π Services Running Locally
- Frontend β http://localhost:3000
- API Gateway β http://localhost:4000
- Auth Service β http://localhost:4001
- Posts Service β http://localhost:4002
π Project Structure
The monorepo is cleanly organized:
-
frontend/β Next.js app -
backend/auth/β Authentication service -
backend/posts/β Blog service -
backend/api-gateway/β Routing layer -
shared/β Common utilities -
docker/β Container setup -
k8s/β Kubernetes configs
π Authentication Setup
To enable Google OAuth:
- Create credentials in Google Cloud Console
- Add origin:
http://localhost:3000 - Update environment variables:
GOOGLE_CLIENT_ID=
NEXT_PUBLIC_GOOGLE_CLIENT_ID=
π³ Deployment Options
Docker
docker compose up --build
Kubernetes
kubectl apply -f k8s/
π Useful Scripts
-
npm run devβ Start all services -
npm run buildβ Build everything -
npm run setupβ Setup env files -
npm run lintβ Run lint checks
π‘ Final Thoughts
The Luff Microservices Boilerplate is more than just a starter template β itβs a foundation for building real-world scalable systems.
Whether you're:
- Building a SaaS product
- Practicing system design
- Preparing for interviews
- Scaling a side project
This boilerplate gives you a serious head start.
π Start Building Today
Skip the setup. Focus on building.
npx create-luff-app your-app
Top comments (0)