Skip to content

pant5803/codesync_online_interview_platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

CodeSync - Online Interview Platform

A comprehensive online interview platform built with the MERN stack (MongoDB, Express.js, React, Node.js) featuring video calling, real-time code editing, and interview scheduling capabilities.

๐Ÿš€ Features

Core Features

  • Video Calling: Real-time peer-to-peer video communication using WebRTC
  • Screen Sharing: Share your screen during interviews
  • Code Editor: Monaco Editor with syntax highlighting and real-time collaboration
  • Code Execution: Execute code in multiple programming languages using external APIs
  • Interview Scheduling: Schedule and manage interviews with calendar integration
  • Real-time Chat: Built-in chat system for communication during interviews
  • User Management: Role-based access control (Interviewer, Candidate, Admin)

Technical Features

  • Real-time Collaboration: Socket.io for live code editing and chat
  • Authentication: JWT-based authentication with role-based authorization
  • Responsive Design: Modern UI built with Tailwind CSS
  • Code Execution: Integration with Judge0 API for code compilation and execution
  • File Management: Upload/download code files
  • Interview Feedback: Comprehensive feedback system for interviewers

๐Ÿ› ๏ธ Tech Stack

Backend

  • Node.js - Runtime environment
  • Express.js - Web framework
  • MongoDB - Database
  • Mongoose - ODM for MongoDB
  • Socket.io - Real-time communication
  • JWT - Authentication
  • bcryptjs - Password hashing
  • Express Validator - Input validation

Frontend

  • React - UI library
  • Monaco Editor - Code editor
  • Socket.io Client - Real-time communication
  • Tailwind CSS - Styling
  • React Router - Navigation
  • React Hook Form - Form management
  • React Hot Toast - Notifications
  • Lucide React - Icons

External APIs

  • Judge0 - Code execution engine
  • WebRTC - Video calling

๐Ÿ“‹ Prerequisites

Before running this application, make sure you have the following installed:

  • Node.js (v14 or higher)
  • MongoDB (v4.4 or higher)
  • npm or yarn

๐Ÿš€ Installation

  1. Clone the repository

    git clone <repository-url>
    cd interview-platform
  2. Install dependencies

    # Install root dependencies
    npm install
    
    # Install server dependencies
    cd server
    npm install
    
    # Install client dependencies
    cd ../client
    npm install
  3. Environment Setup

    Create a .env file in the server directory:

    # Server Configuration
    PORT=5000
    NODE_ENV=development
    
    # MongoDB Configuration
    MONGODB_URI=mongodb://localhost:27017/interview-platform
    
    # JWT Configuration
    JWT_SECRET=your-super-secret-jwt-key-here
    JWT_EXPIRE=24h
    
    # Email Configuration (optional)
    EMAIL_HOST=smtp.gmail.com
    EMAIL_PORT=587
    EMAIL_USER=your-email@gmail.com
    EMAIL_PASS=your-app-password
    
    # Code Execution API
    CODE_EXECUTION_API_URL=https://judge0-ce.p.rapidapi.com
    CODE_EXECUTION_API_KEY=your-rapidapi-key
    
    # Frontend URL
    CLIENT_URL=http://localhost:3000
  4. Start MongoDB

    # Start MongoDB service
    mongod
  5. Run the application

    # From the root directory
    npm run dev

    This will start both the backend server (port 5000) and frontend client (port 3000).

๐Ÿ“ Project Structure

interview-platform/
โ”œโ”€โ”€ server/                 # Backend server
โ”‚   โ”œโ”€โ”€ models/            # MongoDB models
โ”‚   โ”œโ”€โ”€ routes/            # API routes
โ”‚   โ”œโ”€โ”€ middleware/        # Custom middleware
โ”‚   โ”œโ”€โ”€ index.js           # Server entry point
โ”‚   โ””โ”€โ”€ package.json
โ”œโ”€โ”€ client/                # Frontend React app
โ”‚   โ”œโ”€โ”€ public/            # Static files
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/    # React components
โ”‚   โ”‚   โ”œโ”€โ”€ contexts/      # React contexts
โ”‚   โ”‚   โ”œโ”€โ”€ App.js         # Main app component
โ”‚   โ”‚   โ””โ”€โ”€ index.js       # Entry point
โ”‚   โ””โ”€โ”€ package.json
โ”œโ”€โ”€ package.json           # Root package.json
โ””โ”€โ”€ README.md

๐Ÿ”ง Configuration

MongoDB Setup

  1. Install MongoDB on your system
  2. Create a database named interview-platform
  3. Update the MONGODB_URI in your .env file

Code Execution API

  1. Sign up for a RapidAPI account
  2. Subscribe to the Judge0 API
  3. Get your API key and update CODE_EXECUTION_API_KEY in .env

Email Configuration (Optional)

  1. Set up SMTP credentials for email notifications
  2. Update email configuration in .env

๐ŸŽฏ Usage

For Interviewers

  1. Register/Login with interviewer role
  2. Schedule interviews with candidates
  3. Join interview rooms
  4. Conduct video interviews with code editing
  5. Provide feedback after interviews

For Candidates

  1. Register/Login with candidate role
  2. View scheduled interviews
  3. Join interview rooms
  4. Participate in video interviews
  5. Use the code editor for technical questions

For Admins

  1. Manage all users and interviews
  2. View system statistics
  3. Monitor platform usage

๐Ÿ”’ Security Features

  • JWT-based authentication
  • Password hashing with bcrypt
  • Role-based access control
  • Input validation and sanitization
  • Rate limiting
  • CORS protection
  • Helmet.js security headers

๐Ÿš€ Deployment

Backend Deployment

  1. Set up a MongoDB Atlas cluster
  2. Deploy to Heroku, Vercel, or AWS
  3. Update environment variables
  4. Configure CORS for your domain

Frontend Deployment

  1. Build the React app: npm run build
  2. Deploy to Netlify, Vercel, or AWS S3
  3. Update API endpoints in production

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

๐Ÿ“ License

This project is licensed under the MIT License.

๐Ÿ†˜ Support

For support and questions:

  • Create an issue in the repository
  • Contact the development team

๐Ÿ”ฎ Future Enhancements

  • Recording interviews
  • Advanced analytics dashboard
  • Integration with calendar services
  • Mobile app development
  • AI-powered interview assistance
  • Multi-language support
  • Advanced code execution features
  • Interview templates
  • Automated scheduling
  • Performance monitoring

๐Ÿ“Š Performance

  • Real-time video calling with WebRTC
  • Optimized code editor with Monaco
  • Efficient database queries with MongoDB
  • Responsive design for all devices
  • Fast loading times with optimized assets

Built with โค๏ธ using the MERN stack

About

this is an online interview platform with inbuilt feature of code editor provided in it. It is built using MERN STACK.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages