https://github.com/sachingupta0019/fastapi-instagram
Instagram Clone App
https://github.com/sachingupta0019/fastapi-instagram
fastapi fastapi-crud fastapi-docker fastapi-framework fastapi-sqlalchemy fastapi-users jwt jwt-authentication oauth2 postgresql sqlalchemy-orm
Last synced: 24 days ago
JSON representation
Instagram Clone App
- Host: GitHub
- URL: https://github.com/sachingupta0019/fastapi-instagram
- Owner: sachingupta0019
- Created: 2025-08-26T20:13:34.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-09-10T22:11:14.000Z (9 months ago)
- Last Synced: 2025-10-20T19:27:13.689Z (7 months ago)
- Topics: fastapi, fastapi-crud, fastapi-docker, fastapi-framework, fastapi-sqlalchemy, fastapi-users, jwt, jwt-authentication, oauth2, postgresql, sqlalchemy-orm
- Language: Python
- Homepage: https://fastapi-instagram.vercel.app
- Size: 3.01 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# πΈ FastAPI Instagram Clone API
A backend API built with **FastAPI** that mimics Instagramβs core features such as authentication, posting images, liking, and commenting.
---
## π Features
* User authentication & authorization (JWT-based)
* Create, update, and delete posts
* Add Post title, description, caption, Images
* Like & comment on posts
* SQLite database (default, via `instagram_api.db`)
* Organized project structure (auth, database, routes, schema)
* Automatic API docs with **Swagger** & **ReDoc**
---
## π Project Structure
```bash
Instagram_Clone/
βββ Instagram/
β βββ auth/ # Authentication logic
β βββ database/ # Database connection/config
β βββ images/ # Uploaded images
β βββ routes/ # API routes (users, posts, comments, etc.)
β βββ schema/ # Pydantic schemas
β βββ instagram_api.db # SQLite database
β βββ main.py # Application entry point
β βββ requirements.txt # Dependencies for this app
β
βββ instagram_env/ # Virtual environment (ignored in git)
βββ react_app/ # Frontend (React project)
βββ .gitignore
βββ requirements.txt # Root dependencies
```
---
## βοΈ Installation & Setup
### 1οΈβ£ Clone the repository
```bash
git clone https://github.com/your-username/fastapi-instagram-clone.git
cd FastAPI/Instagram_Clone
```
### 2οΈβ£ Create & activate virtual environment
```bash
# Create virtual environment
python -m venv instagram_env
# Activate venv (Windows)
instagram_env\Scripts\activate
# Activate venv (Mac/Linux)
source instagram_env/bin/activate
```
### 3οΈβ£ Install dependencies
```bash
pip install -r Instagram/requirements.txt
```
### 4οΈβ£ Run the application
```bash
uvicorn Instagram.main:app --reload
```
Server will start at π **[http://127.0.0.1:8000](http://127.0.0.1:8000)**
---
## π API Documentation
* Swagger UI β [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs)
* ReDoc β [http://127.0.0.1:8000/redoc](http://127.0.0.1:8000/redoc)
---
## π οΈ Environment Variables
Create a `.env` file in the root or configure inside `main.py`:
```ini
DATABASE_URL=sqlite:///./Instagram/instagram_api.db
SECRET_KEY=your_secret_key
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30
```
---
## π― Future Enhancements
* Switch to PostgreSQL for production
* Add image storage in AWS S3 / Cloudinary
* Implement notifications & stories
* Dockerize the application
---
β
Now you can run your **Instagram Clone API** locally with just a few commands.