Skip to content

LinkedUp is a full-stack social media platform inspired by LinkedIn. It allows users to create accounts, make posts, react to content, and interact with other users. The project demonstrates a clean system design with a modular backend (app, api, core) and a structured frontend (templates, static) while using JSON-based persistence for data storage

Notifications You must be signed in to change notification settings

garvjain7/linkedUp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

LinkedUp - Social Networking Platform

Django Python License

LinkedUp is a comprehensive social networking platform built with Django, designed to connect professionals and foster meaningful interactions. It features real-time notifications, premium subscriptions, advanced search capabilities, and analytics to provide insights into user engagement.

πŸš€ Features

Core Functionality

  • User Authentication & Profiles: Secure registration, login, and detailed user profiles
  • Posts & Interactions: Create, share, and engage with posts through comments and reactions
  • Real-time Notifications: Instant notifications for likes, comments, and follows
  • Feed System: Personalized content feed with algorithmic ranking
  • Advanced Search: Find users, posts, and content with powerful search capabilities

Premium Features

  • Premium Subscriptions: Enhanced features for power users
  • Analytics Dashboard: Comprehensive insights into user engagement and content performance
  • Priority Support: Dedicated support for premium members

Technical Features

  • RESTful API: Complete API coverage with Django REST Framework
  • Real-time Updates: WebSocket support for live notifications
  • Caching: Redis-based caching for improved performance
  • Background Tasks: Celery for asynchronous processing
  • Responsive Design: Mobile-first design with skeleton loaders

πŸ›  Tech Stack

Backend

  • Django 4.2.8 - Web framework
  • Django REST Framework - API development
  • PostgreSQL - Primary database (SQLite for development)
  • Redis - Caching and session storage
  • Celery - Background task processing

Frontend

  • HTML5/CSS3 - Responsive design
  • JavaScript (ES6+) - Interactive features
  • Skeleton Loaders - Improved UX during loading

DevOps & Tools

  • Docker - Containerization
  • Gunicorn - WSGI server
  • Nginx - Reverse proxy
  • pytest - Testing framework
  • Black/Flake8 - Code formatting and linting

πŸ“‹ Prerequisites

  • Python 3.8 or higher
  • PostgreSQL (recommended for production) or SQLite (for development)
  • Redis (for caching and Celery)
  • Docker & Docker Compose (optional, for containerized deployment)

πŸš€ Installation & Setup

1. Clone the Repository

git clone https://github.com/yourusername/linkedup.git
cd linkedup

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. Environment Configuration

# Copy the example settings file
cp config/settings_example.py config/settings.py

# Edit config/settings.py with your configuration
# Update SECRET_KEY, database settings, etc.

5. Database Setup

# Run migrations
python manage.py makemigrations
python manage.py migrate

# Create superuser
python manage.py createsuperuser

6. Load Sample Data (Optional)

python scripts/seed_data.py

7. Run Development Server

python manage.py runserver

Visit http://localhost:8000 to access the application.

πŸ”§ Configuration

Environment Variables

Create a .env file in the project root:

SECRET_KEY=your-secret-key-here
DEBUG=True
DATABASE_URL=postgresql://user:password@localhost:5432/linkedup
REDIS_URL=redis://localhost:6379/0
CELERY_BROKER_URL=redis://localhost:6379/0
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_HOST_USER=your-email@gmail.com
EMAIL_HOST_PASSWORD=your-app-password

Database Configuration

For PostgreSQL, update config/settings.py:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'linkedup_db',
        'USER': 'your_db_user',
        'PASSWORD': 'your_db_password',
        'HOST': 'localhost',
        'PORT': '5432',
    }
}

πŸ“– Usage

API Endpoints

Authentication

  • POST /api/v1/auth/login/ - User login
  • POST /api/v1/auth/register/ - User registration
  • POST /api/v1/auth/logout/ - User logout

Posts

  • GET /api/v1/posts/ - List posts
  • POST /api/v1/posts/ - Create post
  • GET /api/v1/posts/{id}/ - Get post details
  • PUT /api/v1/posts/{id}/ - Update post
  • DELETE /api/v1/posts/{id}/ - Delete post

Users

  • GET /api/v1/users/ - List users
  • GET /api/v1/users/{id}/ - Get user profile
  • PUT /api/v1/users/{id}/ - Update user profile

Reactions

  • POST /api/v1/reactions/ - Add reaction
  • DELETE /api/v1/reactions/{id}/ - Remove reaction

Notifications

  • GET /api/v1/notifications/ - List notifications
  • PUT /api/v1/notifications/{id}/read/ - Mark as read

Frontend Pages

  • / - Home feed
  • /profile/ - User profile
  • /notifications/ - Notifications page

πŸ§ͺ Testing

Run Tests

# Run all tests
pytest

# Run with coverage
pytest --cov=apps --cov-report=html

# Run specific app tests
pytest tests/api/auth/

Code Quality

# Format code
black .

# Check style
flake8 .

# Sort imports
isort .

πŸš€ Deployment

Docker Deployment

# Build and run with Docker Compose
docker-compose up -d

# Run migrations in container
docker-compose exec web python manage.py migrate

# Create superuser
docker-compose exec web python manage.py createsuperuser

Production Deployment

  1. Set DEBUG = False in settings
  2. Configure production database (PostgreSQL)
  3. Set up Redis for caching
  4. Configure Celery for background tasks
  5. Set up Nginx as reverse proxy
  6. Enable SSL/TLS certificates
  7. Configure environment variables

Environment Setup

# Install production dependencies
pip install gunicorn whitenoise

# Collect static files
python manage.py collectstatic

# Run with Gunicorn
gunicorn config.wsgi:application --bind 0.0.0.0:8000

πŸ“ Project Structure

linkedup/
β”œβ”€β”€ api/                    # API versioning
β”‚   └── v1/
β”‚       β”œβ”€β”€ router.py       # API routing
β”‚       └── [app]/          # App-specific API views
β”œβ”€β”€ apps/                   # Django apps
β”‚   β”œβ”€β”€ auth/              # Authentication
β”‚   β”œβ”€β”€ users/             # User management
β”‚   β”œβ”€β”€ posts/             # Posts and content
β”‚   β”œβ”€β”€ comments/          # Comments system
β”‚   β”œβ”€β”€ reactions/         # Reactions (likes, etc.)
β”‚   β”œβ”€β”€ notifications/     # Real-time notifications
β”‚   β”œβ”€β”€ feed/              # Content feed
β”‚   β”œβ”€β”€ premium/           # Premium features
β”‚   β”œβ”€β”€ search/            # Search functionality
β”‚   └── analytics/         # Analytics and insights
β”œβ”€β”€ config/                # Django configuration
β”‚   β”œβ”€β”€ settings.py        # Main settings
β”‚   β”œβ”€β”€ urls.py            # URL configuration
β”‚   └── wsgi.py            # WSGI application
β”œβ”€β”€ core/                  # Core utilities
β”‚   β”œβ”€β”€ cache/             # Caching utilities
β”‚   β”œβ”€β”€ database/          # Database utilities
β”‚   β”œβ”€β”€ locking/           # Distributed locking
β”‚   β”œβ”€β”€ pagination/        # Pagination utilities
β”‚   └── security/          # Security utilities
β”œβ”€β”€ docker/                # Docker configuration
β”œβ”€β”€ media/                 # User uploaded files
β”œβ”€β”€ scripts/               # Utility scripts
β”œβ”€β”€ static/                # Static files (CSS, JS, images)
β”œβ”€β”€ templates/             # HTML templates
β”œβ”€β”€ tests/                 # Test suite
└── requirements.txt       # Python dependencies

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow PEP 8 style guidelines
  • Write tests for new features
  • Update documentation as needed
  • Ensure all tests pass before submitting PR

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Django community for the excellent framework
  • Django REST Framework for API development
  • All contributors and supporters

πŸ“ž Support

For support, email support@linkedup.com or join our Discord community.


Made with ❀️ by the LinkedUp team

About

LinkedUp is a full-stack social media platform inspired by LinkedIn. It allows users to create accounts, make posts, react to content, and interact with other users. The project demonstrates a clean system design with a modular backend (app, api, core) and a structured frontend (templates, static) while using JSON-based persistence for data storage

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published