https://fastapicrudbasedapp-rq8dh3obq-aman-singhs-projects-0dbfab15.vercel.app/docs
FastSocial is a social media type application built using FastAPI and PostgreSQL, with Alembic migrations for database schema management. The application provides CRUD functionalities, allowing users to create, retrieve, update, and delete posts. Authentication is implemented using JWT tokens, and the data is managed through SQLAlchemy ORM.
User Authentication: Utilizes JWT tokens for secure user authentication.
CRUD Operations: Allows users to perform Create, Read, Update, and Delete operations on posts.
Database Management: Utilizes PostgreSQL as the database backend, with Alembic migrations for seamless schema updates.
ORM Integration: Leverages SQLAlchemy ORM for efficient and expressive database interactions.
1. Clone the repository:
git clone https://github.com/Achno2k/CRUD-based-social-media-app.git
2. Navigate to the project directory:
cd CRUD-based-social-media-app.git
3. Install dependencies:
pip install -r requirements.txt
-
Create a PostgreSQL database and update the database connection string in the database.py file.
SQLALCHEMY_DATABASE_URL = "postgresql://username:password@localhost/dbname"
-
Generate a secret key for JWT token in oauth2.py.
SECRET_KEY = "your-secret-key"
- Make sure to change all the enviornmental variables in the .env file
Apply database migrations using Alembic
alembic upgrade head
Start the FastAPI development server
uvicorn app.main:app --reload
The application will be accessible at http://127.0.0.1:8000
Do visit the fastAPI swaggerUI at https://fastapicrudbasedapp-rq8dh3obq-aman-singhs-projects-0dbfab15.vercel.app/docs to get all the documentation related to all the endpoints and features.
Python, FastAPI, PostgreSQL, Sqlalchemy, Alembic.
Contributions are always welcome!