A comprehensive, full-stack web application that enables virtual study groups to collaborate in real-time. VStudy provides a modern, feature-rich environment for students and educators to share resources, conduct live sessions, and work together seamlessly across multiple features and devices.
Version: 0.1.0 | Status: Active Development
- Features
- Tech Stack
- Prerequisites
- Installation
- Configuration
- Running the Application
- Project Structure
- Core Modules
- API Documentation
- Database Schema
- Real-Time Features
- Authentication
- Development
- Testing
- Deployment
- Contributing
- License
- Support
- Real-Time Communication: Instant messaging and notifications via Socket.IO
- Study Groups Management: Create, join, and manage multiple study groups
- Live Video Sessions: Integrated video conferencing with annotation tools
- Document Collaboration: Real-time collaborative document editing with Quill rich text editor
- Whiteboard & Drawing: Interactive whiteboard for sketching and explaining concepts
- File Sharing: Secure file upload and sharing with group members
- Task Management: Create, assign, and track study tasks and assignments
- AI-Powered Assistance: Integration with Google AI (Gemini) for intelligent suggestions
- Document Generation: Export notes and documents as PDF with jsPDF
- Multi-Language Support: i18n support for internationalization
- Drag & Drop Interface: Intuitive drag-and-drop components with react-beautiful-dnd
- Video Annotation: Mark up and annotate during video sessions
- Cross-Group Collaboration: Collaborate across multiple study groups
- Device Synchronization: Seamless experience across desktop and mobile devices
- Content Moderation: Built-in content moderation for safe community
- Analytics Dashboard: Track group performance and activity metrics
- Theme Customization: Dark/Light mode support
- Accessibility Features: WCAG compliant with keyboard navigation and screen reader support
- Rich Note-Taking: Quill-based rich text editor with formatting
- Emoji Support: Integrated emoji picker for expressive communication
- Search Functionality: Full-text search across messages and documents
- Notification System: Smart notifications with snackbar and toast alerts
- YouTube Integration: Embed and share YouTube videos
- Meeting Scheduling: Schedule and manage group study sessions
- Report Generation: Generate performance reports and statistics
- Framework: React 18.3.1
- UI Libraries: Material-UI (MUI), Ant Design (antd)
- State Management: Redux Toolkit
- Styling: Emotion, CSS-in-JS
- Routing: React Router v6
- Real-Time: Socket.IO Client
- Rich Text Editor: Quill, react-quill-new
- Drag & Drop: react-beautiful-dnd, react-draggable
- Internationalization: i18next, react-i18next
- Utilities: Axios, date-fns, react-icons
- PDF Generation: jsPDF, html2canvas, docx
- Video Player: react-player
- Notifications: Notistack, react-toastify
- Virtualization: react-window (for large lists)
- P2P Communication: simple-peer (for WebRTC)
- Runtime: Node.js (v24+)
- Framework: Express.js
- Database: MongoDB with Mongoose ODM
- Authentication: JWT (jsonwebtoken)
- Real-Time: Socket.IO
- Password Hashing: bcryptjs
- Security: Helmet, Express Rate Limit, XSS protection
- Email Service: Nodemailer
- Task Scheduling: node-cron
- Caching: Redis, node-cache
- AI Integration: Google GenAI API
- File Upload: Multer
- Validation: Validator
- HTTP Client: Axios
- Package Manager: npm
- Testing: Jest, Supertest
- Development: Nodemon
- Code Quality: ESLint
- Environment Variables: dotenv
- Monitoring & Logs: Custom logging middleware
Before you begin, ensure you have the following installed:
- Node.js: Version 24.0.0 or higher (Download)
- npm: Version 10.0.0 or higher (comes with Node.js)
- MongoDB: Version 5.0 or higher (Download or use MongoDB Atlas)
- Redis: Version 6.0 or higher (Download) (Optional but recommended for production)
- Git: For version control (Download)
- RAM: Minimum 4GB (8GB recommended)
- Disk Space: 2GB minimum
- OS: Windows, macOS, or Linux
git clone https://github.com/yourusername/vstudy.git
cd vstudycd ./frontend # or at root if frontend is there
npm installcd ./backend
npm install
cd ..node --version # Should be v24.0.0 or higherCreate a .env.local file in the frontend root:
REACT_APP_API_URL=http://localhost:5000
REACT_APP_SOCKET_URL=http://localhost:5000
REACT_APP_ENV=developmentCreate a .env file in the backend root:
# Server Configuration
PORT=5000
NODE_ENV=development
CLIENT_URL=http://localhost:3000
# Database
MONGO_URI=mongodb://localhost:27017/vstudy
# Or use MongoDB Atlas:
# MONGO_URI=mongodb+srv://username:password@cluster.mongodb.net/vstudy
# Redis (Optional)
REDIS_URL=redis://localhost:6379
# Authentication
JWT_SECRET=your_super_secret_jwt_key_here_min_32_chars
JWT_EXPIRE=7d
REFRESH_TOKEN_SECRET=your_refresh_secret_key_here
REFRESH_TOKEN_EXPIRE=30d
# Email Service (Nodemailer)
EMAIL_SERVICE=gmail
EMAIL_USER=your-email@gmail.com
EMAIL_PASSWORD=your-app-specific-password
# Google AI (Gemini API)
GOOGLE_API_KEY=your_google_genai_api_key
# File Upload
MAX_FILE_SIZE=52428800 # 50MB in bytes
UPLOAD_DIR=./uploads
# Rate Limiting
RATE_LIMIT_WINDOW_MS=900000 # 15 minutes
RATE_LIMIT_MAX_REQUESTS=100
# Session Configuration
SESSION_COOKIE_SECURE=false # Set to true in production with HTTPS
SESSION_COOKIE_HTTP_ONLY=true
# Logging
LOG_LEVEL=debugProduction:
NODE_ENV=production
CLIENT_URL=https://yourdomain.com
SESSION_COOKIE_SECURE=true
JWT_EXPIRE=7dTesting:
NODE_ENV=test
MONGO_URI=mongodb://localhost:27017/vstudy-test
PORT=5001Terminal 1 - Backend:
cd backend
npm run dev
# Backend will run on http://localhost:5000Terminal 2 - Frontend:
npm start
# Frontend will run on http://localhost:3000npm run dev:allBuild Frontend:
npm run build
# Creates optimized build in ./build directoryStart Backend:
cd backend
npm start
# Backend runs on configured PORT (default 5000)Access Application:
- Open
http://localhost:3000in your browser
vstudy/
βββ public/ # Static assets
β βββ index.html # HTML template
β βββ favicon.ico # Favicon
β βββ locales/ # i18n translation files
β βββ images/ # Static images
β
βββ src/ # Frontend React application
β βββ components/ # Reusable React components
β β βββ layout/ # Layout components (Header, Footer, etc.)
β β βββ common/ # Shared UI components
β β βββ accessibility/ # A11y components (ARIA, screen reader support)
β β βββ ...
β βββ pages/ # Page components (routing destinations)
β β βββ public/ # Public pages (Home, About, Features)
β β βββ auth/ # Authentication pages (Login, Register)
β β βββ Dashboard/ # Dashboard and study group pages
β βββ features/ # Redux slices and feature-specific logic
β βββ hooks/ # Custom React hooks
β βββ contexts/ # React Context for state management
β β βββ AuthContext.js
β β βββ ThemeContext.js
β β βββ ...
β βββ services/ # API service calls (Axios)
β βββ utils/ # Utility functions
β βββ styles/ # Global styles and theme configuration
β βββ config/ # Configuration files
β βββ i18n/ # i18n configuration
β βββ assets/ # Images, icons, fonts
β βββ App.js # Main App component
β βββ index.js # React entry point
β βββ store.js # Redux store configuration
β
βββ backend/ # Node.js/Express backend
β βββ config/ # Configuration files
β β βββ redis.js # Redis configuration
β β βββ database.js # MongoDB connection
β β βββ ...
β βββ models/ # Mongoose schemas
β β βββ User.js
β β βββ Group.js
β β βββ Message.js
β β βββ ...
β βββ routes/ # Express route handlers
β β βββ auth.js # Authentication routes
β β βββ group.js # Group management routes
β β βββ message.js # Messaging routes
β β βββ video.js # Video session routes
β β βββ ...
β βββ middleware/ # Express middleware
β β βββ auth.js # JWT verification
β β βββ errorHandler.js # Error handling
β β βββ ...
β βββ services/ # Business logic layer
β β βββ groupService.js
β β βββ messageService.js
β β βββ ...
β βββ sockets/ # Socket.IO event handlers
β β βββ groupSocket.js
β β βββ messageSocket.js
β β βββ ...
β βββ utils/ # Utility functions
β βββ migrations/ # Database migrations
β βββ logs/ # Application logs
β βββ uploads/ # File uploads directory
β βββ server.js # Express app initialization
β βββ package.json
β βββ .env # Environment variables
β
βββ build/ # Production build output (generated)
βββ node_modules/ # Dependencies (generated)
βββ .git/ # Git repository
βββ .gitignore # Git ignore rules
βββ package.json # Root package configuration
βββ README.md # This file
βββ .env # Root environment variables
- User registration with email verification
- Login with JWT token generation
- Password reset functionality
- Token refresh mechanism
- OAuth integration ready
- Create and manage study groups
- Member invitation and management
- Group settings and customization
- Access control and permissions
- Group analytics
- Instant messaging between group members
- Message history and pagination
- Emoji and rich text support
- Message editing and deletion
- Read receipts and typing indicators
- Real-time video conferencing
- Screen sharing capabilities
- Recording sessions
- Meeting scheduling
- WebRTC integration
- Real-time collaborative editing
- Document version history
- Change tracking
- Conflict resolution
- Real-time drawing and sketching
- Shape tools and annotations
- Color and brush customization
- Clear and undo/redo functionality
- Secure file upload with Multer
- File validation and scanning
- Download and preview
- Storage management
- Group activity tracking
- User engagement metrics
- Performance statistics
- Report generation
- Google Gemini AI integration
- Smart suggestions and content enhancement
- Automated summaries
- Q&A assistance
- Development:
http://localhost:5000/api - Production:
https://yourdomain.com/api
POST /api/auth/register
Content-Type: application/json
{
"email": "user@example.com",
"password": "securePassword123",
"firstName": "John",
"lastName": "Doe"
}POST /api/auth/login
Content-Type: application/json
{
"email": "user@example.com",
"password": "securePassword123"
}
Response:
{
"token": "eyJhbGc...",
"refreshToken": "eyJhbGc...",
"user": { ... }
}POST /api/auth/refresh
Content-Type: application/json
{
"refreshToken": "eyJhbGc..."
}GET /api/groups
Authorization: Bearer <token>POST /api/groups
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "Advanced Calculus Study Group",
"description": "Group for advanced calculus students",
"subject": "Mathematics"
}GET /api/groups/:groupId
Authorization: Bearer <token>PUT /api/groups/:groupId
Authorization: Bearer <token>
Content-Type: application/jsonDELETE /api/groups/:groupId
Authorization: Bearer <token>GET /api/messages/:groupId?limit=50&page=1
Authorization: Bearer <token>POST /api/messages/:groupId
Authorization: Bearer <token>
Content-Type: application/json
{
"content": "This is a message",
"type": "text"
}PUT /api/messages/:messageId
Authorization: Bearer <token>DELETE /api/messages/:messageId
Authorization: Bearer <token>POST /api/files/upload
Authorization: Bearer <token>
Content-Type: multipart/form-data
Body: {
"file": <binary file data>,
"groupId": "groupId123"
}GET /api/files/:fileId
Authorization: Bearer <token>DELETE /api/files/:fileId
Authorization: Bearer <token>See backend/routes/ directory for all available endpoints and their parameters.
{
_id: ObjectId,
email: String (unique),
firstName: String,
lastName: String,
password: String (hashed),
avatar: String,
bio: String,
role: String (user/admin/moderator),
groups: [ObjectId],
preferences: Object,
createdAt: Date,
updatedAt: Date
}{
_id: ObjectId,
name: String,
description: String,
subject: String,
image: String,
owner: ObjectId,
members: [ObjectId],
moderators: [ObjectId],
settings: Object,
privacy: String (public/private),
createdAt: Date,
updatedAt: Date
}{
_id: ObjectId,
groupId: ObjectId,
userId: ObjectId,
content: String,
type: String (text/image/file/video),
attachments: [String],
reactions: [Object],
readBy: [ObjectId],
editedAt: Date,
createdAt: Date
}{
_id: ObjectId,
groupId: ObjectId,
title: String,
description: String,
assignedTo: [ObjectId],
dueDate: Date,
status: String (pending/in-progress/completed),
priority: String (low/medium/high),
createdBy: ObjectId,
createdAt: Date,
updatedAt: Date
}{
_id: ObjectId,
groupId: ObjectId,
title: String,
startTime: Date,
endTime: Date,
participants: [ObjectId],
recordingUrl: String,
status: String (scheduled/active/ended),
createdAt: Date
}connect: Client connects to serverdisconnect: Client disconnectsreconnect: Client reconnects after disconnect
messageReceived: New message in groupmessageUpdated: Message editedmessageDeleted: Message removedtypingIndicator: User is typing
memberJoined: New member added to groupmemberLeft: Member left the groupmemberUpdated: Member information updatedgroupUpdated: Group settings changed
videoSessionStarted: Video call initiateduserJoinedVideo: User joined video calluserLeftVideo: User left video callscreenShareStarted: Screen sharing activatedscreenShareEnded: Screen sharing stopped
documentUpdated: Content changedcursorMoved: User cursor positionselectionChanged: User selection changedcollaboratorJoined: Collaborator joined documentcollaboratorLeft: Collaborator left document
drawingUpdated: Drawing made on whiteboardwhiteboardCleared: Whiteboard clearedshapeAdded: Shape tool usedcolorChanged: Brush color changed
-
Registration
- User provides email and password
- Email verification sent
- User account created after verification
-
Login
- User provides credentials
- Server validates and issues JWT
- Token stored in secure HTTP-only cookie
-
Request Authentication
- Client includes JWT in Authorization header:
Bearer <token> - Middleware verifies token validity
- Request proceeds if valid, rejects if expired/invalid
- Client includes JWT in Authorization header:
-
Token Refresh
- Access token expires after 7 days
- Refresh token can be used to get new access token
- Refresh token expires after 30 days
- Passwords hashed with bcryptjs (salt rounds: 10)
- JWT tokens with expiration
- Rate limiting on sensitive endpoints
- CORS configured for allowed origins
- Helmet.js for HTTP headers security
- XSS protection via sanitization
- CSRF tokens for state-changing requests
-
Install dependencies (already done in Installation section)
-
Set up MongoDB locally
# macOS (using Homebrew) brew services start mongodb-community # Windows (using WSL) wsl -- sudo systemctl start mongodb # Or use MongoDB Atlas (cloud)
-
Start Redis (optional but recommended)
redis-server
-
Run development servers
# Terminal 1: Backend cd backend && npm run dev # Terminal 2: Frontend npm start
-
Access application
- Frontend: http://localhost:3000
- Backend: http://localhost:5000
- API: http://localhost:5000/api
- Nodemon: Auto-restart backend on file changes (
npm run devin backend) - React Fast Refresh: Auto-reload React components on changes
- Redux DevTools: Browser extension for Redux debugging
- VS Code Extensions: ESLint, Prettier, MongoDB for VS Code
- ESLint: Enforces consistent code style
- Prettier: Auto-formats code on save (if configured)
- Git Hooks: Pre-commit hooks for linting (if configured)
Frontend:
# Open Chrome DevTools (F12)
# Use React DevTools extension
# Use Redux DevTools extension
# Set breakpoints in Sources tabBackend:
# Debug mode
node --inspect backend/server.js
# Then open chrome://inspect in ChromeBackend Tests:
cd backend
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm test -- --coverageFrontend Tests:
# Run all tests
npm test
# Run tests in watch mode
npm test -- --watch
# Run tests with coverage
npm test -- --coverageBackend (backend/tests/):
- Unit tests for models and services
- Integration tests for API endpoints
- Socket.IO event tests
Frontend (src/__tests__/):
- Component tests with React Testing Library
- Hook tests
- Utility function tests
Example Backend Test:
describe('Auth API', () => {
it('should register a new user', async () => {
const res = await request(app)
.post('/api/auth/register')
.send({
email: 'test@example.com',
password: 'password123'
});
expect(res.status).toBe(201);
expect(res.body.user).toHaveProperty('email');
});
});Example Frontend Test:
import { render, screen } from '@testing-library/react';
import LoginPage from './LoginPage';
test('renders login form', () => {
render(<LoginPage />);
expect(screen.getByLabelText(/email/i)).toBeInTheDocument();
});- Git repository
- MongoDB Atlas account (cloud database)
- Redis Cloud account (optional)
- Environment variables configured
- Connect GitHub repository to Railway
- Configure environment variables in Railway dashboard
- Set start command:
npm start - Deploy automatically on push
- Push code to GitHub
- Import project in Vercel
- Set build command:
npm run build - Set output directory:
build - Add environment variables:
REACT_APP_API_URL=https://your-backend-api-url/api REACT_APP_SOCKET_URL=https://your-backend-api-url REACT_APP_ENV=production REACT_APP_CLIENT_URL=https://virtual-study-group-hazel.vercel.app REACT_APP_PRODUCTION_URL=https://virtual-study-group-hazel.vercel.app
- Deploy
Production Frontend URL: https://virtual-study-group-hazel.vercel.app
Dockerfile (Backend):
FROM node:24-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --production
COPY . .
EXPOSE 5000
CMD ["npm", "start"]Dockerfile (Frontend):
FROM node:24-alpine as builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM nginx:alpine
COPY --from=builder /app/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]Docker Compose:
version: '3.8'
services:
frontend:
build: .
ports:
- "3000:3000"
backend:
build: ./backend
ports:
- "5000:5000"
environment:
- MONGO_URI=${MONGO_URI}
- JWT_SECRET=${JWT_SECRET}
mongodb:
image: mongo:6
ports:
- "27017:27017"
volumes:
- mongo_data:/data/db
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
mongo_data:NODE_ENV=production
PORT=5000
CLIENT_URL=https://virtual-study-group-hazel.vercel.app
PRODUCTION_CLIENT_URL=https://virtual-study-group-hazel.vercel.app
# Database
MONGO_URI=mongodb+srv://user:pass@cluster.mongodb.net/vstudy
# Redis
REDIS_URL=redis://redistogo.com:12345
# Security
JWT_SECRET=long_random_secret_min_32_chars
JWT_EXPIRE=7d
# Email
EMAIL_SERVICE=SendGrid
SENDGRID_API_KEY=your_sendgrid_key
# Google AI
GOOGLE_API_KEY=your_api_key
# Logging
LOG_LEVEL=infoREACT_APP_API_URL=https://virtualstudygroup.onrender.com/api
REACT_APP_SOCKET_URL=https://virtualstudygroup.onrender.com
REACT_APP_ENV=production
REACT_APP_CLIENT_URL=https://virtual-study-group-hazel.vercel.app
REACT_APP_PRODUCTION_URL=https://virtual-study-group-hazel.vercel.app- Set
NODE_ENV=production - Use strong JWT secret
- Enable HTTPS/SSL
- Set secure cookies
- Configure rate limiting
- Set up error logging
- Configure backup strategy
- Set up monitoring and alerts
- Implement CI/CD pipeline
- Regular security audits
- Test disaster recovery
We welcome contributions! Here's how to get started:
-
Fork the repository
git clone https://github.com/yourusername/vstudy.git
-
Create a feature branch
git checkout -b feature/amazing-feature
-
Make your changes
- Follow existing code style
- Add tests for new features
- Update documentation
-
Commit your changes
git commit -m "Add amazing feature" -
Push to your branch
git push origin feature/amazing-feature
-
Open a Pull Request
- Describe your changes
- Link related issues
- Request review from maintainers
- Be respectful and inclusive
- Provide constructive feedback
- No harassment or discrimination
- Report violations to maintainers
- Naming: camelCase for variables/functions, PascalCase for components
- Comments: Only for complex logic
- Error Handling: Try-catch for async operations
- Logging: Use appropriate log levels (debug, info, warn, error)
- Testing: Write tests for new features
- Performance: Consider performance implications
- Security: Follow security best practices
This project is licensed under the MIT License - see the LICENSE file for details.
All dependencies used in this project are listed in respective package.json files. Each dependency maintains its own license. See LICENSE files in node_modules for specific third-party licenses.
- Documentation: Check existing docs and guides
- Issues: Search existing GitHub issues before creating new ones
- Discussions: Use GitHub Discussions for questions
- Email: Contact support@vstudy.com
- Discord/Slack: Join our community server
When reporting bugs, please include:
- Description: Clear explanation of the issue
- Steps to Reproduce: Detailed reproduction steps
- Expected Behavior: What should happen
- Actual Behavior: What actually happens
- Environment: OS, Node version, browser, etc.
- Screenshots: Visual representation if applicable
- Error Logs: Relevant error messages or stack traces
To suggest new features:
- Use GitHub Discussions
- Clearly describe the use case
- Explain the expected behavior
- Provide mock-ups if applicable
- Consider implementation complexity
- Contributors: Thanks to all contributors who have helped with this project
- Community: Appreciation for community feedback and suggestions
- Libraries: Gratitude to all open-source libraries we depend on
- Users: Thanks to all users testing and improving the platform
- GitHub Stars: β Star us if you find this helpful!
- Active Contributors: Growing team of developers
- Lines of Code: Frontend + Backend
- Test Coverage: Continuous improvement
- Last Updated: 2026
- GitHub Repository: https://github.com/yourusername/vstudy
- Project Website: https://vstudy.com
- Documentation: https://docs.vstudy.com
- Community Forum: https://forum.vstudy.com
- Issue Tracker: https://github.com/yourusername/vstudy/issues
- Initial project setup
- Core features implementation
- Real-time communication
- User authentication
- Study group management
- Document collaboration
For detailed changelog, see CHANGELOG.md
- Mobile app (React Native)
- Advanced scheduling system
- Marketplace for study materials
- Peer review system
- Gamification elements
- Video transcription
- Advanced analytics
- API for third-party integrations
- Plugin system
- Enterprise features
See ROADMAP.md for detailed plans.
If you found this project helpful:
- β Star this repository
- π Report bugs and suggest features
- π Share with friends and colleagues
- π¬ Participate in discussions
- π€ Contribute code improvements
Copyright Β© 2026 VStudy. All rights reserved.
Happy studying! π