JohnsonChong0123 /
FastAPI-E-Commerce-Backend
Production-ready FastAPI e-commerce backend with JWT authentication, PostgreSQL, and RESTful API design. Paired with Flutter mobile client.
53/100 healthLoading repository data…
ErfannKhastar / repository
A production-ready RESTful social media API built with FastAPI, PostgreSQL, and Docker, featuring JWT auth and a full CI/CD pipeline.
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.
A complete, production-ready RESTful API for a simple social media application built with FastAPI, PostgreSQL, and Docker. This project includes user authentication with JWT, full CRUD operations for posts, an automated testing pipeline, and a voting system.
This project serves as a comprehensive example of building a modern web API using Python. It is structured to follow professional software engineering best practices, including database migrations with Alembic, dependency management, automated CI/CD pipelines, and containerization with Docker and Docker Compose for both development and production environments.
passlib and bcrypt.pytest./docs) and ReDoc (/redoc).Selected from shared topics, language and repository description—not editorial ratings.
JohnsonChong0123 /
Production-ready FastAPI e-commerce backend with JWT authentication, PostgreSQL, and RESTful API design. Paired with Flutter mobile client.
53/100 healthGabrielBorges240 /
Task Manager API — Production-ready RESTful API built with FastAPI, PostgreSQL, JWT, Docker, and SQLAlchemy for secure and scalable task management.
55/100 healthTo get a local copy up and running, follow these simple steps.
Clone the repository:
git clone [https://github.com/erfankhastar/social_media_api_tutorial.git](https://github.com/erfankhastar/social_media_api_tutorial.git)
cd social_media_api_tutorial
Create a .env file in the root directory and copy the contents below (replace placeholders with your actual secrets):
# Application Settings
SECRET_KEY=your_super_secret_key_here
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30
# Database Settings for the API
DATABASE_HOST=localhost # Note: Use 'postgres' when running via Docker
DATABASE_PORT=5432
DATABASE_USER=postgres
DATABASE_PASSWORD=your_db_password
DATABASE_NAME=fastapi
There are three ways to run this application:
Ideal for direct script execution using a Python virtual environment.
python3 -m venv .venv
source .venv/bin/activate # On Windows use: .venv\Scripts\activate
pip install -r requirements.txt
DATABASE_HOST is localhost, then run:
alembic upgrade head
uvicorn src.app.main:app --reload
The API will be available at http://localhost:8000.The recommended method for local development. It maps your source code to the container, enabling live reloading.
.env file and set DATABASE_HOST=postgres.docker-compose -f docker-compose-dev.yml up -d --build
docker-compose -f docker-compose-dev.yml exec api alembic upgrade head
The API will be available at http://localhost:8000.Simulates a production environment by pulling the pre-built, tested Docker image directly from Docker Hub.
DATABASE_HOST=postgres in your .env file.docker-compose -f docker-compose-prod.yml up -d
docker-compose -f docker-compose-prod.yml exec api alembic upgrade head
The API will be available on port 80 at http://localhost.Once the application is running, you can access the interactive API documentation at:
http://localhost:8000/docshttp://localhost/docsIf this project helped you understand FastAPI, Docker, or CI/CD pipelines better, please consider giving it a ⭐️! It helps others discover the repository and motivates me to keep building and sharing high-quality backend projects.
Contributions, issues, and feature requests are always welcome!
I'm a backend software engineer passionate about building scalable architectures, clean code, and robust APIs. Whether you have a question about this project, want to discuss Python backend development, or have an exciting collaboration in mind, I'd love to hear from you!
This project is distributed under the MIT License. See the LICENSE file for more details.