A comprehensive, production-ready full-stack starter template designed for modern web development. This project serves as an excellent learning resource and starting point for developers working with cutting-edge technologies.
- Next.js 16 - The React framework for production with App Router
- React 19 - A JavaScript library for building user interfaces
- TailwindCSS 4 - Utility-first CSS framework
- TypeScript - Type-safe JavaScript
- Redux Toolkit - Modern Redux state management
- Shadcn/UI - Beautifully designed components built with Radix UI
- Radix UI - Accessible UI component primitives
- next-intl - Internationalization for Next.js
- Lucide React - Beautiful & consistent icon toolkit
- Fastify - Fast and low overhead web framework
- Drizzle ORM - TypeScript ORM with excellent performance
- Better-Auth - Modern authentication library
- Zod - TypeScript-first schema validation
- Pino - Super fast JSON logger
- OpenAPI - API documentation standard
- Scalar - Beautiful API documentation
- Docker - Containerization platform
- Traefik - Modern reverse proxy and load balancer
- Valkey - High-performance in-memory data store
- PostgreSQL - Robust relational database
- ELK Stack - Elasticsearch, Logstash, Kibana for monitoring
- Biome - Ultra-fast formatter and linter written in Rust
- TypeScript - Static type checking
- Turbopack - Next.js Turbo build system
- Multi-stage Docker builds - Optimized container images
- Hot reloading - Fast development experience
This setup provides a complete, production-ready foundation for modern web applications with excellent developer experience and performance.
- Docker and Docker Compose
- Node.js 18+ (for local development)
- Git
git clone <repository-url>
cd fullstack_basic_starter# Copy environment template
cp .env.placeholder .env
# Edit environment variables
nano .envThe start.sh script provides a convenient way to start the application with various options:
# Start in development mode (default)
./start.sh
# Start in production mode
./start.sh -e production
# Start in development with watch mode (auto-reload on changes)
./start.sh -w
# Clean build (removes existing containers and images)
./start.sh -c
# Combine options
./start.sh -e production -c
# Show all available options
./start.sh -hAvailable Options:
-e, --env- Set environment (development|production) [default: development]-w, --watch- Enable watch mode for automatic reload during development-c, --clean- Clean build (removes existing containers and images before starting)-h, --help- Display help message with all options
Manual Docker Compose:
# Without the start.sh script
docker compose -f compose.yaml -f compose_override/development.yaml up --build# Populate database with initial data
./populate.sh# Frontend development
cd app
npm run dev
# Backend development
cd api
npm run dev
# Linting and formatting (using Biome)
cd app # or cd api
npm run check # Check and auto-fix
npm run format # Format code
npm run lint # Lint onlyOnce the application is running, you can access the following services:
| Service | URL | Description |
|---|---|---|
| Frontend | http://localhost | Next.js application with React 19 |
| API | http://localhost/api | Fastify REST API with OpenAPI docs |
| API Docs | http://localhost/reference | Interactive Scalar API documentation |
| Traefik Dashboard | http://localhost:8080 | Reverse proxy management interface |
| Elasticsearch | http://localhost:9200 | Search and analytics engine |
| Kibana | http://localhost:5601 | Data visualization and monitoring |
fullstack_basic_starter/
βββ app/ # Next.js frontend application
β βββ src/
β β βββ app/ # App Router pages and layouts
β β βββ components/ # React components
β β βββ redux/ # Redux Toolkit state management
β β βββ styles/ # Global styles
β β βββ i18n/ # Internationalization setup
β β βββ utils/ # Utility functions and helpers
β βββ public/ # Static assets
β βββ messages/ # Translation files
β βββ Dockerfile # Frontend container configuration
βββ api/ # Fastify backend API
β βββ routes/ # API route handlers
β βββ services/ # Business logic services
β βββ middleware/ # Fastify middleware
β βββ utils/ # Utility functions
β βββ Dockerfile # Backend container configuration
βββ backoffice/ # Admin dashboard (future implementation)
βββ compose_override/ # Docker Compose environment overrides
β βββ development.yaml # Development configuration
β βββ production.yaml # Production configuration
βββ compose.yaml # Base Docker Compose configuration
βββ biome.json # Biome formatter/linter configuration
βββ start.sh # Application startup script
βββ README.md # This file
- π¨ Modern UI - TailwindCSS 4 with Shadcn/UI components built on Radix UI
- π Internationalization - Multi-language support with next-intl
- π± Responsive Design - Mobile-first approach
- π State Management - Redux Toolkit for predictable state updates
- π― Type Safety - Full TypeScript support
- β‘ Performance - Optimized with Next.js App Router, React Server Components, and Turbopack
- π High Performance - Fastify with excellent benchmarks
- π Authentication - Better-Auth with modern security
- π API Documentation - Auto-generated OpenAPI/Scalar docs
- ποΈ Database ORM - Drizzle ORM with type safety
- π Logging - Structured logging with Pino
- β Validation - Zod schema validation
- π³ Containerized - Multi-stage Docker builds
- π Code Quality - Biome for ultra-fast linting and formatting
- π Monitoring - ELK stack for observability
- π Hot Reload - Fast development with Turbopack
- π‘οΈ Security - Production-ready configurations
This project is perfect for learning modern web development concepts:
- Database Transactions - Implement with Drizzle ORM transactions
- Admin Dashboard - Complete the backoffice implementation with user management
- Real-time Features - Add WebSocket support with Socket.io
- Testing - Implement unit and integration tests with Vitest/Jest
- CI/CD - Set up GitHub Actions workflows
- Advanced Auth - OAuth providers, 2FA, session management with Better-Auth
- Server Components - Leverage Next.js Server Components for optimal performance
- Testing Suite - Jest/Vitest integration
- CI/CD Pipeline - GitHub Actions workflows
- Real-time Features - WebSocket support
- Advanced Monitoring - APM and metrics
- Microservices - Service decomposition
- Cloud Deployment - Kubernetes manifests
# Check, lint, and format with Biome
cd app # or cd api
npm run check # Run checks and auto-fix issues
npm run format # Format code only
npm run lint # Lint code only
# Type check
npx tsc --noEmitBasic Operations:
# Build images for development environment
docker compose -f compose.yaml -f compose_override/development.yaml build
# Start services (detached mode)
docker compose -f compose.yaml -f compose_override/development.yaml up -d
# Start services with build and watch logs
docker compose -f compose.yaml -f compose_override/development.yaml up --build
# Stop services
docker compose -f compose.yaml -f compose_override/development.yaml down
# Stop services and remove volumes
docker compose -f compose.yaml -f compose_override/development.yaml down -vService Management:
# Start specific service
docker compose -f compose.yaml -f compose_override/development.yaml up app
# Restart a specific service
docker compose -f compose.yaml -f compose_override/development.yaml restart api
# Rebuild and restart a specific service
docker compose -f compose.yaml -f compose_override/development.yaml up --build -d app
# Scale a service (if applicable)
docker compose -f compose.yaml -f compose_override/development.yaml up -d --scale api=3Logs and Monitoring:
# View all logs (follow mode)
docker compose -f compose.yaml -f compose_override/development.yaml logs -f
# View logs for specific service
docker compose -f compose.yaml -f compose_override/development.yaml logs -f app
# View last 100 lines of logs
docker compose -f compose.yaml -f compose_override/development.yaml logs --tail=100
# View logs with timestamps
docker compose -f compose.yaml -f compose_override/development.yaml logs -f -tDebugging and Maintenance:
# Execute command in running container
docker compose -f compose.yaml -f compose_override/development.yaml exec api sh
# List all running containers
docker compose -f compose.yaml -f compose_override/development.yaml ps
# Check service status
docker compose -f compose.yaml -f compose_override/development.yaml ps -a
# View container resource usage
docker stats
# Run commands in a specific service
docker compose -f compose.yaml -f compose_override/development.yaml exec app npm run buildCleanup:
# Remove stopped containers
docker compose -f compose.yaml -f compose_override/development.yaml rm
# Remove all containers, networks, and volumes
docker compose -f compose.yaml -f compose_override/development.yaml down -v --remove-orphans
# Clean up Docker system (use with caution)
docker system prune -f
# Remove all unused images
docker image prune -a
# Remove specific image
docker rmi <image_id>Production Environment:
# Start in production mode
docker compose -f compose.yaml -f compose_override/production.yaml up --build -d
# View production logs
docker compose -f compose.yaml -f compose_override/production.yaml logs -f
# Stop production services
docker compose -f compose.yaml -f compose_override/production.yaml downWe welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the existing code style
- Add tests for new features
- Update documentation as needed
- Ensure all checks pass
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js Team for the amazing framework
- React Team for the powerful UI library
- Fastify Team for the high-performance server
- Biome Team for the ultra-fast formatter and linter
- All contributors and the open-source community
β Star this repository if you find it helpful!