Skip to content

A social media API that manages user account creation with access tokens, post creation, update, and deletion, as well as upvotes and downvotes. Built with FastAPI and powered by a Postgres database.

Notifications You must be signed in to change notification settings

ondiekelijah/Social-Media-App-API

Repository files navigation

Social-Media-App-API

A social media API that manages user account creation with access tokens, post creation, update, and deletion, as well as upvotes and downvotes. Built with FastAPI and powered by a Postgres database.

Python application

Read the docs here

Installation

  1. Navigate into your desired folder, then clone this repo as shown, remember the dot (.) so as to avoid duplicating this repo's name again.

git clone https://github.com/Dev-Elie/Social-Media-App-API.git .

  1. Change to that specific directory

cd directory path

  1. Install the requirements from the requirements.txt file.

pip install -r requirements.txt

  1. Create a .env file in the root of the directory then add the following contents, adding values for each depending on your configs.
DATABASE_HOSTNAME=
DATABASE_PORT=
DATABASE_PASSWORD=
DATABASE_NAME=
DATABASE_USERNAME=
SECRET_KEY=
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=
  1. Run a database migration

alembic upgrade head

  1. Start the server

uvicorn app.main:app --reload

About

A social media API that manages user account creation with access tokens, post creation, update, and deletion, as well as upvotes and downvotes. Built with FastAPI and powered by a Postgres database.

Topics

Resources

Stars

Watchers

Forks