A production-ready FastAPI template specifically designed for building AI/LLM-powered web applications.
- π€ Optimized for LLM integration and AI workflows
- π FastAPI for high-performance API development
- π¨ Jinja2 templating engine
- π TailwindCSS for utility-first styling
- β‘οΈ Deploy your app in just an hour
Here are some projects based on this template: gitingest.com and gitdiagram.com.
We'd love to see what you build! Share your projects in our Discussions section and become part of our growing ecosystem.
You may copy and paste the following code block to get started:
git clone https://github.com/atyrode/gitemplate.git && cd gitemplate
python -m venv venv && source venv/bin/activate # Windows: `venv\Scripts\activate`
pip install rich
python template.py -i
cd src && python -m uvicorn server.main:app --reloadYou can now start developping in the src/your_package_name/main.py file. This is the entrypoint of your service.
- Production-Ready Structure: Organized project layout following best practices
- Modern Stack:
- FastAPI for high-performance APIs
- Jinja2 templating engine for the front-end
- TailwindCSS for modern styling
- Security:
- Built-in rate limiting
- Trusted host middleware
- Security headers configuration
- CORS configuration
- Environment variables management
- Deployment Ready:
- Docker support with multi-stage builds
- GitHub Actions workflows for:
- CI/CD pipeline
- PyPI publishing
- Docker image building
- Health check endpoints
- Production-grade logging
- Developer Experience:
- Pre-configured development tools:
- Black for code formatting
- isort for import sorting
- pylint for code analysis
- mypy for type checking
- pytest for testing
- Pre-commit hooks for code quality
- Type hints and comprehensive docstrings
- Hot reload during development
- Pre-configured development tools:
- Template System:
- Easy customization through
template.py - Flexible project structure
- Configurable dependencies
- Easy customization through
- Use this template by clicking "Use this template" on GitHub or clone it:
git clone https://github.com/atyrode/gitemplate.git
cd gitemplate- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: `venv\Scripts\activate`
pip install rich # For better logging- Set up your project details in
template.py:
author: "Your Name"
package_name: "your_package"
project_name: "Your Project"
...- Apply the template:
python template.py- Run the development server:
cd src
python -m uvicorn server.main:app --reload --host 0.0.0.0 --port 8000Visit http://localhost:8000 to see your application running!
You can now start developping in the src/your_package_name/main.py file. This is the entrypoint of your service.
pytestThe project uses pre-commit hooks to maintain code quality:
# Format code
black .
# Sort imports
isort .
# Lint code
pylint src/
# Run pre-commit hooks
pre-commit run --all-files
# Or install pre-commit hooks to run automatically
pre-commit installBuild and run using Docker:
docker build -t your-app-name .
docker run -p 8000:8000 your-app-nameContributions are welcome! Please read our Contributing Guidelines for details on how to submit pull requests, report issues, and contribute to the project. In its current state, the file is templated, but it should give you a good starting point.
This project is licensed under the MIT License - see the LICENSE file for details.
The colors used for this project are the following: https://coolors.co/4a8394-62aec5-88c0d5-add2e4-ffffff-f678a7-ee5c8d-e64072-d91c55
- FastAPI for the amazing web framework
- Jinja2 for templating
- TailwindCSS for styling
- Gitingest for the inspiration
