Skip to content

vanuyen/fastapi-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastAPI Starter Kit 🔥

This is a production-ready starter kit using:

  • FastAPI
  • SQLAlchemy
  • JWT-ready (easy to add)
  • Docker support
  • Ready to deploy on AWS ECS / Fargate

Features

✅ Register/Login with hashed passwords
✅ SQLite (easy to swap to PostgreSQL or RDS)
✅ Dockerized for easy deployment
✅ Clean, modular structure

Quick Start

Local run

  • 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

Build and run with Docker

docker build -t fastapi-starter .
docker run -p 8000:8000 fastapi-starter

Test with Postman

  • 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"
}

Next Steps

  • 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

Contribution

Feel free to fork and submit pull requests. Open issues for questions or bugs.

License

MIT License © [Wendy Nguyen]

About

Production-ready FastAPI starter with SQLAlchemy and Docker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors