https://github.com/ark948/reddit-clone-test02
A REST-based api clone of Reddit using FastAPI
https://github.com/ark948/reddit-clone-test02
fastapi pytest python rest rest-api sqlalchemy sqlmodel
Last synced: about 1 month ago
JSON representation
A REST-based api clone of Reddit using FastAPI
- Host: GitHub
- URL: https://github.com/ark948/reddit-clone-test02
- Owner: ark948
- Created: 2024-12-01T11:50:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-10T20:02:35.000Z (over 1 year ago)
- Last Synced: 2025-04-02T23:41:31.067Z (about 1 year ago)
- Topics: fastapi, pytest, python, rest, rest-api, sqlalchemy, sqlmodel
- Language: Python
- Homepage:
- Size: 221 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Reddit Clone in FastAPI
### Features:
. Create and join communities
. Make posts
. Like or dislike other users' posts
. Comment on users' posts (Comments can also be liked and disliked)
. Other features comming...
### Tech Stack:
. Backend Framework: FastAPI
. ORM: SQLAlchemy 2.0 + SQLModel
. Database: PostgresSQL (Async Connection)
. Token Authentication
. Redis for caching
. Celery (With Redis as message broker)
. Async compatible tests (with pytest fixtures)
### How is this project structured:
. Project has 3 main parts:
backend:
. apps --> (Project specific features)
. a bunch of apps... --> (dedicated folders for each app)
. endpoints.py --> (all apps routers will be connected to one router to keep things tidy)
. utils.py --> (global level utility functions)
. configs --> (Configuration variables)
. sections --> (Common backend functionalities)
main.py --> (main application instance)
runserver.py --> (uvicorn server entry point)
#### Apps:
This is where project specific-features exist.
by "project-specific" i mean parts that different platforms do not share...
e.g. an e-commerce platform will have a "cart" feature with which users can review their selected items and the total price,
before they confirm the purchase.
But a social/forum platform (like reddit) does not have that.
Instead it has dedicated parts that users can view posts and search for communities that ineterests them.
#### Configs:
Just where i keep global-level variables.
(May not be the best. change this according to your own preference)
#### Sections:
This is where common backend parts of the application exist.
Essential parts that almost all projects will comprise, e.g. Database and Authentication....
(this file will be updated...)