@brandondev12345/stackforge-cli
v2.2.9
Published
Build your full-stack with any combination: React/Next.js + Go/Gin, Node/Hono, or Django
Maintainers
Readme
StackForge CLI v2.0
Build your full-stack with any combination of frontend and backend
███████╗████████╗ █████╗ ██████╗██╗ ██╗
██╔════╝╚══██╔══╝██╔══██╗██╔════╝██║ ██╔╝
███████╗ ██║ ███████║██║ █████╔╝
╚════██║ ██║ ██╔══██║██║ ██╔═██╗
███████║ ██║ ██║ ██║╚██████╗██║ ██╗
╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝
███████╗ ██████╗ ██████╗ ██████╗ ███████╗
██╔════╝██╔═══██╗██╔══██╗██╔════╝ ██╔════╝
█████╗ ██║ ██║██████╔╝██║ ███╗█████╗
██╔══╝ ██║ ██║██╔══██╗██║ ██║██╔══╝
██║ ╚██████╔╝██║ ██║╚██████╔╝███████╗
╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
Build your stack, forge your futureOverview
StackForge is a professional-grade CLI that generates production-ready full-stack projects with your choice of frontend and backend technologies. Mix and match to create your perfect stack with enterprise features built-in.
Supported Combinations
| Frontend | Backend | Status | |----------|---------|--------| | React/Next.js 15 | Go/Gin | ✅ Available | | React/Next.js 15 | Node/Hono | ✅ Available | | React/Next.js 15 | Python/Django | ✅ Available | | None (API only) | Go/Gin | ✅ Available | | None (API only) | Node/Hono | ✅ Available | | None (API only) | Python/Django | ✅ Available | | Vue/Nuxt | Any | 🚧 Coming soon |
Quick Start
Interactive Mode
# Using npx (recommended)
npx stackforge-cli my-app
# Or install globally
npm install -g stackforge-cli
stackforge my-appUsing Presets (Fast)
# Full SaaS with Go backend
stackforge --preset saas-go my-saas
# Full SaaS with Django backend
stackforge -p saas-django my-saas
# API-only microservice
stackforge -p api-node my-api
# Minimal starter for prototyping
stackforge -p minimal -y quick-startAvailable Presets
| Preset | Description | Stack |
|--------|-------------|-------|
| saas-go | Full SaaS with Go | Next.js + Go/Gin + PostgreSQL + JWT + Redis |
| saas-node | Full SaaS with Node | Next.js + Node/Hono + PostgreSQL + JWT + Redis |
| saas-django | Full SaaS with Django | Next.js + Django + PostgreSQL + JWT + Celery |
| api-go | Go microservice | Go/Gin + PostgreSQL + JWT + Prometheus |
| api-node | Node microservice | Node/Hono + PostgreSQL + JWT |
| api-django | Django REST API | Django DRF + PostgreSQL + JWT |
| minimal | Quick prototype | Next.js + Node/Hono + SQLite |
| enterprise | All features | Next.js + Go + PostgreSQL + All Auth + All Features |
Tech Stack
Frontend (React/Next.js)
- Next.js 15 with App Router
- React 19 with Server Components
- TypeScript 5.7 strict mode
- Tailwind CSS 3.4 with dark mode
- shadcn/ui component library
- TanStack Query v5 for data fetching
- Zustand for state management
- React Hook Form + Zod for type-safe forms
Backend (Go/Gin)
- Go 1.22+ with Gin framework
- Clean Architecture (handlers, usecases, repositories)
- SQLC for type-safe SQL queries
- Zap structured logging
- JWT with access + refresh tokens
- Air for hot reload development
- Asynq for background jobs with Redis
Backend (Node/Hono)
- Hono ultra-fast web framework
- Prisma ORM with migrations
- TypeScript end-to-end type safety
- BullMQ for job queues
- Winston logging
Backend (Python/Django)
- Django 5.0+ with Django REST Framework
- djangorestframework-simplejwt for JWT auth
- Celery + Redis for background tasks
- drf-spectacular for OpenAPI docs
- Gunicorn production server
Infrastructure
- Docker & Docker Compose
- PostgreSQL / MySQL / SQLite database options
- Redis for caching, sessions, and queues
- Prometheus + Grafana monitoring stack
- OpenAPI 3.1 specification auto-generation
CLI Commands
# Create a new project
stackforge [project-name]
# Create with preset
stackforge --preset <preset-name> [project-name]
stackforge -p <preset-name> [project-name]
# Skip prompts (use preset defaults)
stackforge -p minimal -y my-app
# List available templates
stackforge list
# Show available presets
stackforge presets
# Check system requirements
stackforge doctor
# Show environment info
stackforge info
# Show help
stackforge --helpProject Structure
Generated Project (React + Go)
my-app/
├── frontend/ # Next.js 15 application
│ ├── app/ # App Router pages
│ ├── components/ # React components
│ │ └── ui/ # shadcn/ui components
│ ├── lib/
│ │ ├── api/ # Generated API client
│ │ └── store.ts # Zustand stores
│ ├── package.json
│ └── Dockerfile
│
├── backend/ # Go/Gin API
│ ├── cmd/api/ # Application entrypoint
│ │ └── main.go
│ ├── internal/
│ │ ├── config/ # Configuration
│ │ ├── domain/ # Entities & interfaces
│ │ ├── usecase/ # Business logic
│ │ ├── repository/ # Data access
│ │ ├── handler/ # HTTP handlers
│ │ └── infrastructure/ # External services
│ ├── pkg/ # Shared utilities
│ ├── db/
│ │ ├── migrations/ # SQL migrations
│ │ └── queries/ # SQLC queries
│ ├── go.mod
│ ├── Makefile
│ └── Dockerfile
│
├── api/
│ └── openapi.yaml # OpenAPI specification
│
├── monitoring/ # (if enabled)
│ ├── prometheus.yml
│ └── grafana/dashboards/
│
├── docker-compose.yml # All services
├── .env.example # Environment template
├── .env # Local environment
├── README.md # Project documentation
└── stackforge.config.json # StackForge metadataGenerated Project (React + Django)
my-app/
├── frontend/ # Next.js 15 application
│ └── ...
│
├── backend/ # Django application
│ ├── manage.py
│ ├── config/
│ │ ├── settings/
│ │ │ ├── base.py # Common settings
│ │ │ ├── development.py
│ │ │ └── production.py
│ │ ├── urls.py
│ │ └── wsgi.py
│ ├── apps/
│ │ ├── core/ # Health checks, exceptions
│ │ ├── users/ # User management
│ │ └── authentication/ # JWT auth (if enabled)
│ ├── requirements.txt
│ ├── Makefile
│ └── Dockerfile
│
└── ...Development
Starting the Project
cd my-app
# Start infrastructure (database, redis)
docker-compose up -d database redis
# For Go backend
cd backend && make dev
# For Node backend
cd backend && pnpm dev
# For Django backend
cd backend && make dev
# Start frontend (in another terminal)
cd frontend && pnpm install && pnpm devAvailable URLs
| Service | URL | |---------|-----| | Frontend | http://localhost:3001 | | Backend API (Go) | http://localhost:8080 | | Backend API (Node) | http://localhost:3000 | | Backend API (Django) | http://localhost:8000 | | API Docs (Swagger) | http://localhost:{port}/swagger | | Prometheus | http://localhost:9090 | | Grafana | http://localhost:3100 |
Backend Commands
Go (Makefile)
make dev # Run with hot reload (Air)
make build # Build binary
make test # Run tests
make lint # Run linter
make sqlc # Generate SQLC code
make swagger # Generate Swagger docs
make migrate # Run migrationsNode (package.json)
pnpm dev # Run with hot reload
pnpm build # Build TypeScript
pnpm test # Run tests
pnpm db:push # Push Prisma schema
pnpm db:studio # Open Prisma StudioDjango (Makefile)
make dev # Run development server
make test # Run tests
make migrate # Run migrations
make shell # Django shell
make celery # Start Celery worker
make celery-beat # Start Celery beatAPI Endpoints
Authentication (JWT)
| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | /api/auth/register | Register new user |
| POST | /api/auth/login | Login and get tokens |
| POST | /api/auth/refresh | Refresh access token |
| POST | /api/auth/logout | Logout (blacklist token) |
| GET | /api/auth/me | Get current user |
| POST | /api/auth/change-password | Change password |
Users
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | /api/users | List users (paginated) |
| GET | /api/users/:id | Get user by ID |
| POST | /api/users | Create user |
| PUT | /api/users/:id | Update user |
| DELETE | /api/users/:id | Delete user |
Health
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | /api/health | Health check |
Features
Authentication Options
- JWT - Access + refresh tokens with blacklist
- OAuth2 - Google, GitHub providers
- OIDC - Keycloak, Auth0 integration
- LDAP - Active Directory support
Background Jobs
- Go: Asynq + Redis
- Node: BullMQ + Redis
- Django: Celery + Redis
Monitoring
- Prometheus metrics at
/metrics - Pre-configured Grafana dashboards
- Request/response logging
- Error tracking ready
Database
- PostgreSQL (recommended)
- MySQL
- SQLite (development only)
- Type-safe queries (SQLC/Prisma/Django ORM)
Architecture
Clean Architecture (Go)
┌─────────────────────────────────────────────────────────────┐
│ HTTP Layer │
│ (handlers, middleware, router) │
├─────────────────────────────────────────────────────────────┤
│ Use Cases │
│ (business logic, orchestration) │
├─────────────────────────────────────────────────────────────┤
│ Domain Layer │
│ (entities, repository interfaces) │
├─────────────────────────────────────────────────────────────┤
│ Infrastructure │
│ (database, external services, logger) │
└─────────────────────────────────────────────────────────────┘Django Apps Structure
apps/
├── core/ # Shared utilities, exceptions
├── users/ # User model, CRUD
├── authentication/ # JWT auth views
└── tasks/ # Celery tasks (if async enabled)Configuration
Environment Variables
# App
NODE_ENV=development
# Frontend
NEXT_PUBLIC_API_URL=http://localhost:8080
# Backend
API_PORT=8080
# Database
DATABASE_URL=postgresql://user:password@localhost:5432/mydb
DATABASE_HOST=localhost
DATABASE_PORT=5432
DATABASE_USER=user
DATABASE_PASSWORD=password
DATABASE_NAME=mydb
# JWT
JWT_SECRET=your-secret-key-min-32-chars
JWT_ACCESS_EXPIRY=15m
JWT_REFRESH_EXPIRY=7d
# Redis
REDIS_URL=redis://localhost:6379
# Django specific
DJANGO_SETTINGS_MODULE=config.settings.development
SECRET_KEY=your-django-secret-keySystem Requirements
Run stackforge doctor to check your system:
- Node.js 18+ (required)
- pnpm/npm/yarn (any one)
- Go 1.22+ (for go-gin backend)
- Python 3.11+ (for django backend)
- Docker (optional, for containers)
Contributing
Contributions are welcome! Please read our contributing guidelines.
# Clone the repo
git clone https://github.com/your-username/stackforge-cli
# Install dependencies
pnpm install
# Run in development
pnpm dev
# Build
pnpm buildLicense
MIT © 2024
Roadmap
- [x] React/Next.js frontend
- [x] Go/Gin backend with Clean Architecture
- [x] Node/Hono backend
- [x] Python/Django backend
- [x] Professional CLI interface
- [x] Preset configurations
- [ ] Vue/Nuxt frontend support
- [ ] GraphQL option
- [ ] Kubernetes manifests
- [ ] CI/CD templates (GitHub Actions, GitLab CI)
- [ ] Terraform infrastructure
- [ ] SvelteKit frontend
Built with ❤️ by the StackForge team
