A multi-user blog system built with Python FastAPI, SQLAlchemy, and PostgreSQL, allowing users to create and manage blog categories, posts, comments, and likes.
https://fastapi-multi-user-blog-system.onrender.com
- User registration and authentication
- Create, read, update, and delete blog categories and posts
- Like and unlike blog post
- Comment on posts with support for images
- Like comments and track likes count
- Secure API endpoints with JWT authentication
- Backend: FastAPI
- Database: PostgreSQL
- ORM: SQLAlchemy
- Authentication: JWT (JSON Web Tokens)
- Environment Management: Dotenv
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
pip install -r requirements.txt
Create a .env file in the root directory and add the following variables:
DATABASE_URL=postgresql://username:password@localhost:5432/fastapi_blog
SECRET_KEY=your_secret_key_here
You can run the application using Uvicorn:
uvicorn main:app --reload
Make sure you have the following installed:
- Python 3.7+
- PostgreSQL
- pip
git clone https://github.com/dc815606/fastapi-multi-user-blog-system.git
cd fastapi-multi-user-blog-system