An open API service indexing awesome lists of open source software.

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

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