How thedarkking01/ai-interview-prep works
Project Overview & Components
• This is a full-stack web application built with Next.js that assists users in preparing for technical interviews using AI technologies. It features secure authentication via Firebase, interactive AI-driven interviews (using VAPI AI and Google Gemini), and a modern, responsive UI enhanced with ShadCN/UI and Tailwind CSS.
• The application is structured with clear distinctions between different functional areas such as authentication, interview management, and API endpoints.
Main Components
a. Frontend User Interface:
• Pages & Layouts: Represent the Next.js “app” directory structure, showing separate layouts for (auth) and (root) sections.
• Authentication Pages: Sign-up and sign-in pages (under app/(auth)), handling user login and registration.
• Interview Pages: Including interview creation, the live interview page (with AI-driven interactions), and feedback display pages.
• Components & UI Elements: Nodes representing reusable components (e.g., AuthForm, InterviewCard, Agent, FormField) and UI libraries (coming from components/ui folder and usage of ShadCN/UI).
• Global Styling: The global styles from app/globals.css and Tailwind CSS integration.
b. Backend / API & Server-side Logic:
• API Routes: Within app/api/vapi, specifically the generate route used to create interview questions powered by VAPI AI.
• Server-side Logic: Business logic implemented in lib (actions for authentication and interview feedback) and utility functions in lib/utils.ts.
• Authentication Backend: Firebase integration found in firebase/admin.ts and firebase/client.ts processes handling authentication, session management, and potential realtime functionality.
c. External Services & Integrations:
• VAPI AI: Responsible for generating interview questions (and possibly powering voice interactions).
• Google Gemini: Used for providing advanced AI feedback and coaching.
• Firebase: For authenticating users and managing their data.
d. Supporting Modules:
• Constants and Type Definitions: In directories such as constants and types, ensuring data integrity (with Zod) and type safety across the application.
Relationships & Data Flow
• A clear connection from the backend (API & server-side actions) to Firebase for managing authentication and possibly to external APIs (VAPI AI and Google Gemini) for generating content and feedback.
• User actions → Frontend (Next.js Pages/Components) → API Endpoints/Backend Logic → External Service (Firebase/VAPI/Google Gemini) → Response back to frontend.
Architectural Patterns & Design Principles
• MVC-like Separation: Maintain clear separation between view (app pages and components), business logic (lib/actions, API routes), and integration (firebase and external services).
Implementation Steps
• Drill down into each major component:
• For UI, illustrate the separate flows for authentication (app/(auth)) and main application pages (app/(root)).
• For backend, detail the API route that uses VAPI AI and the logic handling interactions (lib/actions).
• How Firebase authentication integrates with both the client (firebase/client.ts) and server side (firebase/admin.ts).