https://github.com/dc8156046/fastapi-multi-user-blog-system
Python FastAPI Blog System backend
https://github.com/dc8156046/fastapi-multi-user-blog-system
fastapi python3
Last synced: 2 months ago
JSON representation
Python FastAPI Blog System backend
- Host: GitHub
- URL: https://github.com/dc8156046/fastapi-multi-user-blog-system
- Owner: dc8156046
- Created: 2024-11-04T03:33:18.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-15T20:05:18.000Z (over 1 year ago)
- Last Synced: 2025-03-23T03:32:06.434Z (over 1 year ago)
- Topics: fastapi, python3
- Language: Python
- Homepage: https://fastapi-multi-user-blog-system.onrender.com
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
## Multi-User Blog System
A multi-user blog system built with Python FastAPI, SQLAlchemy, and PostgreSQL, allowing users to create and manage blog categories, posts, comments, and likes.
## Deployed on Render
```bash
https://fastapi-multi-user-blog-system.onrender.com
```
## Features
- 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
## Tech Stack
- **Backend**: FastAPI
- **Database**: PostgreSQL
- **ORM**: SQLAlchemy
- **Authentication**: JWT (JSON Web Tokens)
- **Environment Management**: Dotenv
## Create a Virtual Environment
```bash
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
```
## Install Dependencies
```bash
pip install -r requirements.txt
```
## Setup Environment Variables
Create a .env file in the root directory and add the following variables:
```bash
DATABASE_URL=postgresql://username:password@localhost:5432/fastapi_blog
SECRET_KEY=your_secret_key_here
```
## Running the Application
You can run the application using Uvicorn:
```bash
uvicorn main:app --reload
```
### Prerequisites
Make sure you have the following installed:
- Python 3.7+
- PostgreSQL
- pip
### Clone the Repository
```bash
git clone https://github.com/dc815606/fastapi-multi-user-blog-system.git
cd fastapi-multi-user-blog-system