Loading repository data…
Loading repository data…
bibektimilsina00 / repository
FastAPI + PostgreSQL Starter Kit: A streamlined template for building backends with FastAPI, PostgreSQL, and Docker.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
Welcome to the FastAPI + PostgreSQL Starter Kit – your new best friend for building blazing-fast backend applications with a database that's as solid as a rock (or should we say, as solid as a Postgres? 😉).
This kit comes fully loaded with everything you need to start your backend adventures:
Ready to dive in? Let's get this party started!
Clone the Repository
First things first, grab a copy of this awesome project:
git clone https://github.com/yourusername/fastapi-postgres-starter-kit.git
cd fastapi-postgres-starter-kit
Setup Your Environment
We've got a .env.example file waiting for you. Make a copy, name it .env, and tweak the variables to suit your needs:
cp .env.example .env
Fire It Up
Now comes the fun part – launching the whole shebang with just one command:
docker-compose up --build
Sit back, relax, and watch as Docker works its magic. In no time, you'll have everything up and running.
Access the Application
Boom! Your FastAPI application is live at http://localhost:4000. Go ahead, give it a whirl!
Need to make some changes to your database? No problem! Alembic's got your back:
docker-compose exec backend alembic upgrade head
Just like that, your database is up to date. 🎉
We know you're a responsible developer who loves testing, right? Here's how you can run your tests inside the Docker container:
docker-compose exec backend pytest
Testing has never been so easy. Go on, give yourself a pat on the back!
If you're feeling adventurous and want to run this project outside of Docker (we salute you!), here's what you need to do:
Install Dependencies
Poetry to the rescue:
poetry install
Run the Application
Fire up the app with Uvicorn:
uvicorn app.main:app --reload --host 0.0.0.0 --port 4000
You're all set to code like a rockstar. 🎸
Ready to take your app to the world? You can use this same Docker setup for production, or deploy it to any platform that loves containers as much as we do. Just make sure those environment variables are production-ready!
Have an idea for an improvement? Spotted a bug? Or maybe you just want to say hi? We're all ears! Feel free to open an issue or submit a pull request. We'd love to have you contribute!
This project is licensed under the MIT License.
This project is inspired by the full-stack-fastapi-postgresql template created by the legendary Sebastián Ramírez. Big thanks to the FastAPI and Docker communities for their amazing work and support.
Now go ahead and build something awesome! 🚀✨