- Node.js 20+ (required for Next.js 16)
- pnpm (package manager)
- Docker & Docker Compose (optional, for containerized testing)
# Install dependencies
pnpm install
# Start development server
pnpm dev
# Open in browser
# http://localhost:3000- Open http://localhost:3000
- Select stack components:
- Framework: Next.js (required)
- Database: MongoDB (optional)
- Authentication: Auth.js (optional)
- Click "Generate & Download"
- Browser downloads:
BaseCompose-stack.tar.gz
# Extract the archive
tar -xzf BaseCompose-stack.tar.gz
cd project
# View setup instructions
cat SETUP.md
# Install dependencies
pnpm install
# Create environment file
cp .env.example .env.local
# Fill in any required values (OAuth, secrets, etc.)Option A: Local Development (Recommended for fast iteration)
pnpm dev
# Visit http://localhost:3000
# Hot reload enabled, changes reflect immediatelyOption B: Docker Development (Isolated environment)
docker compose -f docker-compose.dev.yml up
# Visit http://localhost:3000
# Includes MongoDB, hot reload via volume mounts# Build and run production image
docker compose -f docker-compose.prod.yml up --build
# Visit http://localhost:3000
# All features enabled with security hardeningOption 1: Change port in docker-compose
# In docker-compose.dev.yml or docker-compose.prod.yml
services:
app:
ports:
- "3001:3000" # Use 3001 instead of 3000Option 2: Stop other services
# List services using port 3000
lsof -i :3000
# Kill process
kill -9 <PID># Check if MongoDB is running
docker compose ps
# View MongoDB logs
docker compose logs mongodb
# Reset MongoDB (caution: deletes data)
docker compose -f docker-compose.dev.yml down -v
docker compose -f docker-compose.dev.yml up
# Check connection string in .env.local
# Should be: mongodb://mongodb:27017/BaseCompose (in Docker)
# Or: mongodb://localhost:27017/BaseCompose (local MongoDB)# Ensure using dev compose file (not prod)
docker compose -f docker-compose.dev.yml up
# Restart container
docker compose -f docker-compose.dev.yml restart app
# Verify volume mounts
docker inspect <container-id> | grep -A 10 "Mounts"
# Check app logs
docker compose logs app# GitHub OAuth not configured?
# 1. Create OAuth app at: https://github.com/settings/developers
# 2. Add GITHUB_ID and GITHUB_SECRET to .env.local
# 3. Set NEXTAUTH_SECRET: openssl rand -hex 32
# 4. Restart app: docker compose restart app# Reinstall if node_modules corrupted
rm -rf node_modules .next
pnpm install
pnpm dev
# In Docker:
docker compose down -v
docker compose -f docker-compose.dev.yml up --build# Install dependencies
pnpm install
# Start dev server with hot reload
pnpm dev
# Build for production
pnpm build
# Start production server
pnpm start
# Run linter
pnpm lint# Development setup
docker compose -f docker-compose.dev.yml up # Start
docker compose -f docker-compose.dev.yml down # Stop
docker compose -f docker-compose.dev.yml down -v # Stop + remove volumes
# Production setup
docker compose -f docker-compose.prod.yml up --build
docker compose -f docker-compose.prod.yml down
# View logs
docker compose logs app # App logs only
docker compose logs mongodb # MongoDB logs only
docker compose logs -f # Follow all logs
# Execute commands in container
docker compose exec app pnpm build
docker compose exec mongodb mongosh # MongoDB shellGenerated Project
├── app/
│ ├── api/
│ │ ├── auth/[...nextauth].ts (if Auth.js selected)
│ │ └── health.ts (demo feature check)
│ ├── lib/
│ │ ├── components/
│ │ │ └── demo-hero.tsx (feature showcase)
│ │ ├── db/
│ │ │ └── mongodb.ts (if MongoDB selected)
│ │ └── auth/
│ │ └── config.ts (if Auth.js selected)
│ ├── layout.tsx
│ └── page.tsx (homepage with DemoHero)
├── public/ (static files)
├── .env.example (environment template)
├── .env.local (create from .env.example)
├── .gitignore
├── Dockerfile (production image)
├── docker-compose.dev.yml (development environment)
├── docker-compose.prod.yml (production environment)
├── docker-compose.yml (default = dev)
├── SETUP.md (comprehensive setup guide)
├── package.json (dependencies)
├── tsconfig.json
└── README.md (project README)
- Best for: Rapid iteration, debugging
- Startup: Instant
- Hot Reload: Yes
- Database: External or local MongoDB
- Docker: Not used
- Command:
pnpm dev
- Best for: Testing with exact production setup
- Startup: ~5-10 seconds (pull images, start containers)
- Hot Reload: Yes (volume mounts)
- Database: MongoDB in container
- Docker: Required
- Command:
docker compose -f docker-compose.dev.yml up
- Best for: Final testing before deployment
- Startup: ~30-60 seconds (build + start)
- Hot Reload: No
- Database: MongoDB with authentication
- Docker: Required
- Command:
docker compose -f docker-compose.prod.yml up --build
Each generated project includes:
- Next.js with App Router
- TypeScript configuration
- Tailwind CSS styling
- ESLint configuration
- Docker support (dev & prod)
- Environment variables setup
- Feature showcase (DemoHero component)
- Health check endpoint (api/health)
Optional features (if selected):
- MongoDB (document database)
- Auth.js (authentication with GitHub OAuth)
-
Configure Environment
cp .env.example .env.local # Fill in required values (OAuth tokens, secrets, etc.) -
Start Development
pnpm install pnpm dev # Visit http://localhost:3000 -
Build Your Features
- Add routes in
app/api/ - Create components in
app/components/ - Build database models in
app/lib/db/(if MongoDB) - Implement authentication flows (if Auth.js)
- Add routes in
-
Deploy
- For Vercel:
git push(automatic) - For Docker:
docker build -t myapp . && docker run -p 3000:3000 myapp - For other platforms: Follow their Next.js deployment guides
- For Vercel:
- SETUP.md - Comprehensive setup guide in every generated project
- DEVELOPMENT.md - Detailed system architecture in this repo
- GENERATION_FLOW.md - Complete generation pipeline visualization
- SYSTEM_STATUS.md - Feature checklist and status
When reporting issues, include:
- What you're trying to do
- What error you see
- Command you ran
- Your environment (OS, Node version, Docker version)
- Generated project structure (for addon-specific issues)
- Check SETUP.md in your generated project first
- Review troubleshooting section above
- Check generated .env.example for required variables
- Verify Docker/MongoDB are running if using containers
- Check logs:
docker compose logs