A Real-Time Social Networking Platform (MVP)
SocialConnect is a web-based social networking platform built with Django and WebSockets, designed to support real-time interaction at scale. It enables users to create profiles, share posts, discover and connect with others, communicate via chat and calls, and participate in public or private virtual rooms.
This project is developed as a production-ready MVP supporting up to 1,000 active users, following industry-standard backend architecture and security practices.
- Secure user registration and authentication
- Customizable user profiles (avatar, bio, interests)
- Connection system (send, accept, reject, block)
- Create posts with text, images, and videos
- Global feed visible to all authenticated users
- Pagination / infinite scrolling
- Admin moderation support
- One-to-one real-time chat (WebSockets)
- Image sharing in chat
- Typing indicators & read receipts
- In-app unread message indicators
- One-to-one voice and video calls
- WebRTC peer-to-peer communication
- Call signaling via WebSockets
- Mute, camera toggle, busy-state handling
- Public rooms (visible, no password)
- Private rooms (password protected)
- Group text chat
- Group video calls (up to 6 participants)
- Host moderation (kick users)
- Auto-delete rooms when inactive
- Python 3.11+
- Django 5.x
- Django REST Framework
- Django Channels (WebSockets)
- HTML5 (Semantic)
- CSS3 (Flexbox, Grid)
- Vanilla JavaScript (ES6+)
- PostgreSQL (Database)
- Redis (WebSocket & caching layer)
- WebRTC (Audio/Video Calls)
- AWS S3 / MinIO (Media Storage)
- Nginx (Reverse Proxy)
- Docker & Docker Compose (Deployment)
βββ apps
β βββ accounts
β β βββ admin.py
β β βββ apps.py
β β βββ __init__.py
β β βββ migrations
β β βββ models.py
β β βββ __pycache__
β β βββ serializers.py
β β βββ tests.py
β β βββ urls.py
β β βββ views.py
β βββ calls
β β βββ admin.py
β β βββ apps.py
β β βββ consumers.py
β β βββ __init__.py
β β βββ migrations
β β βββ models.py
β β βββ __pycache__
β β βββ routing.py
β β βββ tests.py
β β βββ urls.py
β β βββ views.py
β βββ chat
β β βββ admin.py
β β βββ apps.py
β β βββ consumers.py
β β βββ context_processors.py
β β βββ __init__.py
β β βββ migrations
β β βββ models.py
β β βββ __pycache__
β β βββ routing.py
β β βββ tests.py
β β βββ urls.py
β β βββ views.py
β βββ posts
β β βββ admin.py
β β βββ apps.py
β β βββ background.py
β β βββ __init__.py
β β βββ migrations
β β βββ models.py
β β βββ __pycache__
β β βββ tests.py
β β βββ threadpool.py
β β βββ urls.py
β β βββ views.py
β βββ rooms
β βββ admin.py
β βββ apps.py
β βββ __init__.py
β βββ migrations
β βββ models.py
β βββ __pycache__
β βββ tests.py
β βββ views.py
βββ backend
β βββ asgi.py
β βββ __init__.py
β βββ __pycache__
β β βββ asgi.cpython-312.pyc
β β βββ asgi.cpython-313.pyc
β β βββ __init__.cpython-312.pyc
β β βββ __init__.cpython-313.pyc
β β βββ settings.cpython-312.pyc
β β βββ settings.cpython-313.pyc
β β βββ urls.cpython-312.pyc
β β βββ urls.cpython-313.pyc
β βββ settings.py
β βββ urls.py
β βββ wsgi.py
βββ db.sqlite3
βββ logs
β βββ django.log
βββ manage.py
βββ media
β βββ posts
β βββ 1000065337.jpg
β βββ 1000065709.mp4
β βββ 1000065711.mp4
β βββ 1000187680.jpg
β βββ arsasdfwurtow.jpg
β βββ arsasdfwurtow_L61BVrk.jpg
β βββ images_5bcsZjl.jpeg
β βββ images.jpeg
β βββ images_MmiweKO.jpeg
β βββ images_pHLSltP.jpeg
β βββ images_sQhSWQH_processed.jpg
β βββ mountainsss_processed.jpg
β βββ mountww45er_0dL7s9i_ZC90aqq.jpg
β βββ mountww45er.jpg
β βββ photo_xLA6aTd.jpg
βββ staticfiles
β βββ admin
β β βββ css
β β βββ img
β β βββ js
β βββ rest_framework
β β βββ css
β β βββ docs
β β βββ fonts
β β βββ img
β β βββ js
β βββ staticfiles.json
βββ templates
βββ addpost.html
βββ auth
β βββ login.html
β βββ reset_manual.html
β βββ signup.html
βββ base.html
βββ call_interface.html
βββ chat
β βββ chat.html
β βββ inbox.html
βββ components
βββ home.html
βββ includes
β βββ single_post.html
βββ profile
β βββ edit_profile.html
β βββ profile.html
βββ search.html
---
## βοΈ Setup Instructions (Local Development)
### 1οΈβ£ Clone Repository
```bash
git clone https://github.com/<arshads28>/socialconnect.git
cd socialconnect
python -m venv venv
source venv/bin/activate # Linux/macOS
venv\Scripts\activate # Windowspip install -r requirements.txtCreate a .venv file:
DEBUG=True
SECRET_KEY=your-secret-key
DATABASE_URL=postgres://user:password@localhost:5432/socialconnect
REDIS_URL=redis://127.0.0.1:6379
cd backend
python manage.py makemigrations
python manage.py migratepython manage.py createsuperuseruvicorn backend.asgi:application --reload --host 0.0.0.0 --port 8000for production
gunicorn backend.asgi:application -w 4 -k uvicorn.workers.UvicornWorker -b 0.0.0.0:8000
for frontend use local
npx expo start --dev-client --clear
to built app for apk for configuration run this : npx expo prebuild
eas build -p android --profile preview eas build -p ios --profile preview
or
eas build -p ios --profile development
eas build -p android --profile development npx expo start --dev-client --clear
- WebSocket connections handled via Django Channels
- Redis required for channel layer
- Secure WebSockets (WSS) enforced in production
- WebRTC signaling managed through WebSocket consumers
- Password hashing (Argon2 / PBKDF2)
- CSRF & CORS protection
- Secure WebSocket authentication
- Input sanitization to prevent XSS
- Rate limiting for login and messaging
- No local media storage in production
- Supports 1,000 concurrent users
- WebSocket latency < 300ms
- Database indexing for performance
- Modular Django app architecture
- Redis & PostgreSQL can be scaled independently
- Unit tests for models and services
- Integration tests for chat flows
- Manual testing for WebRTC
- Load testing using tools like Locust
- Push notifications (Email/SMS/Mobile)
- Post likes & comments
- User mentions and hashtags
- Call recording
- AI-based recommendations
- Source code (GitHub)
- Database schema (ER Diagram)
setup.mdβ Local setup guidedeployment.mdβ Production deployment guide
This project is licensed under the MIT License.
Arshad Backend Developer | Django | WebSockets | WebRTC
to make build locally just apk
npm install
npx expo prebuild --clean
cd android .\gradlew assembleDebug