Skip to content

drf-simplejwt, logging, django-silk, drf-spectacular, corsheaders, redis, throttling, redis-py, django-redis

Notifications You must be signed in to change notification settings

hmd37/instagram-clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Έ Instagram Clone API

A Django REST Framework (DRF) API that replicates core Instagram features such as user authentication, posts, likes, comments, and follow/unfollow functionality.

πŸš€ Features

βœ… User Authentication (Register, Login, JWT)
βœ… Create, Read, Update, and Delete (CRUD) for Posts
βœ… Like/Unlike Posts
βœ… Comment on Posts
βœ… Follow/Unfollow Users
βœ… User Profiles with Followers & Following Counts
βœ… Search Users

πŸ› οΈ Tech Stack

  • Backend: Django, Django REST Framework
  • Database: PostgreSQL
  • Authentication: JWT (JSON Web Tokens)
  • Documentation: DRF Spectacular (OpenAPI/Swagger)

πŸ“¦ Installation

1️⃣ Clone the Repository

2️⃣ Create a Virtual Environment & Install Dependencies

python -m venv venv
source venv/bin/activate  # On Windows use: venv\Scripts\activate
pip install -r requirements.txt

3️⃣ Configure Environment Variables
Create a .env file in the root directory and add the required variables:

SECRET_KEY=your_secret_key
DATABASE_URL=your_database_url

4️⃣ Apply Migrations & Create Superuser

python manage.py migrate
python manage.py createsuperuser

5️⃣ Run the Development Server

python manage.py runserver

πŸ”‘ Authentication

  • Register: POST /api/auth/register/
  • Login: POST /api/auth/login/
  • Get User Profile: GET /api/users/{username}/
  • Update Profile: PUT /api/users/{username}/
  • Follow/Unfollow: POST /api/users/{username}/follow/

πŸ–ΌοΈ Posts & Interactions

  • Create Post: POST /api/posts/
  • Retrieve Post: GET /api/posts/{post_id}/
  • Like/Unlike Post: POST /api/posts/{post_id}/like/
  • Comment on Post: POST /api/posts/{post_id}/comment/

πŸ“œ API Documentation

After running the server, access the API documentation at:
πŸ”— http://127.0.0.1:8000/api/schema/swagger-ui/

🀝 Contributing

Contributions are welcome! Feel free to fork, create a pull request, or open an issue. πŸš€

About

drf-simplejwt, logging, django-silk, drf-spectacular, corsheaders, redis, throttling, redis-py, django-redis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published