Skip to content

Nehal409/nestjs-mock-interview-api

Repository files navigation

Mock Interview API

Table of Contents

Overview

This project is an online platform designed to prepare users for real-world interviews. The platform facilitates mock interviews, analyzes users capabilities, generates follow-up questions, and produces comprehensive reports using AI models.

Users can select from multiple types of interviews and difficulty levels. Below are the available options:

Difficulty Levels

  • INTERN
  • JUNIOR
  • SENIOR

Interview Types

  • FRONTEND
  • BACKEND
  • DATA SCIENCE
  • MACHINE LEARNING
  • PROJECT MANAGEMENT

We use ChatGPT to analyze the interview questions and generate detailed reports with graphs. The report includes the following metrics:

  • accuracy
  • technical_knowledge_score
  • communication_score
  • problem_solving_score
  • creativity_score
  • confidence
  • overall_analysis
  • suggestions
  • strengths
  • areas_of_improvement
  • posture_accuracy

Features

  • User authentication with JWT
  • Multiple interview types and difficulty levels
  • AI-based analysis and report generation
  • Follow-up questions based on user's answer
  • Comprehensive user and interview management

Modules

The project is divided into three main modules:

  • auth: Handles JWT implementation and login/signup endpoints.
  • interviews: Manages interview-related functionalities, including:
    • Listing interview types and difficulty levels.
    • Paginated listing of interview questions based on type and difficulty level.
    • Creating new interviews.
    • Analyzing interview responses using ChatGPT and generating detailed reports.
    • Retrieving detailed interview reports.
    • Generating follow-up questions.
  • users: Provides APIs to get user interview details and user details.

Architecture

The system follows a modular architecture, with separate modules for authentication, interview management, and user management. This separation of concerns ensures scalability and maintainability.

Prerequisites

  • NodeJS installed
  • XAMPP Server

Project Setup

  1. Clone the project from the repository.
  2. From the root folder, run npm install.
  3. Start the MySQL database in XAMPP server.
  4. Create a .env file from the .env.sample file and update your environment variables.
  5. Run migrations with npm run migrate:run.
  6. Start the server with npm run start.

Usage

  • To start the server: npm run start
  • To run migrations: npm run migrate:run
  • To create a new migration: npm run migrate:create "MigrationName"
  • To view API documentation (Swagger): http://localhost:8000/api/v1/docs
  • To view API documentation (Compodoc): http://127.0.0.1:8080/

Testing

To run tests, use the command:

npm run test

Access API Documentation

There are three types of API documentation available:

Swagger

  1. After the server is running, you can access Swagger documentation at http://localhost:8000/api/v1/docs.

Postman

  1. The Postman collection is available in the root directory of the project. You can import it into your Postman.

Compodoc

  1. Run the command npm run doc:serve to generate and serve documentation. You can view the docs at http://127.0.0.1:8080/.

Tech Stack

  • NodeJS 20 (LTS)
  • NestJS (API framework)
  • MySQL
  • TypeORM

About

Backend codebase for the mock interview project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors