This template repository helps you quickly bootstrap MVP applications with a professional, production-ready foundation.
- Save time: Skip boilerplate configuration and start building immediately
- Best practices: Follows industry standards for Docker, CI/CD, and application architecture
- Flexibility: Easily customize while maintaining a solid foundation
- Full-stack: Includes both frontend (Next.js) and backend (FastAPI) with proper integration
- Click the "Use this template" button at the top of this repository
- Name your new repository and create it
- Clone your new repository locally
- Customize according to your project needs (see Customization Guide below)
- Docker & Docker Compose (v20.10.0+)
- Python (3.11+)
- Node.js (18.0.0+)
- Frontend: Next.js with TypeScript, ready for modern UI development
- Backend: FastAPI for building high-performance APIs
- Docker: Development and production configurations
- Environment Management: Properly separated dev/prod environments
/
├── frontend/ # Next.js frontend application
│ ├── src/
│ │ ├── app/ # Next.js App Router
│ │ │ ├── components/ # React components
│ │ │ ├── stores/ # State management
│ │ │ └── types/ # TypeScript type definitions
│ ├── Dockerfile # Production Docker configuration
│ └── Dockerfile.dev # Development Docker configuration
│
├── backend/ # FastAPI backend application
│ ├── api/ # API endpoints and configuration
│ ├── services/ # Business logic and services
│ ├── Dockerfile # Production Docker configuration
│ └── Dockerfile.dev # Development Docker configuration
│
├── scripts/ # Utility scripts for setup/management
├── docs/ # Documentation
│ └── assets/ # Images and other documentation assets
│
├── docker-compose.yml # Production Docker Compose configuration
├── docker-compose.dev.yml # Development Docker Compose configuration
└── .env.example # Example environment variables
Copy the .env.example file to both .env.development and .env:
cp .env.example .env.development
cp .env.example .envThe .env file is used by Docker Compose for variable substitution in the compose files. The .env.development file can be used for any additional environment-specific configuration.
Edit these files to add your specific API keys and configuration.
- Update this README.md with your project details
- Modify the package.json and pyproject.toml with your project name/details
The backend is organized to make extension easy:
- Add new endpoints in
backend/api/routes.py - Create new services in
backend/services/ - Configure API settings in
backend/api/config.py
The frontend uses Next.js App Router architecture:
- Add components in
frontend/src/app/components/ - Create new pages by adding folders to
frontend/src/app/ - Define types in
frontend/src/app/types/ - Manage state with Zustand in
frontend/src/app/stores/
Start the development environment:
docker compose -f docker-compose.dev.yml upOr rebuild containers (needed after dependency changes):
docker compose -f docker-compose.dev.yml up --buildThe application will be available at:
- Frontend: http://localhost:3000
- Backend: http://localhost:8000
- Backend API docs: http://localhost:8000/docs
To stop the containers:
docker compose -f docker-compose.dev.yml downdocker compose -f docker-compose.yml upNote: Make sure to create and configure a .env.production file for production deployments.
If you see errors like '${BACKEND_PORT}' is not a valid integer or variables not being set:
-
Ensure you have created a
.envfile (not just.env.development):cp .env.example .env
-
If you previously built containers with incorrect configuration, rebuild them:
docker compose -f docker-compose.dev.yml down docker compose -f docker-compose.dev.yml up --build
If you encounter ESLint or dependency version conflicts:
- The
eslint-config-nextversion should match your Next.js version - Check
frontend/package.jsonand ensure version compatibility - Run
npm installin the frontend directory to regeneratepackage-lock.json
This template is released under the Apache-2.0 License. See the LICENSE file for details.