{"id":31009222,"url":"https://github.com/nightdevilpt/mock-ai-interview","last_synced_at":"2025-09-13T04:10:51.379Z","repository":{"id":305344697,"uuid":"1021624173","full_name":"NightDevilPT/mock-ai-interview","owner":"NightDevilPT","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-23T05:02:37.000Z","size":656,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-24T08:36:27.413Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://mock-ai-interview-seven.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NightDevilPT.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-17T17:22:25.000Z","updated_at":"2025-08-23T05:02:40.000Z","dependencies_parsed_at":"2025-07-19T18:28:03.550Z","dependency_job_id":"c1e82773-8837-4150-9732-1c4daee7b811","html_url":"https://github.com/NightDevilPT/mock-ai-interview","commit_stats":null,"previous_names":["nightdevilpt/mock-ai-interview"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NightDevilPT/mock-ai-interview","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NightDevilPT%2Fmock-ai-interview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NightDevilPT%2Fmock-ai-interview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NightDevilPT%2Fmock-ai-interview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NightDevilPT%2Fmock-ai-interview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NightDevilPT","download_url":"https://codeload.github.com/NightDevilPT/mock-ai-interview/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NightDevilPT%2Fmock-ai-interview/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274915983,"owners_count":25373253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-13T02:00:10.085Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-13T04:10:48.907Z","updated_at":"2025-09-13T04:10:51.365Z","avatar_url":"https://github.com/NightDevilPT.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mock Interview Generator POC Document\n\n## Project Overview\n\nThis Proof of Concept (POC) will demonstrate a mock interview generator using Gemini AI API and LangChain in a Next.js application. The system will generate customized interview questions based on user parameters, present them in an interactive form, and provide detailed feedback on responses.\n\n## Core Features\n\n### 1. Question Generation API\n\n-   **Input**: Accepts parameters like experience level, field type, question types, etc.\n-   **Processing**: Uses LangChain with Gemini AI to generate context-aware questions\n-   **Output**: Returns structured JSON with questions, options, metadata\n\n### 2. Dynamic Form Rendering\n\n-   Auto-generates forms based on question types (radio, checkbox, text, etc.)\n-   Includes timers based on estimated question time\n-   Responsive UI that adapts to different question formats\n\n### 3. Evaluation \u0026 Feedback System\n\n-   Analyzes user responses using AI\n-   Provides detailed feedback with strengths and improvement areas\n-   Generates motivational insights\n\n### 4. Export \u0026 Share Functionality\n\n-   Email results to user or recruiter\n-   Export to PDF, Excel, JSON formats\n-   Shareable links for results\n\n### 5. Public Session Sharing\n\n-   Users can create public interview sessions\n-   Shareable sessions via unique tokens\n-   Other users can attempt public sessions\n-   Session creators can track attempts and performance\n\n\n## Prompt Template Example to Generate Questions\n\n```ts\nconst universalInterviewPrompt = new PromptTemplate({\n\ttemplate: `\n  You are an expert interview designer creating questions for all career types. \n  Generate {totalQuestions} questions based on these parameters:\n\n  ### Interview Parameters:\n  - Title: {title}\n  - Description: {description}\n  - Career Level: {careerLevel}\n  - Experience: {experience}\n  - Domain: {domain}\n  - Difficulty: {difficulty}\n  - Question Types: {questionTypes}\n  - Focus Areas: {focusAreas}\n\n  ### Required JSON Format:\n  {\n    \"metadata\": {\n      \"title\": \"{title}\",\n      \"description\": \"{description}\",\n      \"careerLevel\": \"{careerLevel}\",\n      \"experience\": \"{experience}\",\n      \"domain\": \"{domain}\",\n      \"difficulty\": \"{difficulty}\",\n      \"questionTypes\": {questionTypes},\n      \"focusAreas\": {focusAreas},\n      \"totalQuestions\": {totalQuestions},\n      \"totalPoints\": \"sum of all question points\",\n      \"estimatedDuration\": \"sum of all durations\"\n    },\n    \"questions\": [\n      {\n        \"text\": \"string\", // Plain text fallback\n        \"content\": [\n          {\n            \"type\": \"paragraph\",\n            \"data\": {\n              \"text\": \"string\" \n            },\n            \"order\": 1\n          },\n          {\n            \"type\": \"list\",\n            \"data\": {\n              \"items\": [\"string\"],\n              \"style\": \"ordered|unordered\"\n            },\n            \"order\": 2\n          },\n          {\n            \"type\": \"code\",\n            \"data\": {\n              \"code\": \"string\",\n              \"language\": \"string\"\n            },\n            \"order\": 3\n          },\n          {\n            \"type\": \"media\",\n            \"data\": {\n              \"url\": \"string\",\n              \"caption\": \"string\",\n              \"altText\": \"string\"\n            },\n            \"order\": 4\n          },\n          {\n            \"type\": \"table\",\n            \"data\": {\n              \"headers\": [\"string\"],\n              \"rows\": [\n                {\n                  \"cells\": [\"string\"]\n                }\n              ]\n            },\n            \"order\": 5\n          }\n        ],\n        \"type\": \"MULTIPLE_CHOICE|CHECKBOX|TEXT|DROPDOWN|RATING|CODING\",\n        \"category\": \"string\",\n        \"difficulty\": \"EASY|MEDIUM|HARD\",\n        \"estimatedDuration\": number,\n        \"points\": number,\n        \"order\": number,\n        \"options\": [\"string\"],\n        \"constraints\": [\"string\"],\n        \"hints\": [\"string\"],\n        \"tags\": [\"string\"],\n        \"idealAnswer\": \"string\"\n      }\n    ]\n  }\n\n  ### Content Block Rules:\n  1. Each question must have at least one content block\n  2. Order must be sequentially numbered starting from 1\n  3. Maintain consistent block types:\n     - paragraph: For regular text\n     - list: For bullet points (use \"ordered\" for numbered)\n     - code: For code snippets (specify language)\n     - media: For images/diagrams (include alt text)\n     - table: For tabular data\n\n  ### Example Question:\n  {\n    \"text\": \"Explain React hooks and list 3 commonly used ones\",\n    \"content\": [\n      {\n        \"type\": \"paragraph\",\n        \"data\": {\n          \"text\": \"React hooks allow you to use state and other React features without writing classes.\"\n        },\n        \"order\": 1\n      },\n      {\n        \"type\": \"list\",\n        \"data\": {\n          \"items\": [\n            \"useState - For state management\",\n            \"useEffect - For side effects\",\n            \"useContext - For global state\"\n          ],\n          \"style\": \"unordered\"\n        },\n        \"order\": 2\n      }\n    ],\n    \"type\": \"TEXT\",\n    \"category\": \"React\",\n    \"difficulty\": \"MEDIUM\",\n    \"estimatedDuration\": 120,\n    \"points\": 10,\n    \"order\": 1,\n    \"constraints\": { mix : 20, max : 100 },\n    \"hints\": [\"Think about lifecycle methods\"],\n    \"tags\": [\"react\", \"hooks\", \"frontend\"],\n    \"idealAnswer\": \"React hooks are functions that let you hook into React state... (full answer)\"\n  }\n\n  Now generate questions matching these specifications.\n  `,\n\tinputVariables: [\n\t\t\"title\",\n\t\t\"description\",\n\t\t\"careerLevel\",\n\t\t\"experience\",\n\t\t\"domain\",\n\t\t\"difficulty\",\n\t\t\"questionTypes\",\n\t\t\"focusAreas\",\n\t\t\"isPublic\",\n\t\t\"totalQuestions\",\n\t],\n});\n```\n\n## Database Model Relation Mermaid\n\n```mermaid\n\nerDiagram\n    User {\n        ObjectId id PK\n        string email UK\n        string password\n        string firstName\n        string lastName\n        string avatar\n        string bio\n        AuthProvider authProvider\n        boolean isVerified\n        string token\n        DateTime tokenExpired\n        int totalSessionsCreated\n        int totalAttempts\n        float averageScore\n        string strongestDomain\n        string[] improvementAreas\n        DateTime lastActive\n        DateTime createdAt\n        DateTime updatedAt\n    }\n\n    InterviewSession {\n        ObjectId id PK\n        string title\n        string description\n        CareerLevel careerLevel\n        ExperienceLevel experience\n        string domain\n        Difficulty difficulty\n        QuestionType[] questionTypes\n        string[] focusAreas\n        boolean isPublic\n        string shareToken UK\n        SessionStatus status\n        int totalQuestions\n        int totalPoints\n        ObjectId creatorId FK\n        DateTime createdAt\n        DateTime updatedAt\n    }\n\n    Question {\n        ObjectId id PK\n        string text\n        QuestionType type\n        string category\n        Difficulty difficulty\n        int estimatedDuration\n        int order\n        int points\n        QuestionOption[] options\n        QuestionConstraints constraints\n        string[] hints\n        string[] tags\n        ObjectId sessionId FK\n        DateTime createdAt\n        DateTime updatedAt\n    }\n\n    InterviewSessionAttempt {\n        ObjectId id PK\n        AttemptStatus status\n        float score\n        int totalPoints\n        int totalQuestions\n        DateTime startTime\n        DateTime endTime\n        int totalDuration\n        boolean isPublic\n        string shareToken UK\n        Feedback[] feedback\n        ImprovementSuggestion[] improvementSuggestions\n        ObjectId[] questionIds\n        ObjectId[] completedQuestionIds\n        ObjectId sessionId FK\n        ObjectId userId FK\n        DateTime createdAt\n        DateTime updatedAt\n    }\n\n    InterviewQuestionResponse {\n        ObjectId id PK\n        string userAnswer\n        string aiAnswer\n        float userScore\n        Feedback[] feedback\n        boolean isCorrect\n        ImprovementSuggestion[] improvementSuggestions\n        ObjectId questionId FK\n        ObjectId userId FK\n        ObjectId attemptId FK\n        DateTime createdAt\n        DateTime updatedAt\n    }\n\n    %% Embedded Types\n    QuestionOption {\n        string id\n        string text\n        string value\n    }\n\n    QuestionConstraints {\n        int maxLength\n        int minLength\n        string[] allowedTypes\n        int timeLimit\n    }\n\n    Resource {\n        string title\n        string description\n    }\n\n    Feedback {\n        string title\n        string description\n        Resource[] resources\n    }\n\n    ImprovementSuggestion {\n        string title\n        string description\n        Resource[] resources\n    }\n\n    %% Relationships\n    User ||--o{ InterviewSession : \"creates\"\n    User ||--o{ InterviewSessionAttempt : \"attempts\"\n    User ||--o{ InterviewQuestionResponse : \"responds\"\n\n    InterviewSession ||--o{ Question : \"contains\"\n    InterviewSession ||--o{ InterviewSessionAttempt : \"attempted_by\"\n\n    Question ||--o{ InterviewQuestionResponse : \"answered_in\"\n\n    InterviewSessionAttempt ||--o{ InterviewQuestionResponse : \"includes\"\n\n    %% Embedded relationships (conceptual)\n    Question ||--o{ QuestionOption : \"has_options\"\n    Question ||--o| QuestionConstraints : \"has_constraints\"\n    InterviewQuestionResponse ||--o{ Feedback : \"has_feedback\"\n    InterviewQuestionResponse ||--o{ ImprovementSuggestion : \"has_suggestions\"\n    InterviewSessionAttempt ||--o{ Feedback : \"has_feedback\"\n    InterviewSessionAttempt ||--o{ ImprovementSuggestion : \"has_suggestions\"\n    Feedback ||--o{ Resource : \"includes_resources\"\n    ImprovementSuggestion ||--o{ Resource : \"includes_resources\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnightdevilpt%2Fmock-ai-interview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnightdevilpt%2Fmock-ai-interview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnightdevilpt%2Fmock-ai-interview/lists"}