A full-stack web application for managing interviews with role-based access control for admins, experts, and candidates.
- Multi-role Authentication: Admin, Expert, and Candidate roles with different permissions
- Interview Management: Schedule and manage interviews between candidates and experts
- Candidate Matching: Intelligent matching system for pairing candidates with experts
- Real-time Updates: Live interview status updates
- Secure API: JWT-based authentication with role-based authorization
- Node.js with Express.js
- MongoDB with Mongoose ODM
- JWT for authentication
- bcrypt for password hashing
- CORS enabled for cross-origin requests
- dotenv for environment variables
- React 18 with Vite
- React Router for navigation
- Tailwind CSS for styling
- Axios for API calls
- Context API for state management
sih1/
├── backend/
│ ├── config/
│ │ └── config.env # Environment variables
│ ├── controllers/ # Route handlers
│ ├── Database/
│ │ └── dbConnection.js # MongoDB connection
│ ├── Middlewares/ # Authentication & error handling
│ ├── models/ # MongoDB schemas
│ ├── routes/ # API routes
│ ├── utils/ # Utility functions
│ ├── app.js # Express app setup
│ └── server.js # Server entry point
└── frontend/
└── react-app/
├── src/
│ ├── components/ # Reusable components
│ ├── pages/ # Page components
│ ├── context/ # React context
│ ├── utils/ # Utility functions
│ └── App.jsx # Main app component
└── package.json
- Node.js (v16 or higher)
- MongoDB
- npm or yarn
-
Clone the repository
git clone <repository-url> cd sih1
-
Install backend dependencies
cd backend npm install -
Install frontend dependencies
cd ../frontend/react-app npm install -
Environment Setup
Create a
.envfile in thebackend/config/directory:PORT=4000 MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret JWT_EXPIRE=7d FRONTEND_URL=http://localhost:5173
-
Start the development servers
Backend:
cd backend npm run devFrontend:
cd frontend/react-app npm run dev
npm start- Start production servernpm run dev- Start development server with nodemon
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
- Manage all users (candidates and experts)
- View all interviews
- Assign interviews
- System-wide analytics
- View assigned interviews
- Conduct interviews
- Update interview status
- Provide feedback
- View assigned interviews
- Participate in interviews
- Update profile information
- View interview history
POST /- LoginPOST /register- Register new userGET /logout- Logout
GET /users- Get all usersPOST /user/new- Create new userPUT /user/:id- Update userDELETE /user/:id- Delete user
GET /interviews- Get expert's interviewsPUT /interview/:id- Update interview status
GET /profile- Get candidate profilePUT /profile- Update candidate profileGET /interviews- Get candidate's interviews
- Fork the repository
- Create a 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