Skip to content

FastAPI powered simple social networking RESTful API

Notifications You must be signed in to change notification settings

1ort/simplesocial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simplesocial

Implemented:

  • username:password authentication and registration. All actions require a JWT token in the request headers

  • Readonly viewing posts and users is available without authorization

  • The functionality of a personal account: Ability to change login details and delete account изображение

  • View other people's profiles and their posts. Ability to get a profile by ID изображение

  • As a user, you can write, edit and delete your own posts. You can like and dislike other people's posts. изображение

  • Each endpoint is documented and contributes to the overall open-api scheme

  • The simplest in-memory reaction cache was written so as not to recalculate them every time.

Database

The application has been tested and developed with the SQLite database, but since the sqlalchemy is used, in docker-compose.yml you can specify the url for MYSQL, PostgreSQL and other relational databases.

Installation

It is assumed that you already have git and docker installed.

Clone repo

git clone https://github.com/1ort/simplesocial.git

cd simplesocial

...and run

docker compose up

Ready! The application is running on port 8000. Online documentation is available at:

http://0.0.0.0/8000/docs
http://0.0.0.0/8000/redoc

Important!

Don't use default settings in production. You need to generate and supply your own private key.

openssl rand -hex 32

And then put it in a docker-compose.yml file

environment:
      - SECRET_KEY=09d25e094faa6ca2556c818166b7a9563b93f7099f6f0f4caa6cf63b88e8d3e7

Alternative ways to transfer the private key to the application are here: https://docs.docker.com/compose/environment-variables/

About

FastAPI powered simple social networking RESTful API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published