This is a production-ready starter kit using:
- FastAPI
- SQLAlchemy
- JWT-ready (easy to add)
- Docker support
- Ready to deploy on AWS ECS / Fargate
✅ Register/Login with hashed passwords
✅ SQLite (easy to swap to PostgreSQL or RDS)
✅ Dockerized for easy deployment
✅ Clean, modular structure
- Create Python virtual environment with conda
conda create -n fastapi-starter python=3.11
conda activate fastapi-starter
- Install required libraries
pip install -r requirements.txt
- Add .env to root folder with environment variable:
DATABASE_URL=sqlite:///./test.db
- Run FastAPI locally
uvicorn app.main:app --host 0.0.0.0 --port 8000
docker build -t fastapi-starter .
docker run -p 8000:8000 fastapi-starter
- Health check API:
Method: GET
URL: localhost:8000/health_check
Response:
{
"message": "FastAPI Starter Running"
}
- Register API:
Method: POST
URL: localhost:8000/auth/register
Input (Body -> raw (JSON)):
{
"email": "test-email@example.com",
"password": "<password>"
}
Response:
{
"id": 1,
"email": "test-email@example.com"
}
- Add JWT login/logout functionality
- Swap SQLite with PostgreSQL or AWS RDS for production
- Deploy on AWS ECS/Fargate with Terraform
- Add tests and CI/CD pipelines
Feel free to fork and submit pull requests. Open issues for questions or bugs.
MIT License © [Wendy Nguyen]