Fast to start, easy to build, ready for production
NextPress implements true polyrepo architecture within a single repository structure, giving you:
- 🏗️ Polyrepo Benefits: Independent frontend and backend codebases with separate dependencies
- 🔄 Single Repository Workflow: The convenience of a monorepo with polyrepo architecture principles
- 🧩 Separation of Concerns: Clear boundaries between Next.js frontend and Express backend
- 🛠️ Independent Versioning: Each project can evolve at its own pace
- ⚡ Zero Configuration: Immediate productivity with no manual setup
- 📱 Production-Ready Structure: Best practices for enterprise application development
- ⚡ Next.js Frontend with TypeScript & complete project structure
- 🚀 Express Backend with TypeScript, Prisma & API setup
- 📦 Polyrepo-in-Repo Structure: Independent projects sharing one repository
- 🔄 Isolated Dependencies: Each project manages its own packages
- 🌐 API-Ready: Express configured for RESTful API development
- 🔒 Environment Setup: Pre-configured dotenv for secure variable management
- 📊 Database Integration: Prisma ORM configured and ready for your models
- 🛠️ CLI Tool: Includes
nextpressx
for streamlined development workflows - 🛠️ Fast Development: Start quickly with zero configuration needed
Create a new NextPress Monorepo project with a single command:
npx create-nextpress
Or use with your preferred package manager:
# Using npm
npm create nextpress@latest
# Using yarn
yarn create nextpress
# Using pnpm
pnpm create nextpress
# Using bun
bunx create-nextpress
- Run the command above
- Enter your project name (e.g.,
my-awesome-project
) - Select your preferred package manager:
- npm
- yarn
- pnpm
- bun
- Wait for automatic project structure creation
- Install dependencies:
cd my-project npm install # or yarn, pnpm install, bun install
- Start development:
npm run dev # or yarn dev, pnpm dev, bun dev
- Open http://localhost:3000 for the frontend and http://localhost:3001 for the backend!
# Create in current directory
npx create-nextpress@latest .
# Create with specific name
npx create-nextpress@latest my-project
# Enable debug mode to see detailed logs
npx create-nextpress@latest my-project --debug
# Check CLI version
npx create-nextpress@latest --version
my-project/ # The single repository containing polyrepo architecture
├── .env # Root environment variables
├── apps/ # Applications directory
│ ├── client/ # Independent Next.js Frontend Project
│ │ ├── src/ # Source directory
│ │ │ ├── app/ # Next.js App Router
│ │ │ └── ... # Additional source files
│ │ ├── next.config.ts # Next.js configuration
│ │ ├── package.json # Frontend's independent dependencies
│ │ └── tsconfig.json # Frontend's TypeScript configuration
│ │
│ └── server/ # Independent Express Backend Project
│ ├── src/ # Source directory
│ │ ├── server.ts # Express server entry point
│ │ └── ... # Additional source files
│ ├── package.json # Backend's independent dependencies
│ └── tsconfig.json # Backend's TypeScript configuration
│
│
├── package.json # Root orchestration package.json (not a traditional workspace)
└── README.md # Project documentation
Each project directory is a fully independent application that could be extracted to its own repository if needed in the future - true polyrepo architecture in a single repository.
- Node.js 18.0.0 or later
- macOS, Windows, or Linux
- Supported package manager (npm, yarn, pnpm, or bun)
NextPress combines the best of both worlds: it structures your application as truly independent projects (polyrepo approach) but keeps them in one cohesive repository. Unlike traditional monorepos with shared dependencies and tight coupling, NextPress maintains complete isolation between frontend and backend with their own independent package.json files, dependencies, build processes, and deployment pipelines - all while providing the convenience of a single codebase.
The frontend (Next.js) and backend (Express) are configured as separate applications that can communicate via API calls. The backend exposes RESTful API endpoints that the frontend can consume.
Absolutely! NextPress follows best practices for both frontend and backend development, making it suitable for production applications of any size.
Edit the pkg/prisma/schema.prisma
file to configure your database connection. NextPress supports PostgreSQL, MySQL, SQLite, SQL Server, MongoDB, and CockroachDB through Prisma.
We welcome contributions! Please see our contributing guidelines for details.
Nextpress.cc