A comprehensive TypeScript monorepo template that combines the power of React and NestJS to accelerate modern web application development.
NestFlux is a full-stack scaffold designed for building scalable applications with:
- ⚛️ React Frontend - Modern React 19 application with TypeScript
- 🚀 NestJS Backend - Robust Node.js server API with NestJS 11
- 🗄️ PostgreSQL Database - Enterprise-grade database with full TypeScript integration
- 📦 Shared Libraries - Common utilities, types, and constants across the entire stack
- 🏗️ Structured Methodology - Feature-based architecture with consistent patterns
- 🧪 Comprehensive Testing - Unit, integration, and E2E testing setup
- 📚 Complete Documentation - Built-in documentation system with Docusaurus
- 100% TypeScript coverage across the entire stack
- Compile-time validation with Zod schemas
- Type-safe API calls between client and server
- Database type safety with Drizzle ORM
- Monorepo setup with shared packages
- Feature-based organization for scalability
- Consistent development patterns across applications
- Clear separation of concerns
- Authentication & Authorization system pre-built
- Security best practices with Helmet and CORS
- Database migrations and schema management
- SSL/TLS configuration for secure connections
- Automated testing with Vitest
- Code quality tools (Biome)
- Comprehensive test coverage
- React 19 - Latest component-based UI library
- TypeScript 5 - Strongly typed JavaScript
- Vite - Lightning-fast build tool
- TanStack Router - Type-safe routing
- TanStack Query - Server state management
- Mantine UI - Comprehensive component library
- Tailwind CSS - Utility-first styling
- NestJS 11 - Progressive Node.js framework
- Node.js 24 - Latest runtime features
- TypeScript 5 - Full backend type safety
- Drizzle ORM - Type-safe database operations
- PostgreSQL - Enterprise database
- Helmet - Security middleware
- pnpm - Fast, efficient package manager
- Vitest - Blazing fast testing framework
- Zod - TypeScript-first schema validation
- Biome - Fast linter and formatter
- Docker - Containerization support
- Node.js 24+ - Latest runtime features
- pnpm 10+ - Package manager
- PostgreSQL - Database instance
-
Clone the repository
git clone https://github.com/TheMineWay/NestFlux.git cd NestFlux -
Install dependencies
pnpm install
-
Set up the database
# Use the built-in CLI to generate PostgreSQL Docker setup pnpm tools -
Configure environment
- Start the documentation:
pnpm start:docs - Navigate to the Tools section
- Use the
Configuration generatortool to generate.envfiles - Place the generated files in their respective project folders:
apps/client/.envfor the React applicationapps/server/.envfor the NestJS API
- Start the documentation:
-
Build packages
pnpm build:packages
-
Start development servers
# Start all services (client, server, packages) pnpm dev # Or start individually: pnpm dev:client # React app at http://localhost:3000 pnpm dev:server # NestJS API at http://localhost:3001 pnpm dev:packages # Watch shared packages
(or start the dev.docker-compose.yml)
-
Start documentation
pnpm start:docs # Documentation at http://localhost:3002
NestFlux is perfect for:
- 🧑💻 Full-stack developers building TypeScript applications
- 👥 Development teams needing standardized project structure
- 🚀 Startups requiring rapid prototyping and scaling
- 🏢 Enterprises demanding maintainable, testable codebases
- 📚 Learners wanting to explore modern full-stack development
NestFlux includes a powerful CLI for project management:
pnpm toolsAvailable features:
- 📝 Project Metadata - Update name and version across all packages
- 🐳 Docker Generation - Generate PostgreSQL setup with SSL
- 📋 Consistency Checks - Automated validation and testing
Comprehensive testing setup included:
# Run all tests
pnpm test
# Run all tests in watch mode
pnpm test:dev
# Run tests in UI mode
pnpm test:ui- 📖 Full Documentation: Available at
/docswhen runningpnpm start:docs - 🏗️ Architecture Guide: Detailed explanation of project structure
- 🔐 Security Guidelines: Best practices for secure development
- 🔒 SSL/TLS Encryption for all connections
- 🔐 Authentication system with role-based access
- 🛡️ Security headers and CORS configuration
- 📊 Database security with encrypted connections
- 🔑 Environment management for sensitive data
We welcome contributions! Please see our Contributing Guide for details.
This project is licensed under the MIT License.
Built with ❤️ using modern open-source technologies and community best practices.
🚀 Ready to build something amazing? Get started with the documentation and join the NestFlux community!