This project allows you to perform CRUD operation on Blog, add comment to a blog, like and dislike the blog with User registration. The API made using Python-FastAPI, MongoDB as database.
Clone this repository locally by using the below link:
https://github.com/angad-singhh/BlogApp.git
Create a virtual environment and Install the required dependencies :-
pip install -r requirements.txt
Run the application server on port 8000:
fastapi dev main.py
class Blog(BaseModel):
title: str
authorID: str
content: str
tags: list[str]
curr_date: str
blog_id:
class Comments(BaseModel):
content: str
user_id: str
comment_id: str
blog_id: str
class Likes(BaseModel):
user_id: list[str] = []
blog_id: str
class User(BaseModel):
name: str
email: EmailStr
user_id: str
Documentation for API endpoints and schemas can be accessed on:
http://localhost:8000/docs