├── .gitignore ├── README.md ├── app ├── (auth) │ ├── sign-in │ │ └── [[...sign-in]] │ │ │ └── page.jsx │ └── sign-up │ │ └── [[...sign-up]] │ │ └── page.jsx ├── dashboard │ ├── _components │ │ ├── AddNewInterview.jsx │ │ ├── Footer.jsx │ │ ├── Header.jsx │ │ ├── InterviewItemCard.jsx │ │ └── Interviewlist.jsx │ ├── interview │ │ └── [interviewId] │ │ │ ├── feedback │ │ │ └── page.jsx │ │ │ ├── page.jsx │ │ │ └── start │ │ │ ├── _compnents │ │ │ ├── QuestionsSections.jsx │ │ │ └── RecordAnswerSection.jsx │ │ │ └── page.jsx │ ├── layout.jsx │ └── page.jsx ├── favicon.ico ├── globals.css ├── layout.js └── page.js ├── components.json ├── components └── ui │ ├── alert.jsx │ ├── button.jsx │ ├── collapsible.jsx │ ├── dialog.jsx │ ├── input.jsx │ ├── sonner.jsx │ └── textarea.jsx ├── drizzle.config.js ├── jsconfig.json ├── lib └── utils.js ├── middleware.js ├── next.config.mjs ├── package-lock.json ├── package.json ├── postcss.config.mjs ├── public ├── Agreement-rafiki.png ├── Recommendation letter-bro.svg ├── Webinar-rafiki.svg ├── logo.svg ├── next.svg ├── vercel.svg └── webcam.png ├── tailwind.config.js └── utils ├── GeminiAIModel.js ├── db.js └── schema.js /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | next-env.d.ts 37 | 38 | .vercel 39 | .env*.local 40 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🤖 AI Interview Mocker 2 | 3 | Welcome to **AI Interview Mocker**, an innovative platform designed to help you ace your interviews! Powered by the advanced **Gemini API**, we generate realistic and tailored mock interview questions to enhance your preparation. 🌟 Take the next step toward success by practicing with our unique tools today! 4 | 5 | ## 🚀 Key Features: 6 | 7 | - **✨ User-Friendly Interface**: Sign in or sign up effortlessly through our sleek landing page. 8 | - **📊 Dashboard**: Manage and track all your mock interviews in one place. 9 | - **📝 Custom Interview Setup**: Add new interviews with detailed job descriptions. 10 | - **💡 AI-Generated Questions**: Get 5 custom-tailored interview questions based on your inputs. 11 | - **🎙️ Interactive Interview Process**: View questions, choose to read or listen, and begin your mock interview. 12 | - **📹 Record Your Answers**: Seamlessly record and submit your responses. 13 | - **📈 Comprehensive Feedback**: Receive detailed feedback and ratings from **GenerativeAI**. 14 | - **📂 Review Past Interviews**: Easily access and track your previous interview sessions. 15 | 16 | --- 17 | 18 | ## 📸 Screenshots 19 | 20 | Take a look at some of the key areas of our platform: 21 | 22 | ### Landing Page 23 | Landing Page 24 | 25 | ### Dashboard 26 | Dashboard 27 | 28 | ### Interview Setup 29 | Interview Setup 30 | 31 | ### Feedback Section 32 | Feedback Section 33 | 34 | --- 35 | 36 | Prepare confidently, improve continuously, and ace your next interview with **AI Interview Mocker**! 🎯 37 | -------------------------------------------------------------------------------- /app/(auth)/sign-in/[[...sign-in]]/page.jsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | import { SignIn,useAuth } from "@clerk/nextjs"; 3 | import { useRouter } from "next/navigation"; 4 | import { useEffect } from "react"; 5 | 6 | export default function Page() { 7 | const {isSignedIn}=useAuth(); 8 | const router=useRouter() 9 | useEffect(()=>{ 10 | if(isSignedIn){ 11 | router.push("/dashboard") 12 | } 13 | },[isSignedIn]) 14 | return ( 15 |
16 |
17 |
18 | 23 | 24 |
25 | 26 | Home 27 | 33 | 37 | 38 | 39 | 40 |

41 | Welcome to AI Interview Mocker 🦑 42 |

43 | 44 |

45 | Lorem, ipsum dolor sit amet consectetur adipisicing elit. Eligendi 46 | nam dolorum aliquam, quibusdam aperiam voluptatum. 47 |

48 |
49 |
50 | 51 |
52 |
53 |
54 | 58 | Home 59 | 65 | 69 | 70 | 71 | 72 |

73 | Welcome to AI Interview Mocker 🦑 74 |

75 | 76 |

77 | Lorem, ipsum dolor sit amet consectetur adipisicing elit. 78 | Eligendi nam dolorum aliquam, quibusdam aperiam voluptatum. 79 |

80 |
81 |
82 | 83 |
84 | 85 | 86 |
87 |
88 |
89 |
90 | ); 91 | } 92 | -------------------------------------------------------------------------------- /app/(auth)/sign-up/[[...sign-up]]/page.jsx: -------------------------------------------------------------------------------- 1 | import { SignUp } from "@clerk/nextjs"; 2 | 3 | export default function Page() { 4 | return ( 5 | 6 |
7 |
8 | 15 | 16 |
19 |
20 | 21 | Home 22 | 28 | 32 | 33 | 34 | 35 |

36 | Welcome to AI Interview Mocker 🦑 37 |

38 | 39 |

40 | Lorem, ipsum dolor sit amet consectetur adipisicing elit. Eligendi nam dolorum aliquam, 41 | quibusdam aperiam voluptatum. 42 |

43 |
44 | 45 | 46 |
47 |
48 |
49 |
50 | ) 51 | } -------------------------------------------------------------------------------- /app/dashboard/_components/AddNewInterview.jsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import React, { useState } from "react"; 3 | import { 4 | Dialog, 5 | DialogContent, 6 | DialogDescription, 7 | DialogHeader, 8 | DialogTitle, 9 | DialogTrigger, 10 | } from "@/components/ui/dialog"; 11 | import { Button } from "@/components/ui/button"; 12 | import { Input } from "@/components/ui/input"; 13 | import { Textarea } from "@/components/ui/textarea"; 14 | import { chatSession } from "@/utils/GeminiAIModel"; 15 | import { LoaderCircle } from "lucide-react"; 16 | import { db } from "@/utils/db"; 17 | import { MockInterview } from "@/utils/schema"; 18 | import { v4 as uuidv4 } from "uuid"; 19 | import { useUser } from "@clerk/nextjs"; 20 | import moment from "moment/moment"; 21 | import { useRouter } from "next/navigation"; 22 | 23 | function AddNewInterview() { 24 | const [openDialog, setOpenDialog] = useState(false); 25 | const [jobPosition, setJobPosition] = useState(); 26 | const [jobDesc, setJobDesc] = useState(); 27 | const [jobExperience, setJobExperience] = useState(); 28 | const [loading, setLoading] = useState(false); 29 | const [JsonResponse, setJsonResponse] = useState([]); 30 | const { user } = useUser(); 31 | const route=useRouter() 32 | const onSubmit = async (e) => { 33 | setLoading(true); 34 | e.preventDefault(); 35 | 36 | const InputPromt = `Generate ${process.env.NEXT_PUBLIC_INTERVIEW_QUESTION} interview questions and answers in JSON format based on the following: Job Position: ${jobPosition}, Job Description: ${jobDesc}, Years of Experience: ${jobExperience}. Only return the JSON, without any additional text.`; 37 | const result = await chatSession.sendMessage(InputPromt); 38 | const MockJsonResp = result.response 39 | .text() 40 | .replace("```json", "") 41 | .replace("```", ""); 42 | //console.log(JSON.parse(MockJsonResp)) 43 | setJsonResponse(JSON.parse(MockJsonResp)); 44 | if(MockJsonResp){ 45 | const resp = await db.insert(MockInterview).values({ 46 | mockId: uuidv4(), 47 | jsonMockResp: MockJsonResp, 48 | jobPosition: jobPosition, 49 | jobDesc: jobDesc, 50 | jobExperience: jobExperience, 51 | createdBy: user?.primaryEmailAddress?.emailAddress, 52 | createdAt: moment().format("DD-MM-yyyy"), 53 | }).returning({mockId:MockInterview.mockId}) 54 | console.log("Insert ID:", resp) 55 | if(resp){ 56 | route.push('/dashboard/interview/'+resp[0].mockId) 57 | setOpenDialog(false) 58 | } 59 | 60 | 61 | }else{ 62 | console.log("ERROR") 63 | } 64 | 65 | setLoading(false); 66 | console.log(JsonResponse) 67 | 68 | 69 | 70 | 71 | }; 72 | 73 | return ( 74 |
75 |
setOpenDialog(true)} 78 | > 79 |

+ Add new

80 |
81 | 82 | 83 | 84 | 85 | Tell us more about your job interviewing 86 | 87 | 88 |
89 |
90 | {/*

Tell us more about your job interviewing

*/} 91 |

92 | Add Details about your job position/role, Job description 93 | and years of experience 94 |

95 | 96 |
97 | 98 | setJobPosition(event.target.value)} 100 | placeholder="Ex. Full Stack Developer" 101 | required 102 | /> 103 |
104 |
105 | 106 |