AHMED SALEEM SHAIKH | Co-Founder Of XYFORA AB
A lightweight and scalable starter template for building modern REST APIs using FastAPI, SQLAlchemy, and PostgreSQL. Designed with a clean project structure and best practices, it helps developers quickly set up production-ready backend applications with minimal configuration.
- ⚡ FastAPI-powered high-performance APIs
- 🗄️ SQLAlchemy ORM integration
- 🐘 PostgreSQL database support
- ✅ Pydantic request validation
- 🌐 CORS middleware configuration
- 🔒 Centralized exception handling
- 📁 Modular and scalable folder structure
- 🔧 Environment variable management with python-dotenv
- 📚 Automatic Swagger & ReDoc API documentation
- 🚀 Ready for authentication and authorization implementation
- Python 3.10+
- PostgreSQL
git clone https://github.com/XYFORA/XYFORA-Fast-API-Boilerplate.git
cd xyfora-fast-api-boilerplateuv venv.venv\Scripts\activatesource .venv/bin/activateuv pip install -r requirements.txtCreate a .env file in the project root:
DATABASE_URL=postgresql+psycopg2://postgres:password@localhost:5432/database_nameuvicorn main:app --reloadThe API will be available at:
http://127.0.0.1:8000
http://127.0.0.1:8000/docs
.
├── src
│ ├── config
│ │ └── db.py
│ ├── models
│ ├── routes
│ ├── schemas
│ └── app.py
├── .env
├── main.py
├── requirements.txt
└── README.md
python-dotenv
fastapi
uvicorn
sqlalchemy
psycopg2-binary