create-nextforge
v1.3.4
Published
π NEXTFORGE Architecture - Forge your next-gen e-commerce and SaaS app with speed and power. Use: npx create-nextforge@latest
Maintainers
Readme
create-nextforge
π NEXTFORGE Architecture - Forge your next-gen app with speed and power. The ultimate full-stack foundation for modern e-commerce and SaaS applications
β οΈ Important: Use
npx create-nextforge@latestto create a new project, NOTnpm i create-nextforge
What is NEXTFORGE?
NEXTFORGE is a battle-tested, production-ready architecture that combines the best modern technologies to create a powerful foundation for e-commerce platforms and SaaS applications. Whether you're building the next Shopify, Stripe, or any complex business application, NEXTFORGE provides the robust infrastructure you need.
π― Perfect for:
- E-commerce platforms - Online stores, marketplaces, multi-vendor platforms
- SaaS applications - Business tools, productivity apps, subscription services
- Content management - Blogs, corporate websites, documentation sites
- Complex business applications - CRM, ERP, analytics dashboards
ποΈ Architecture Overview
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Frontend β β Backend β β Infrastructure β
β Next.js 15 βββββΊβ Payload CMS 3.0βββββΊβ Docker β
β React 19 β β PostgreSQL β β PostgreSQL β
β TailwindCSS β β GraphQL API β β Redis β
β TanStack Query β β TypeScript β β N8N β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββπ Quick Start
Installation
# Using npm (recommended)
npx create-nextforge@latest
# Alternative npm syntax
npm create nextforge@latest
# Using bun
bunx create-nextforge@latest
# Using yarn
yarn create nextforge@latest
# Using pnpm
pnpm create nextforge@latestUsage
Interactive Mode
bunx create-nextforge@latestWith Command Line Options
bunx create-nextforge@latest my-saas-app --directory ./my-saas-app --skip-installAvailable Options
--template <template>- Template to use (default:default)--directory <directory>- Directory to create the project in--skip-install- Skip dependency installation--skip-git- Skip git repository initialization
π Project Structure
After project creation, you'll get this enterprise-ready structure:
my-nextforge-app/
βββ frontend/ # Next.js application
β βββ src/
β β βββ app/ # App Router (Next.js 15)
β β βββ components/ # Reusable UI components
β β βββ providers/ # Context providers (TanStack Query)
β βββ public/ # Static assets
β βββ package.json
βββ backend/ # Payload CMS backend
β βββ src/
β β βββ app/ # API routes
β β βββ collections/ # Data models (Products, Users, Orders, etc.)
β β βββ payload.config.ts
β βββ package.json
βββ infra/ # Docker infrastructure
β βββ docker-compose.yml
β βββ redis.conf/
βββ scripts/ # Management scripts
β βββ start-all.sh
β βββ start-dev.sh
β βββ stop-all.sh
βββ workflows/ # N8N automation workflows
βββ package.json # Root package.json
βββ README.mdβ‘ Getting Started
Create your project:
bunx create-nextforge@latest my-ecommerce-store cd my-ecommerce-storeInstall dependencies:
bun run setupStart development:
bun run devAccess your services:
- Frontend: http://localhost:3000
- Backend (Payload CMS): http://localhost:3001
- N8N Workflows: http://localhost:5678
π οΈ Available Commands
Main Commands
bun run dev- Start development server (without Docker)bun run start- Start all services via Dockerbun run stop- Stop all servicesbun run restart- Restart all servicesbun run logs- View service logs
Development Commands
bun run dev:frontend- Start frontend onlybun run dev:backend- Start backend onlybun run dev:local- Start frontend and backend locally
Docker Commands
bun run docker:up- Start infrastructure via Dockerbun run docker:down- Stop Docker containersbun run docker:build- Build Docker imagesbun run docker:logs- View Docker logs
π§ Configuration
Environment Variables
Backend (.env)
PAYLOAD_SECRET=your-secret-key-here
DATABASE_URI=postgresql://admin:StrongPass@localhost:5432/nextforge
# Next.js Configuration
NEXT_PUBLIC_SERVER_URL=http://localhost:3001
NEXT_PUBLIC_PAYLOAD_URL=http://localhost:3001
# Development
NODE_ENV=developmentFrontend (.env.local)
NEXT_PUBLIC_API_URL=http://localhost:3001
NEXT_PUBLIC_PAYLOAD_URL=http://localhost:3001Workflows (.env)
N8N_HOST=localhost
N8N_PORT=5678
N8N_PROTOCOL=http
N8N_EDITOR_BASE_URL=http://localhost:5678
# Database
DB_TYPE=postgresdb
DB_POSTGRESDB_HOST=localhost
DB_POSTGRESDB_PORT=5432
DB_POSTGRESDB_DATABASE=nextforge
DB_POSTGRESDB_USER=admin
DB_POSTGRESDB_PASSWORD=StrongPass
# Redis
QUEUE_BULL_REDIS_HOST=localhost
QUEUE_BULL_REDIS_PORT=6379ποΈ Technology Stack
Frontend
- Next.js 15 - React framework with App Router
- React 19 - Latest React with concurrent features
- TypeScript - Type-safe JavaScript
- TailwindCSS 4 - Utility-first CSS framework
- TanStack Query - Server state management
- Shadcn/ui - Beautiful, accessible UI components
Backend
- Payload CMS 3.0 - Headless CMS with admin panel
- PostgreSQL - Robust relational database
- GraphQL - Flexible API layer
- Lexical - Rich text editor
- TypeScript - Full type safety
Infrastructure
- Docker - Containerization
- PostgreSQL - Primary database
- Redis - Caching and session storage
- N8N - Workflow automation and integrations
Development Tools
- Bun - Fast JavaScript runtime and package manager
- ESLint - Code linting
- Prettier - Code formatting
- TypeScript - Type checking
π― Why NEXTFORGE for E-commerce & SaaS?
β Built for Scale
- Microservices architecture - Independent scaling of frontend and backend
- Docker containerization - Easy deployment and scaling
- PostgreSQL - Handles complex business data relationships
- Redis caching - Fast response times for high-traffic applications
β Developer Experience
- Full TypeScript - Catch errors at compile time
- Hot reloading - Instant feedback during development
- Modern tooling - Bun, ESLint, Prettier for fast development
- Comprehensive scripts - One-command setup and deployment
β Business Features
- Payload CMS - Built-in admin panel for content management
- N8N Integration - Automate business processes and integrations
- GraphQL API - Flexible data fetching for complex UIs
- Rich text editing - Lexical editor for content creation
β Production Ready
- Security - Built-in authentication and authorization
- Performance - Optimized for speed and SEO
- Monitoring - Logging and error tracking
- Deployment - Docker-based deployment strategy
π Requirements
- Node.js >= 18.0.0
- Bun (recommended) or npm/yarn/pnpm
- Docker and Docker Compose
- Git
π Deployment
NEXTFORGE is designed for easy deployment on:
- Vercel (Frontend)
- Railway/Render (Backend)
- AWS/GCP/Azure (Full stack)
- DigitalOcean (VPS deployment)
π€ Support
Need help? We're here for you:
Create by komvnich
π License
MIT License - see LICENSE file for details.
π€ Contributing
We welcome contributions! Please read CONTRIBUTING.md for information on how to contribute to the project.
Built with β€οΈ for the modern web development community
Start building your next big e-commerce or SaaS application today with NEXTFORGE!
