Production-ready full-stack template with enterprise-grade features, comprehensive monitoring, and modern development practices.
- ποΈ Enterprise Architecture - Clean architecture with proper separation of concerns
- π Security First - JWT authentication, rate limiting, CORS, security headers
- π Full Observability - Prometheus metrics, Grafana dashboards, structured logging
- π§ͺ Testing Excellence - Unit, integration, performance, and load testing
- π DevOps Ready - Docker, CI/CD, automated deployments
- π¨ Modern Frontend - React 19, TypeScript, Chakra UI, Redux Toolkit
- β‘ FastAPI - High-performance async API framework
- ποΈ SQLAlchemy + Alembic - Advanced ORM with migrations
- π Pydantic - Data validation and settings management
- πΎ PostgreSQL - Robust relational database
- π Redis - High-performance caching and sessions
- π° RabbitMQ - Message queue for async processing
- π§ Email Integration - Password reset and notifications
- π JWT Authentication - Secure token-based auth with refresh tokens
- βοΈ React 19 - Latest React with modern features
- π TypeScript - Type-safe development
- π¨ Chakra UI - Beautiful, accessible components
- π Redux Toolkit - Predictable state management
- π React Router - Client-side routing
- π± React Hook Form - Performance forms
- β‘ Vite - Lightning-fast build tool
- π Dark Mode - Built-in theme switching
- π Docker + Docker Compose - Containerized deployment
- π Prometheus - Metrics collection and alerting
- π Grafana - Monitoring dashboards
- π Loki + Promtail - Centralized logging
- π§ GitHub Actions - CI/CD pipelines
- π§ͺ Pytest - Comprehensive testing suite
- π Playwright - E2E testing
- ποΈ Locust - Load testing and performance monitoring
- Python 3.13+ and uv package manager
- Node.js 18+ and npm
- Docker and Docker Compose
git clone https://github.com/lulzseq/fullstack-fastapi-react.git
cd fullstack-fastapi-reactEdit .env file with your settings:
# Security
SECRET_KEY=your-super-secret-key-here
FIRST_SUPERUSER_PASSWORD=your-admin-password
# Database
POSTGRES_PASSWORD=your-db-password
# Email (optional)
SMTP_HOST=smtp.domain.com
SMTP_USER=your-email@domain.com
SMTP_PASSWORD=your-app-password
...# Start all services locally with docker-compose.override.yml
docker compose up -d --build
# Or start production mode with docker-compose.yml
docker compose -f docker-compose.yml up -d --build
# Check status
docker compose ps- Frontend: http://localhost
- API Documentation: http://localhost/api/v1/docs
- Grafana Dashboard: http://localhost:3000 (default admin/admin)
- Prometheus: http://localhost:9090
- RabbitMQ Management: http://localhost:15672 (default guest/guest)
- PgAdmin: http://localhost:5050
backend/
βββ app/
β βββ api/ # API endpoints and routing
β βββ core/ # Configuration and core functionality
β βββ models/ # Domain models and schemas
β βββ repositories/ # Data access layer
β βββ services/ # Business logic layer
β βββ utils/ # Utility functions
β βββ validators/ # Input validation
- JWT tokens with automatic refresh
- Rate limiting with Redis
- CORS configuration
- Security headers middleware
- Password hashing with bcrypt
- Input validation and sanitization
- Metrics: Custom Prometheus metrics for API performance
- Logging: Structured JSON logging with request tracing
- Dashboards: Pre-configured Grafana dashboards
- Health Checks: Comprehensive health monitoring
- Performance Profiling: Built-in profiler for optimization
- Unit Tests: 95%+ code coverage
- Integration Tests: Database and API testing
- Performance Tests: Benchmarking and memory profiling
- Load Tests: Locust-based stress testing
- E2E Tests: Playwright browser automation
- Async/Await: Non-blocking I/O operations
- Connection Pooling: Optimized database connections
- Caching: Redis-based response caching
- Compression: Gzip response compression
- CDN Ready: Static asset optimization
- API Explorer: Interactive endpoint testing interface
- Authentication Flow: Complete login/register/reset password
- Token Refresh: Autoupdate refresh and access tokens
- User Management: Profile management and admin features
- Responsive Design: Mobile-first approach
- Error Handling: Comprehensive error boundaries
- Loading States: Skeleton screens and spinners
- Hot Reload: Instant development feedback
- TypeScript: Full type safety
- ESLint + Prettier: Code formatting and linting
- Bundle Analysis: Webpack bundle analyzer
- Performance Monitoring: Web vitals tracking
cd backend
# Install dependencies
uv sync --all-extras --dev
# Database migrations
uv run alembic upgrade head
# Run development server
uv run fastapi dev
# Run tests with xdist
uv run pytest -n auto -v
# Run with coverage
uv run pytest -n auto --cov=. --cov-report=htmlcd frontend
# Install dependencies
npm install
# Run development server
npm run dev
# Run tests
npm run test
# Build for production
npm run build# Load testing
cd backend/tests/performance/load
locust -f locustfile.py --host=http://localhost:8000
# Memory profiling
cd backend
uv run python -m memory_profiler app/main.py
# Database performance
cd backend/scripts
uv run python analyze_queries.py# Build and deploy
docker compose -f docker-compose.yml up -d --build
# Scale services
docker compose up -d --scale backend=3 --scale frontend=2
# Monitor deployment
docker compose logs -f- Development:
.env.local - Production:
.env.production
- API Performance: Response times, error rates, throughput
- Database: Query performance, connection pool usage
- System: CPU, memory, disk usage
- Business: User registrations, login success rates
- Security: Failed authentication attempts, rate limit hits
- Application Overview: High-level system health
- API Performance: Detailed endpoint metrics
- Database Monitoring: PostgreSQL performance
- Infrastructure: Docker container metrics
- Business Intelligence: User activity and growth
- Unit Tests: Core business logic and utilities
- Integration Tests: Database operations and API endpoints
- Performance Tests: Load testing and benchmarking
- Security Tests: Authentication and authorization
- E2E Tests: Complete user workflows
# Backend tests
cd backend
uv run pytest tests/ -v --cov=app
# Frontend tests
cd frontend
npm run test
# E2E tests
npm run test:e2e
# Performance tests
cd backend/tests/performance
uv run python -m pytest benchmark/This project is licensed under the MIT License - see the LICENSE file for details.
β Star this repository if it helped you build something awesome!




