A real-time, secure, and collaborative virtual study environment. This application allows users to create and join study rooms, chat in real-time with end-to-end encryption, and manage study sessions with integrated moderation tools.
- Framework: Django & Django REST Framework (DRF)
- Real-time: Django Channels (WebSockets)
- Database: PostgreSQL
- Caching/Channel Layer: Redis
- Authentication: JWT (HttpOnly Cookies) + SimpleJWT
- Security:
cryptography(Fernet) for message content encryption
- Framework: React (Vite)
- Language: TypeScript
- State/Data Fetching: TanStack Query (React Query)
- UI Component Library: Material UI (MUI) v5
- Forms: React Hook Form + Zod Validation
- Icons: Lucide React
- Containerization: Docker & Docker Compose
- Authentication System
- Secure Registration & Login
- JWT-based auth with automatic token refreshing
- Password Reset flow (Email simulation)
- Room Management
- Create public or private (invite-only) rooms
- Room capacity limits
- Join/Leave functionality
- Real-time Chat
- WebSocket-based instant messaging
- Encrypted Messaging: Messages are encrypted at rest and in transit
- Edit & Delete messages
- Typing indicators
- "Seen by" read receipts
- Moderation Tools
- Room Owners/Admins can Kick users
- Mute users for specific durations
- Promote members to Moderators/Admins
- Presence System
- Live "Online Users" list in sidebar
- Message Reactions: Add emoji reactions to messages (Backend stubbed, UI pending)
- Study Tools: Integrated Pomodoro timer (UI stubbed)
- File Sharing: Secure file upload and sharing within rooms
- Video/Audio: WebRTC integration for voice/video channels
- Private DM: Direct messaging between users
- Notifications: Push notifications for mentions and room invites
- Docker & Docker Compose
- Node.js (v18+)
- Python (v3.10+)
git clone https://github.com/tesfa27/virtual-study-room.git
cd virtual-study-roomCreate a .env file in the root directory (or use the provided example):
# Database
POSTGRES_DB=virtual_study_room
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
DB_HOST=db
DB_PORT=5432
# Redis
REDIS_HOST=redis
REDIS_PORT=6379
# Backend
SECRET_KEY=dev_secret_key_change_in_prod
DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1
CORS_ALLOWED_ORIGINS=http://localhost:5173
# Encryption (32 url-safe base64-encoded bytes)
ENCRYPTION_KEY=...This will start the Backend (Django), Frontend (Vite), Database (Postgres), and Redis.
docker compose up --build- Frontend: http://localhost:5173
- Backend API: http://localhost:8000/api
- Admin Panel: http://localhost:8000/admin
Backend:
cd backend
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
pip install -r requirements.txt
python manage.py migrate
python manage.py runserverFrontend:
cd frontend
npm install
npm run devvirtual-study-room/
├── backend/ # Django Project
│ ├── config/ # Settings, ASGI, WSGI
│ ├── rooms/ # Room & Chat Logic (Consumers, Views, Models)
│ ├── users/ # Auth & User Management
│ └── utils/ # Helpers (Encryption, etc.)
│
├── frontend/ # React Project
│ ├── src/
│ │ ├── api/ # API Client & Endpoints
│ │ ├── components/ # Reusable UI Components
│ │ ├── hooks/ # Custom React Hooks
│ │ ├── pages/ # Route Pages
│ │ └── types/ # TypeScript Interfaces & Zod Schemas
│ └── ...
│
└── docker-compose.yaml # Orchestration
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request