Skip to content

Arch0998/django-instaclone-2010

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

104 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Έ Django InstaClone 2010

Nostalgic clone of early Instagram versions - A social photo sharing network recreating the classic Instagram atmosphere from 2010-2012.

Django Python Bootstrap


Live demo available for testing: instaclone-1nla.onrender.com

Demo credentials:
--> Login: demo_user
--> Pass: 3edc1qaz

Desktop version works stably. Mobile app version is under development.

Note: Some JavaScript features may work slowly or with delays on the free render.com hosting.


🌟 Features

πŸ“± Core Social Features

  • πŸ“Έ Photo Sharing - Upload and share your moments with image validation
  • ❀️ Advanced Like System - Real-time likes with Ajax support and visual feedback
  • πŸ’¬ Comment System - Full commenting functionality with edit and delete options
  • #️⃣ Hashtag Support - Automatic hashtag parsing and dedicated hashtag pages
  • πŸ‘₯ Following System - Follow/unfollow users with real-time updates
  • πŸ” Advanced Search - Live user search with avatar previews
  • πŸ“Š Personalized Feed - Timeline showing posts from followed users with pagination

πŸ‘€ User Management & Profiles

  • πŸ–ΌοΈ Custom Avatars - Upload and manage profile pictures
  • πŸ“ Profile Headers - Customizable bio/header text (up to 50 characters)
  • πŸ“ˆ Social Statistics - Real-time follower/following counts and post statistics
  • πŸ”’ Profile Editing - Full control over personal data including phone validation
  • πŸ‘οΈ Profile Views - Browse other users' profiles with follow/unfollow functionality
  • πŸ“‹ Followers/Following Lists - Paginated lists with user avatars and quick actions

πŸ“Έ Post Management

  • βž• Post Creation - Upload photos with captions and automatic hashtag detection
  • ✏️ Post Editing - Edit post captions and images (authors only)
  • πŸ—‘οΈ Post Deletion - Delete posts with confirmation (authors only)
  • πŸ” Post Details - Dedicated post pages with full comment threads
  • πŸ“… Timestamps - Human-readable timestamps (e.g., "2 hours ago")
  • 🏷️ Hashtag Pages - Browse all posts by specific hashtags with grid layout
  • πŸ“· Image Update - Change post image during editing

πŸ’¬ Advanced Comment System

  • πŸ’­ Real-time Comments - Add comments to posts instantly
  • ✏️ Comment Editing - Edit your own comments
  • πŸ—‘οΈ Comment Deletion - Delete comments with proper permissions
  • πŸ‘€ Comment Authors - Display comment authors with profile links
  • πŸ“… Comment Timestamps - Show when comments were made

🎨 Modern UI/UX Design

  • πŸ•°οΈ Retro Instagram Aesthetic - Faithful recreation of 2010-era Instagram design
  • ✨ Interactive Elements - Hover effects, smooth transitions, and visual feedback
  • 🌈 Gradient Design - Instagram-style gradients and modern color schemes
  • πŸ“‹ Smart Navigation - Sticky header with quick access to all features
  • πŸ”„ Ajax Interactions - Real-time likes, follows, and search without page reloads

πŸ”’ Security & Authentication

  • πŸ” Custom User Model - Extended user model with phone validation
  • πŸ“§ Secure Registration - Email and phone number validation
  • πŸ›‘οΈ Permission System - Proper authorization for post/comment editing
  • 🚫 Access Control - Login required for most features
  • βœ… Form Validation - Client and server-side validation

πŸ“Š Data Management

  • πŸ“ˆ Pagination - Efficient pagination for feeds, profiles, and lists
  • πŸ—„οΈ Optimized Queries - Database optimization with select_related and prefetch_related
  • πŸ“± Media Handling - Organized media uploads with date-based directory structure
  • 🏷️ Automatic Tagging - Regex-based hashtag extraction and management
  • πŸ“Έ Cloudinary Integration - All images stored and served via Cloudinary
  • πŸ’Ύ Environment Switching - Use .env to switch between dev (SQLite) and prod (PostgreSQL) via DJANGO_SETTINGS_MODULE

πŸ› οΈ Technical Stack

Backend

  • Django 5.2.5 - Modern Python web framework
  • SQLite - Lightweight database for development
  • Pillow - Image processing and handling
  • Python 3.12+ - Latest Python features

Frontend

  • Bootstrap 5.3 - Responsive CSS framework
  • FontAwesome 6.4 - Modern icon library
  • Vanilla JavaScript - Custom interactions and Ajax
  • CSS3 - Modern styling with gradients and animations

Architecture

  • Class-Based Views - Django CBVs for clean, reusable code
  • Model-View-Template - Standard Django architecture
  • Ajax Integration - Seamless real-time interactions
  • Signal System - Automatic profile creation on user registration

πŸ“ Project Structure

πŸ“ django-instaclone-2010/                # Main project root
β”œβ”€β”€ πŸ“ manage.py                          # Django management script
β”œβ”€β”€ πŸ“ django_instaclone_2010/            # Django core package (settings, URLs, WSGI/ASGI)
β”‚   β”œβ”€β”€ asgi.py                           # ASGI config
β”‚   β”œβ”€β”€ urls.py                           # Main URL routing
β”‚   └── wsgi.py                           # WSGI config
β”œβ”€β”€ πŸ“ accounts/                          # User management app
β”‚   β”œβ”€β”€ models.py                         # User, UserProfile, Follow models
β”‚   β”œβ”€β”€ views.py                          # Profile, authentication, follow views
β”‚   β”œβ”€β”€ forms.py                          # Registration and profile forms
β”‚   β”œβ”€β”€ validators.py                     # Custom username validation
β”‚   β”œβ”€β”€ signals.py                        # Auto profile creation
β”‚   β”œβ”€β”€ πŸ“ tests/                         # Tests for accounts app
β”‚   └── πŸ“ migrations/                    # Database migrations
β”œβ”€β”€ πŸ“ posts/                             # Posts and content app
β”‚   β”œβ”€β”€ models.py                         # Post, Comment, PostLike, Hashtag models
β”‚   β”œβ”€β”€ views.py                          # CRUD operations for posts and comments
β”‚   β”œβ”€β”€ πŸ“ tests/                         # Tests for posts app
β”‚   └── πŸ“ migrations/                    # Database migrations
β”œβ”€β”€ πŸ“ settings/                          # Django settings (base, dev, prod, testing)
β”‚   β”œβ”€β”€ base.py                           # Base settings
β”‚   β”œβ”€β”€ dev.py                            # Development settings
β”‚   β”œβ”€β”€ prod.py                           # Production settings
β”œβ”€β”€ πŸ“ static/                            # Static assets (CSS/JS)
β”‚   β”œβ”€β”€ πŸ“ css/                           # Stylesheets for each component
β”‚   └── πŸ“ js/                            # JavaScript for interactivity
β”œβ”€β”€ πŸ“ staticfiles/                       # Collected static files (for production)
β”œβ”€β”€ πŸ“ templates/                         # Django templates
β”‚   β”œβ”€β”€ base.html                         # Base template with navigation
β”‚   β”œβ”€β”€ pagination.html                   # Pagination partial
β”‚   β”œβ”€β”€ πŸ“ accounts/                      # User-related templates
β”‚   └── πŸ“ posts/                         # Post-related templates
β”œβ”€β”€ πŸ“ media/                             # User uploads (avatars, posts)
β”œβ”€β”€ πŸ“ README.md                          # Project documentation
β”œβ”€β”€ πŸ“ requirements.txt                   # Python dependencies
└── πŸ› οΈ build.sh                           # Build/deploy script

πŸš€ Key Features Breakdown

πŸ”„ Real-time Interactions

  • Like Button: Ajax-powered likes with instant visual feedback
  • Follow System: Real-time follow/unfollow with counter updates
  • Live Search: Instant user search results with debouncing
  • Comment Management: Add, edit, delete comments without page refresh

πŸ” Advanced Search & Discovery

  • User Search: Find users by username or name with live results
  • Hashtag Discovery: Browse posts by hashtags with grid view
  • Profile Discovery: Explore user profiles and their content
  • Follow Suggestions: See who users are following/followed by

πŸ“Š Analytics & Statistics

  • Post Counts: Track how many posts each user has shared
  • Social Metrics: Real-time follower and following counts
  • Engagement Stats: Like and comment counts on posts
  • Activity Timestamps: Track when content was created and updated

🎯 Instagram 2010 Authenticity

This project faithfully recreates the early Instagram experience:

  • 🎨 Visual Design: Retro gradients, card-based layouts, and classic Instagram aesthetics
  • πŸ“Έ Photo-Centric: Images are the primary content with simple, clean presentation
  • πŸ‘₯ Social Core: Focus on following friends and discovering content through social connections
  • 🏷️ Hashtag Culture: Simple hashtag system for content organization
  • πŸ’¬ Minimal Comments: Clean, simple commenting system without threading

πŸ”§ Installation & Setup

  1. Clone the repository

    git clone <repository-url>
    cd django-instaclone-2010
  2. Create virtual environment

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies

    pip install -r requirements.txt
  4. Configure environment variables

    Create a .env file in the project root directory and add the following variables:

    # Django Configuration
    DJANGO_SECRET_KEY=your-secret-key-here
    DJANGO_SETTINGS_MODULE=settings.dev
    
    # Cloudinary Configuration (for image hosting)
    CLOUDINARY_CLOUD_NAME=your-cloudinary-cloud-name
    CLOUDINARY_API_KEY=your-cloudinary-api-key
    CLOUDINARY_API_SECRET=your-cloudinary-api-secret

    πŸ”‘ How to get these values:

    Django Secret Key:

    • Generate a new secret key using Django's built-in function:
    python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"

    Cloudinary Credentials:

    • Sign up for free account at: https://cloudinary.com/
    • Go to Dashboard β†’ Account Details
    • Copy Cloud Name, API Key, and API Secret
    • Cloudinary provides free tier with 25GB storage and 25GB bandwidth
  5. Run migrations

    python manage.py makemigrations
    python manage.py migrate
  6. Create superuser

    python manage.py createsuperuser
  7. Start development server

    python manage.py runserver

⚠️ Important Notes

  • Never commit your .env file - Add it to .gitignore
  • Keep your secret keys secure - Don't share them publicly
  • Regenerate keys if they get compromised
  • Use different keys for development and production environments

πŸ“± Usage Guide

🏠 Getting Started

  1. Register: Create account with username, email, and phone
  2. Complete Profile: Add avatar and bio header
  3. Find Friends: Use search to find and follow other users
  4. Share Content: Upload your first photo with caption and hashtags

πŸ“Έ Posting Content

  • Upload Photo: Choose image file (required)
  • Add Caption: Write description with hashtags (#hashtag)
  • Auto-Tagging: Hashtags are automatically detected and linked
  • Edit Later: Modify captions anytime from post detail page

πŸ‘₯ Social Features

  • Follow Users: Click follow button on profiles or search results
  • Explore Feed: See posts from people you follow in chronological order
  • Interact: Like posts and leave comments
  • Discover: Browse hashtag pages to find new content

🎨 Design Philosophy

This project embodies the simplicity and focus that made early Instagram special:

  • πŸ“Έ Photography First: Clean, uncluttered interface that highlights photos
  • πŸ‘₯ Social Connection: Easy discovery and interaction with other users
  • 🎯 Focused Features: Core functionality without overwhelming complexity
  • πŸ•°οΈ Nostalgic Feel: Warm gradients and classic design patterns

🀝 Contributing

We welcome contributions! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Follow Django best practices
  4. Add tests for new features
  5. Submit a pull request

πŸ“ License

This project is for educational purposes, recreating the early Instagram experience for learning Django development.


πŸ™ Acknowledgments

  • Instagram: For the original inspiration and design patterns
  • Django Community: For the excellent web framework
  • Bootstrap Team: For the responsive CSS framework

Built with ❀️ and nostalgia for the golden age of social media

About

Retro Instagram-style social network (2010 edition) built with Django. Includes user authentication, profiles, photo uploads, hashtags, likes, comments, and follow system.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors