A modern and scalable social networking platform built with Django, PostgreSQL, and optimized database indexing. This project supports user authentication, media uploads, hashtags, likes, follows, and OTP-based authentication.
- User Authentication: Signup, login, logout, and password reset.
- Soft Delete for Users: Accounts can be deactivated and stored temporarily instead of being permanently removed.
- OTP Authentication: Custom OTP system using database storage, with automated cleanup for expired codes.
- Post Management: Users can create, edit, and manage posts.
- Media Handling: Upload multiple images/videos with size validation.
- Hashtag System: Unique hashtags that allow searching for related posts.
- Likes & Dislikes: Generic relation-based likes on posts and comments.
- Following System: Optimized with database indexing for efficient queries.
- Optimized Database Queries: Indexed fields for improved performance.
- Backend: Django (Python)
- Database: PostgreSQL
- Frontend: HTML, CSS, JavaScript (to be expanded)
- Styling: Tailwind CSS / Bootstrap
- Storage: Cloud storage or local media files (configurable)
Ensure you have the following installed:
- Python 3.x
- PostgreSQL
- Pip & Virtual Environment
1️⃣ Clone the Repository:
git clone [https://github.com/your-repo/social-network.git](https://github.com/Maktab119TinyInstagram/ESPA.git)
cd ESPA2️⃣ Create a Virtual Environment & Activate It:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate3️⃣ Install Dependencies:
pip install -r requirements.txt4️⃣ Setup the Database:
python manage.py migrate5️⃣ Run the Development Server:
python manage.py runserver6️⃣ (Optional) Run Tests:
python manage.py test| Endpoint | Method | Description |
|---|---|---|
/api/auth/login/ |
POST | User login |
/api/auth/signup/ |
POST | User registration |
/api/posts/ |
GET | List all posts |
/api/posts/<id>/ |
GET | Retrieve a single post |
/api/posts/create/ |
POST | Create a new post |
/api/posts/<id>/like/ |
POST | Like/unlike a post |
/api/follow/<username>/ |
POST | Follow/unfollow a user |
- Fork the repo and create a feature branch.
- Follow the PEP8 coding style.
- Submit a pull request with clear documentation.
- Ensure all tests pass before requesting a merge.
For any inquiries, feel free to reach out via [email protected].