- Overview
- Key Features
- Tech Stack
- Architecture
- Getting Started
- Environment Setup
- Database Management
- Project Structure
- Development Workflow
- Deployment
- Screenshots
- Future Enhancements
- License
A cutting-edge AI-powered SaaS platform that revolutionizes interview preparation through voice-based mock interviews with real-time emotion analysis. The platform leverages advanced AI models to provide personalized feedback, helping job seekers practice and improve their interview skills.
- Voice-First Interview Experience: Natural, conversational interviews powered by Hume AI's empathic voice technology
- Emotion Intelligence: Real-time analysis of confidence, clarity, and emotional cues during responses
- AI-Powered Feedback: Detailed, actionable insights generated by Google Gemini 2.5 Flash
- Full-Stack Architecture: Modern Next.js 15 app with TypeScript, PostgreSQL, and production-grade security
- Real-time voice interaction using Hume AI's emotion-aware voice technology
- Natural conversation flow with contextual follow-up questions
- Live emotion tracking and analysis during interviews
- Audio recording and transcript generation
- Google Gemini Integration: Advanced feedback generation analyzing:
- Communication clarity and articulation
- Confidence levels based on emotional cues
- Response quality relative to job requirements
- Pacing, timing, and overall delivery
- Personalized Recommendations: Tailored improvement suggestions
- Resume Analysis: AI-driven resume evaluation and optimization tips
- Custom job information profiles with role, company, and requirements
- Industry-specific interview question generation
- Experience level matching (Entry, Mid, Senior, Executive)
- Multiple job profiles per user
- Clerk Authentication: Secure user management and session handling
- Arcjet Protection: Rate limiting, bot detection, and attack prevention
- Protected routes with middleware-level authorization
- Environment-based security configurations
- Responsive design built with Tailwind CSS v4
- Shadcn/ui component library for consistent design
- Dark/light theme support with next-themes
- Smooth animations and transitions
- Mobile-optimized interface
- Interview history and performance tracking
- Progress visualization
- Feedback archive and comparison
- User onboarding flow
- Framework: Next.js 15.5 (App Router with Turbopack)
- UI Library: React 19.1 with TypeScript 5
- Styling: Tailwind CSS v4, Shadcn/ui components
- State Management: React Hook Form + Zod validation
- Theming: next-themes for dark/light mode
- Runtime: Node.js with Next.js API Routes
- Database: PostgreSQL with Drizzle ORM
- Authentication: Clerk
- Security: Arcjet (rate limiting, bot protection)
- Validation: Zod schemas with T3 Env
- Voice AI: Hume AI (@humeai/voice-react)
- Language Model: Google Gemini 2.5 Flash (@ai-sdk/google)
- AI SDK: Vercel AI SDK for streaming responses
- Webhooks: Svix for secure webhook handling
- Hosting: Vercel (frontend + serverless functions)
- Database: Neon (serverless PostgreSQL)
- Version Control: Git/GitHub
- CI/CD: Vercel auto-deployment
- Environment Management: T3 Env with Zod
- Package Manager: npm
- Linting: ESLint with Next.js config
- Database Tools: Drizzle Kit (migrations, studio)
- Local Development: Docker Compose for PostgreSQL
src/
├── app/ # Next.js App Router
│ ├── api/ # API routes and webhooks
│ ├── app/ # Protected application routes
│ ├── data/ # Environment configuration
│ ├── demo-landing/ # Public landing page
│ ├── onboarding/ # User onboarding flow
│ └── sign-in/ # Authentication pages
│
├── features/ # Domain-driven features
│ ├── interviews/ # Interview management & AI feedback
│ ├── jobInfos/ # Job information CRUD
│ ├── questions/ # Question generation
│ ├── resumeAnalyses/ # Resume analysis
│ └── users/ # User profile management
│
├── drizzle/ # Database layer
│ ├── schema/ # Table definitions
│ ├── migrations/ # SQL migrations
│ └── db.ts # Database connection
│
├── services/ # External integrations
│ ├── ai/ # Google Gemini integration
│ ├── clerk/ # Auth utilities
│ └── hume/ # Voice AI integration
│
├── components/ # React components
│ └── ui/ # Shadcn/ui components
│
└── lib/ # Shared utilities
- User Authentication → Clerk validates and creates session
- Job Setup → User creates job profile with requirements
- Question Generation → AI generates relevant interview questions
- Voice Interview → Hume AI conducts conversation with emotion tracking
- Transcript Analysis → Google Gemini processes conversation + emotions
- Feedback Generation → AI creates detailed performance report
- Storage → Interview data and feedback saved to PostgreSQL
- Next.js
use cachedirective for database queries - Feature-based cache tags for granular invalidation
- Automatic cache busting on mutations via server actions
- Middleware: Clerk authentication + public route handling
- Server Actions: Permission checks per user/resource
- Rate Limiting: Arcjet token buckets (12 req/day, refill 4/day)
- Input Validation: Zod schemas on all forms and API inputs
- SQL Injection Protection: Drizzle ORM parameterized queries
- Node.js 20+ and npm
- PostgreSQL database (local via Docker or cloud instance)
- API keys for:
- Clerk (authentication)
- Hume AI (voice interviews)
- Google Generative AI (Gemini)
- Arcjet (security)
# Clone the repository
git clone https://github.com/your-username/ai-saas-interview-project.git
cd ai-saas-interview-project
# Install dependencies
npm install
# Set up environment variables (see Environment Setup below)
cp .env.example .env.local
# Start local PostgreSQL (or use cloud database)
docker-compose up -d
# Run database migrations
npm run db:migrate
# Start development server
npm run devThe application will be available at http://localhost:3000
Create a .env.local file in the root directory:
# Database Configuration
DATABASE_URL=postgresql://username:password@hostname:port/database
# Or individual DB variables (for local Docker)
DB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=your_password
DB_NAME=interview_platform
# External API Keys
ARCJET_KEY=your_arcjet_key
CLERK_SECRET_KEY=your_clerk_secret
HUME_API_KEY=your_hume_api_key
HUME_SECRET_KEY=your_hume_secret_key
GOOGLE_GENERATIVE_AI_API_KEY=your_google_ai_key
# Client-side variables
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL=/app
NEXT_PUBLIC_CLERK_SIGN_UP_FORCE_REDIRECT_URL=/onboarding
NEXT_PUBLIC_HUME_CONFIG_ID=your_hume_config_id- Clerk: clerk.com - Free tier available
- Hume AI: hume.ai - Sign up for voice API access
- Google Gemini: ai.google.dev - Free tier with generous limits
- Arcjet: arcjet.com - Security and rate limiting
# Generate migrations from schema changes
npm run db:generate
# Apply migrations to database
npm run db:migrate
# Push schema directly (dev only - skips migrations)
npm run db:push
# Open Drizzle Studio for visual database inspection
npm run db:studioCore Tables:
user- User profiles and preferencesjobInfo- Job positions and requirementsinterview- Interview sessions and transcriptsquestion- Generated interview questionsresumeAnalysis- Resume evaluation data
Relationships:
- Users → JobInfos (one-to-many)
- JobInfos → Questions (one-to-many)
- JobInfos → Interviews (one-to-many)
- All foreign keys use CASCADE deletes
Each feature in /src/features/ follows a consistent pattern:
features/[featureName]/
├── actions.ts // Server actions for mutations
├── db.ts // Database queries and operations
├── dbCache.ts // Cache tags and invalidation
├── permissions.ts // Authorization checks
└── schemas.ts // Zod validation schemasServer Actions:
export async function createInterview(data: InterviewInput) {
const user = await getCurrentUser(); // Auth check
await validatePermissions(user, data); // Permission check
// Rate limiting via Arcjet
const result = await createInterviewDb(data);
revalidateTag(`interviews-${user.id}`); // Cache invalidation
return result;
}Database Queries:
"use cache"; // Next.js caching directive
export async function getInterviews(userId: string) {
return db.select().from(interview).where(eq(interview.userId, userId));
}# Start development server with Turbopack (fast refresh)
npm run dev
# Build for production (test production build)
npm run build
npm start
# Lint code
npm run lint- Create feature directory in
/src/features/[featureName]/ - Define database schema in
/src/drizzle/schema/[featureName].ts - Generate and run migrations:
npm run db:generate npm run db:migrate
- Implement feature logic (actions, db queries, permissions)
- Create UI components and integrate with app routes
- Add cache tags and invalidation logic
While there's no formal test suite, verify functionality by:
- Running the dev server and testing routes manually
- Using Drizzle Studio (
npm run db:studio) to inspect database state - Checking browser dev tools for API responses and errors
- Testing authentication flows and permission checks
Current Live Deployment:
- URL: [https://certumai.xyz/]
- Database: Neon Serverless PostgreSQL
- Status: ✅ Live and operational
Steps:
- Fork this repository
- Connect to Vercel via GitHub integration
- Set up Neon PostgreSQL database
- Configure environment variables in Vercel dashboard
- Deploy automatically on push to main branch
Ensure all variables from .env.example are configured in Vercel:
- Project Settings → Environment Variables
- Add all required API keys and database credentials
- Separate staging/production environments if needed
- Advanced Analytics Dashboard: Interview performance trends over time
- Video Interview Mode: Add webcam support for body language analysis
- Multi-Language Support: Internationalization for global users
- Interview Templates: Pre-built question sets for common roles
- Team Collaboration: Share interviews with mentors or peers
- Mobile App: React Native companion app
- Testing Suite: Jest + React Testing Library integration
- E2E Tests: Playwright for critical user flows
- Performance Monitoring: Sentry error tracking and performance insights
- Custom Domain: Professional branding with custom URL
- Advanced Arcjet Security: Re-enable full security middleware
- WebSocket Support: Real-time collaboration features
- Build Time: ~10 seconds
- Bundle Size: 187 kB shared JavaScript
- Lighthouse Score: 95+ (Performance, Accessibility, Best Practices)
- Database: 5 core tables with relational integrity
- API Routes: 10+ protected endpoints
- UI Components: 20+ reusable Shadcn components
This is a portfolio project, but suggestions and feedback are welcome! Feel free to:
- Open an issue for bugs or feature requests
- Fork the repository and submit a pull request
- Star the repository if you find it useful
Your Name
- Portfolio: TBA
- LinkedIn: TBA
- Email: feemail042@gmail.com
- Next.js Team: For the incredible framework and Turbopack
- Vercel: For seamless deployment and hosting
- Hume AI: For empathic voice technology
- Google: For Gemini AI model access
- Clerk: For authentication infrastructure
- Shadcn: For beautiful UI components
⭐ Star this repository if you find it helpful!
Built with ❤️ using Next.js, React, and AI