LiveClass is a real-time interactive classroom platform that enables seamless collaboration between teachers and students through video, chat, and a shared whiteboard.
- Class Creation: Create virtual classrooms with customizable participant limits
- Session Control: Start/stop class sessions on demand
- Real-time Monitoring: View active participants and manage waitlists
- Easy Sharing: Generate unique class IDs to share with students
- Simple Join Process: Enter name and class ID to participate
- Waitlist System: Automatic waitlist placement when class is full
- Interactive Tools: Access to video, chat, and whiteboard features
- Video Conferencing: High-quality video/audio streaming via LiveKit
- Interactive Whiteboard:
- Drawing and erasing tools
- Real-time synchronization across participants
- Session replay functionality
- Live Chat: Instant messaging between participants
- Session Recording: Store and replay whiteboard and chat events
frontend
)
- Framework: Next.js with TypeScript
- UI: Tailwind CSS
- Real-time: LiveKit Client, WebSocket
- State Management: React Hooks
backend
)
- Runtime: Node.js with Express
- Database: MongoDB
- Real-time: WebSocket Server
- Video Streaming: LiveKit Server SDK
- Clone the repository
- Configure environment variables:
# backend/.env
MONGO_URI=your_mongodb_uri
LIVEKIT_API_KEY=your_livekit_key
LIVEKIT_API_SECRET=your_livekit_secret
PORT=5000
# frontend/.env.local
NEXT_PUBLIC_API_URL=http://localhost:5000- Start with Docker:
docker-compose upOr run locally:
# Backend
cd backend
npm install
npm run dev
# Frontend
cd frontend
npm install
npm run devPOST /api/classes # Create class
POST /api/classes/:id/start # Start session
POST /api/classes/:id/stop # End session
POST /api/classes/:id/join # Join class
GET /api/classes/:id/events # Get session events
- Atomic operations for class joining
- Race condition prevention
- Scalable waitlist system
Run concurrency tests:
cd backend
npm run test:concurrencyServices defined in
docker-compose.yml
:
- MongoDB database
- Backend API server
- Frontend Next.js server
- LiveKit media server
The application is deployed and accessible at:
-
Frontend: Hosted on Vercel
- Live URL: [https://live-class-tan.vercel.app/]
- Automatic deployments are triggered on push to the main branch
-
Backend: Hosted on Render
- API URL: [https://liveclass-xh6r.onrender.com/]
- Automatic deployments are triggered on push to the main branch
- Deploy using the Vercel dashboard or CLI
- Environment variables should be configured in Vercel project settings
- Use
.env.localas reference for required environment variables
- Deploy using Render Web Services
- Configure environment variables in Render dashboard
- Use
backend/.env.exampleas reference for required environment variables
- User authentication system
- Video session recording
- Enhanced whiteboard tools
- Analytics dashboard
- Breakout rooms
- Secure WebSocket connections
- LiveKit token-based authentication
- Rate limiting on API endpoints
- Participant validation
- Fork the repository
- Create a feature branch
- Commit changes
- Push to the branch
- Submit a pull request
-
Fork the Repository
# Visit the repository URL in your browser # Click the "Fork" button in the top-right corner of the page # Select your GitHub account as the destination
-
Clone Your Fork
# Replace YOUR-USERNAME with your GitHub username git clone https://github.com/YOUR-USERNAME/LiveClass.git cd LiveClass
-
Add Upstream Remote
git remote add upstream https://github.com/ORIGINAL-OWNER/LiveClass.git git remote -v
-
Keep Your Fork Updated
git fetch upstream git checkout main git merge upstream/main
-
Create Feature Branch
git checkout -b feature/your-feature-name
-
Push Changes
git add . git commit -m "Description of changes" git push origin feature/your-feature-name
-
Create Pull Request
- Go to your fork on GitHub
- Click "Pull Request"
- Select your feature branch
- Click "Create Pull Request"
This project is licensed under the MIT License.