HireBot AI is a web application designed to help employers evaluate candidates' skills and knowledge through online tests. The application is built with Next.js, React, and uses Mock Service Worker (MSW) to simulate APIs during development.
- Node.js (version 16.x or higher)
- npm (version 8.x or higher)
- Docker (optional, for containerized deployment)
-
Clone the repository from GitHub:
git clone <repository-url> cd hirebot-ai-app
-
Install dependencies:
npm install
-
Initialize Mock Service Worker:
npx msw init public
-
Run the application in development mode:
npm run dev
-
Access the application at: http://localhost:3000
hirebot-ai-app/
├── public/ # Static resources
│ └── mockServiceWorker.js # Service Worker for MSW
├── src/
│ ├── components/ # React components
│ ├── mock/ # API mocking with MSW
│ │ ├── data/ # Sample data
│ │ ├── browser.ts # MSW browser configuration
│ │ └── handlers.ts # API endpoint definitions
│ ├── pages/ # Application pages (Pages Router)
│ │ ├── admin/ # Admin pages
│ │ ├── quiz/ # Quiz pages
│ │ └── index.tsx # Home page
│ ├── styles/ # CSS and styles
│ └── utils/ # Utility functions
├── Dockerfile # Docker configuration
├── docker-compose.yml # Docker Compose configuration
├── ecosystem.config.js # PM2 configuration
├── package.json
└── next.config.js
- Home Page: Candidates enter personal information and session code to start the test.
- Quiz Page: Displays multiple-choice questions and allows candidates to answer within the time limit.
- Results Page: Shows scores and evaluation after completing the test.
- Login: Administrators log in to the system.
- Candidate Management: View list, details, and results of candidates.
- Question Management: Add, edit, delete multiple-choice questions.
- Session Creation: Create new test sessions with parameters such as language, level, number of questions, and time limit.
- Access the home page at http://localhost:3000
- Enter your name, email, and session code (provided by the employer)
- Click "Start Test" to enter the quiz page
- Answer the questions within the time limit
- Click "Submit" when finished
- View your results and evaluation
- Access the login page at http://localhost:3000/admin/login
- Log in with the following credentials:
- Username: admin
- Password: password
- After logging in, you can:
- View the list of candidates and their results
- Manage multiple-choice questions
- Create new test sessions and share session codes with candidates
The application uses Mock Service Worker to simulate the following API endpoints:
POST /api/login: Administrator login
GET /api/candidates: Get list of candidates (supports filtering and pagination)GET /api/candidates/:id: Get candidate detailsGET /api/candidates/:id/results: Get candidate test results
GET /api/questions: Get list of questions (supports filtering and pagination)POST /api/questions: Create new questionPUT /api/questions/:id: Update questionDELETE /api/questions/:id: Delete question
POST /api/sessions: Create new test sessionGET /api/sessions/:token: Get session information by tokenGET /api/sessions/:token/questions: Get list of questions for the sessionPOST /api/sessions/:token/submit: Submit test
npm run dev# Run ESLint to check for issues
npm run lint
# Run ESLint with auto-fix
npm run lint:fix
# Format code with Prettier
npm run format# Build the application
npm run build
# Start the production server
npm run start-
Build and start the application:
docker-compose up -d
-
Stop the application:
docker-compose down
-
View logs:
docker-compose logs -f
-
Install PM2 globally:
npm install -g pm2
-
Start the application:
pm2 start ecosystem.config.js
-
View logs:
pm2 logs hirebot-ai-app
-
Monitor the application:
pm2 monit
- Next.js: React framework for web application development
- React: JavaScript library for building user interfaces
- TypeScript: JavaScript extension with static typing
- Tailwind CSS: Utility-first CSS framework
- Mock Service Worker (MSW): API mocking library for development and testing
- Docker: Containerization platform for consistent deployment
- PM2: Process manager for Node.js applications in production
- This is a development version using sample data and mock APIs.
- In a production environment, you should replace MSW with actual APIs.
- Security features such as JWT authentication, password encryption, and CSRF protection should be fully implemented before actual use.
- The Docker and PM2 configurations are optimized for production deployment.
If you encounter any issues or have questions, please create an issue on the GitHub repository or contact the development team.