Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AI Interviewer System

An intelligent, AI-powered interview platform that provides realistic interview experiences using advanced AI models and real-time conversational interfaces.

img.png

πŸš€ Features

Core Capabilities

  • AI-Powered Interviews: Fully automated interviews powered by multiple AI providers
  • Real-time Conversations: Live chat-like interface between AI and candidates
  • Adaptive Questioning: AI adjusts questions based on candidate responses
  • Persistent Interview State: Pause and resume interviews seamlessly
  • Professional Audio Responses: AI-generated speech using ElevenLabs TTS
  • Multi-language Support: English and Indonesian language support

Interview Management

  • Customizable Interview Setup:
    • Candidate name and profile
    • Job role selection (e.g., backend-developer)
    • Difficulty levels (beginner, intermediate, expert)
    • Number of questions configuration
    • Company context for personalized interviews
    • Interviewer tone adjustment (formal, casual, etc.)

AI Integration

  • Multiple AI Providers Support:

    • Z AI (GLM-4.6) - Primary provider
    • OpenAI (GPT models)
    • Anthropic (Claude models)
    • Mistral AI
    • Groq
    • XAI (Grok)
    • Google Gemini
    • DeepSeek
    • Ollama (local models)
    • OpenRouter
    • And many more
  • Intelligent Conversation Flow:

    • Contextual understanding throughout interviews
    • Dynamic decision making for next actions
    • Follow-up question generation
    • Clarification requests
    • Natural, human-like conversations

User Experience

  • Real-time Updates: Live message updates without page refresh
  • Audio Playback: Automatic speech synthesis for AI responses
  • Responsive Design: Works seamlessly on desktop and mobile
  • Professional Interface: Clean, intuitive chat-like interface
  • Loading States: Visual feedback during AI processing

πŸ—οΈ Architecture

Technology Stack

  • Backend: Laravel 11.x with PHP 8.0+
  • Frontend: Livewire + Volt + Tailwind CSS
  • Build Tool: Vite
  • Database: SQLite/MySQL/PostgreSQL
  • AI Framework: Prism (multi-provider AI management)
  • Testing: Pest
  • Architecture: Domain-Driven Design (DDD)

System Architecture

β”œβ”€β”€ Domain Layer (AI/Interviewer/Domain/)
β”‚   β”œβ”€β”€ Primitives (Value Objects)
β”‚   β”œβ”€β”€ Contracts (Interfaces)
β”‚   └── Entities
β”œβ”€β”€ Application Layer (AI/Interviewer/Application/)
β”‚   β”œβ”€β”€ Data (DTOs)
β”‚   └── Use Cases
└── Infrastructure Layer (AI/Interviewer/Infrastructure/)
    β”œβ”€β”€ Laravel Integration
    β”œβ”€β”€ Services
    └── Schemas

Database Schema

  • Users: Authentication and user management
  • Applicants: Interview candidate data with UUID primary keys
  • ApplicantMessages: Conversation history with metadata

πŸ“¦ Installation

Prerequisites

  • PHP 8.0 or higher
  • Composer
  • Node.js and NPM
  • SQLite/MySQL/PostgreSQL

Setup Steps

  1. Clone the repository

    git clone <repository-url>
    cd ai-interviewer
  2. Install dependencies

    composer install
    npm install
  3. Environment setup

    cp .env.example .env
    php artisan key:generate
  4. Configure environment variables

    # Database
    DB_CONNECTION=sqlite
    DB_DATABASE=database/database.sqlite
    
    # File Storage
    FILESYSTEM_DISK=public
    
    # AI Providers (at least one required)
    Z_API_KEY=your_z_api_key
    OPENAI_API_KEY=your_openai_key
    ANTHROPIC_API_KEY=your_anthropic_key
    ELEVENLABS_API_KEY=your_elevenlabs_key
    
    # Optional: Add other provider keys
    MISTRAL_API_KEY=your_mistral_key
    GROQ_API_KEY=your_groq_key
    GEMINI_API_KEY=your_gemini_key
  5. Database setup

    php artisan migrate
  6. Build assets

    npm run build
  7. Link storage

    php artisan storage:link
  8. Start the development server

    php artisan serve

πŸ”§ Configuration

AI Provider Configuration

The system supports multiple AI providers through the Prism framework. Configure your preferred providers in config/prism.php:

'providers' => [
    'z' => [
        'api_key' => env('Z_API_KEY'),
        'base_url' => 'https://api.z.ai/api',
    ],
    'openai' => [
        'api_key' => env('OPENAI_API_KEY'),
    ],
    // Add other providers as needed
],

Default AI Provider

Set your default AI provider in the InterviewerService:

// src/Interviewer/Infrastructure/Services/InterviewerService.php
private string $provider = 'z';  // Change to your preferred provider
private string $model = 'glm-4.6'; // Change to your preferred model

TTS Configuration

For audio responses, configure ElevenLabs in your .env:

ELEVENLABS_API_KEY=your_elevenlabs_key

πŸ“– Usage

Creating an Interview

  1. Register/Login to the application
  2. Navigate to the Interview Dashboard
  3. Click "Start New Interview"
  4. Fill in the interview configuration:
    • Candidate name
    • Job role
    • Difficulty level
    • Number of questions
    • Company context
    • Interviewer tone
  5. Click "Generate Interview Link"

Interview Process

  1. Welcome Phase: AI introduces itself and sets expectations
  2. Question Phase: AI asks structured interview questions
  3. Response Phase: Candidate provides responses
  4. Analysis Phase: AI analyzes responses and determines next action:
    • Move to next question
    • Ask follow-up questions
    • Request clarification
    • Conclude interview

Features During Interview

  • Real-time Messages: Instant display of AI responses
  • Audio Playback: AI responses are automatically spoken
  • Progress Tracking: Current question and completion status
  • Persistent State: Interview can be interrupted and resumed

πŸ§ͺ Testing

Run the test suite:

# Run all tests
php artisan test

# Run specific test file
php artisan test tests/Feature/AuthenticationTest.php

# Run with coverage
php artisan test --coverage

πŸ” Monitoring & Debugging

Viewing Interview History

All interviews and conversations are stored in the database:

# View all applicants
php artisan tinker
>>> App\Models\Applicant::all();

# View interview messages
>>> App\Models\Applicant::find('uuid')->messages;

Debugging AI Responses

Structured responses include metadata for debugging:

{
  "message": "AI response text",
  "action": "ask_question|ask_followup|complete_interview",
  "status": "waiting_for_answer|question_asked|completed",
  "is_question": true,
  "move_to_next_question": true,
  "meta": {
    "provider": "z",
    "model": "glm-4.6"
  }
}

πŸš€ Deployment

Production Setup

  1. Environment Configuration:

    APP_ENV=production
    APP_DEBUG=false
  2. Optimize Application:

    php artisan config:cache
    php artisan route:cache
    php artisan view:cache
    php artisan optimize
  3. File Permissions:

    chmod -R 755 storage
    chmod -R 755 bootstrap/cache
  4. Queue Configuration (optional):

    php artisan queue:work

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Prism Framework: For providing multi-AI provider support
  • Livewire: For enabling reactive UI components
  • ElevenLabs: For high-quality text-to-speech synthesis
  • Laravel Community: For the excellent framework and ecosystem

πŸ“ž Support

For support and questions:

  • Create an issue in the GitHub repository
  • Check the documentation
  • Review the existing issues for common solutions

Built with ❀️ using Laravel and modern AI technologies.

About

Simple interactivity between Candidate and Recruiter

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages