AI-Powered Exit Interview Platform for Modern Organizations
Features β’ Contributing β’ License
Exit Interview - Lyzr AI is an open-source, AI-powered platform that transforms the traditional exit interview process. Organizations can conduct structured, confidential exit interviews with departing employees, gaining actionable insights to improve retention and workplace culture.
- π€ AI-Driven Conversations - Natural, adaptive interview flow powered by Lyzr AI
- π§ Multi-Channel Email Delivery - Gmail OAuth, SMTP fallback, and manual options
- π¨ Customizable Templates - Brand your interview invitations
- π Real-Time Analytics - Sentiment analysis and comprehensive insights
- π Enterprise-Grade Security - Multi-tenant architecture with complete data isolation
- β‘ Modern Stack - Built on Next.js 15, React 19, and TypeScript
|
Intelligent conversation flow that adapts to employee responses using natural language processing and contextual awareness. |
Multiple delivery channels with automatic fallback: Gmail OAuth β SMTP β Manual distribution. |
|
Real-time sentiment analysis, theme extraction, and actionable insights to drive organizational improvements. |
HTML and text email templates with variable substitution for personalized communications. |
|
Enterprise-grade multi-tenant architecture ensuring complete data privacy and isolation. |
Built with Next.js 15, React 19, TypeScript, MongoDB, and Tailwind CSS for maximum performance. |
| Category | Technologies |
|---|---|
| Frontend | Next.js 15, React 19, TypeScript |
| Backend | Next.js API Routes, Node.js |
| Database | MongoDB + Mongoose ODM |
| AI/ML | Lyzr Agent SDK |
| Gmail API, Nodemailer (SMTP) | |
| UI | Radix UI, Tailwind CSS, Lucide Icons |
| State | Redux Toolkit, React Context |
Before you begin, ensure you have the following installed:
- Node.js 18+ and npm/yarn/pnpm
- MongoDB (local or cloud instance)
- Google Cloud Console account (for Gmail OAuth)
- Lyzr API credentials
git clone https://github.com/amitlyzr/exit-interview-os.git
cd exit-interview-osnpm install
# or
yarn install
# or
pnpm installCreate a .env.local file in the root directory:
# Database
MONGODB_URI=mongodb://localhost:27017/exit-interview
# Application
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Gmail OAuth (Required for email sending)
GOOGLE_CLIENT_ID=your_google_client_id_here
GOOGLE_CLIENT_SECRET=your_google_client_secret_here
# Lyzr AI Integration
LYZR_API_KEY=your_lyzr_api_key_here
LYZR_QUESTIONINAIRE_AGENT_ID=""
LYZR_SENTIMENT_AGENT_ID=""
LYZR_FEEDBACK_AGENT_ID=""
LYZR_SUGGESTIONS_AGENT_ID=""npm run devOpen http://localhost:3000 in your browser. π
The application supports multiple email delivery methods with automatic fallback:
Gmail OAuth (Primary) β SMTP (Fallback) β Manual Link (Last Resort)
π§ Google Cloud Console Setup (Click to expand)
Step 1: Create Google Cloud Project
- Visit Google Cloud Console
- Create a new project or select an existing one
- Enable the Gmail API
Step 2: Create OAuth 2.0 Credentials
- Navigate to APIs & Services β Credentials
- Click Create Credentials β OAuth client ID
- Choose Web application
Step 3: Configure OAuth Consent Screen
- Add application name and authorized domains
- Add scopes:
https://www.googleapis.com/auth/gmail.sendhttps://www.googleapis.com/auth/userinfo.email
Step 4: Set Authorized Redirect URIs
- Development:
http://localhost:3000/api/auth/gmail/callback - Production:
https://yourdomain.com/api/auth/gmail/callback
Step 5: Get Credentials
- Copy Client ID and Client Secret to your
.env.local
- Navigate to Settings β Gmail Connection
- Click "Connect Gmail" button
- Complete Google OAuth consent flow
- Start sending invitations! βοΈ
Configure SMTP in application settings:
| Setting | Value |
|---|---|
| Host | smtp.gmail.com |
| Port | 587 |
| Security | STARTTLS |
| Username | your-email@gmail.com |
| Password | your-app-password |
src/
βββ app/ # Next.js App Router
β βββ (hr-dashboard)/ # HR Dashboard routes
β βββ (interview)/ # Interview participant routes
β βββ api/ # API endpoints
β β βββ auth/gmail/ # Gmail OAuth endpoints
β β βββ email-template/ # Email template management
β β βββ send-invitation/ # Email sending logic
β β βββ sessions/ # Interview session management
β β βββ analytics/ # Analytics endpoints
β βββ globals.css # Global styles
βββ components/ # Reusable UI components
β βββ shared/ # Common components
β βββ providers/ # Context providers
β βββ logo/ # Branding components
βββ lib/ # Utility libraries
β βββ mongodb/ # Database schemas and connection
β βββ features/ # Feature-specific logic
β βββ lyzr-api/ # AI integration
β βββ gmail-auth.ts # Gmail OAuth service
β βββ gmail-email-service.ts # Email sending service
β βββ server-auth-utils.ts # Server-side auth utilities
βββ hooks/ # Custom React hooks
View All API Endpoints
POST /api/auth/gmail/connect - Initiate Gmail connection
GET /api/auth/gmail/callback - OAuth callback handler
GET /api/auth/gmail/status - Check connection status
DELETE /api/auth/gmail/status - Disconnect Gmail
POST /api/auth/gmail/test - Send test email
GET /api/email-template - Get email template
POST /api/email-template - Save email template
DELETE /api/email-template - Reset to default template
GET /api/sessions - List interview sessions
POST /api/sessions - Create new session
POST /api/send-invitation - Send interview invitation
GET /api/sessions/:id - Get session details
PATCH /api/sessions/:id - Update session
DELETE /api/sessions/:id - Delete session
GET /api/messages - Get conversation messages
POST /api/messages - Store new message
POST /api/feedback - Generate AI feedback
GET /api/analytics - Get interview analytics
GET /api/sentiment - Get sentiment analysis
POST /api/suggestions - Get improvement suggestions
Customize your interview invitation emails with dynamic variables:
| Variable | Description |
|---|---|
{{name}} |
Employee's full name |
{{role}} |
Job role/title |
{{level}} |
Seniority level (junior/mid/senior) |
{{tenure}} |
Employment duration in months |
{{interviewUrl}} |
Unique interview link |
π HTML Template Example
```html <style> .button { background: #007bff; color: white; padding: 12px 24px; text-decoration: none; border-radius: 4px; } </style>
Dear {{name}},
We invite you to participate in an AI-powered exit interview.
Start Exit Interview ```| π OAuth 2.0 | Secure Gmail integration without password storage |
| π’ Multi-Tenant | Complete data isolation per organization |
| π Token Management | Automatic refresh and secure token storage |
| β Input Validation | Comprehensive validation with Zod schemas |
| π‘οΈ CORS Protection | Secure cross-origin request handling |
Transform exit interview data into actionable insights:
- π Completion Rates - Track interview participation metrics
- π Sentiment Analysis - AI-powered emotional tone analysis
- π― Pattern Recognition - Identify common themes and concerns
- π₯ Role-Based Insights - Analytics segmented by department and level
- π Trend Analysis - Historical data and retention patterns
- π‘ AI Recommendations - Actionable suggestions for improvement
# Build for production
npm run build
# Start production server
npm start| Platform | Status | Documentation |
|---|---|---|
| Vercel | β Recommended | Optimized for Next.js |
| Docker | β Supported | Dockerfile included |
| AWS | β Supported | EC2, ECS, or Lambda |
| Google Cloud | β Supported | Cloud Run or App Engine |
| Azure | β Supported | App Service |
π Common Issues & Solutions
- β Verify environment variables are set correctly
- β Check Google Cloud Console OAuth configuration
- β Ensure redirect URIs match exactly (dev vs production)
- β Check Gmail API quotas in Google Cloud Console
- β Verify user has granted necessary permissions
- β Test with SMTP fallback configuration
- β Verify MongoDB URI format and credentials
- β Check network connectivity to MongoDB instance
- β Ensure database user has proper permissions
- β
Clear
.nextfolder:rm -rf .next - β
Clear
node_modules:rm -rf node_modules - β
Reinstall dependencies:
npm install - β
Check TypeScript errors:
npm run lint
- Free Tier: 1 billion quota units/day
- Email Sending: ~25 quota units per email
- Monitor: Google Cloud Console β APIs & Services β Quotas
We love contributions! Exit Interview OS is open-source and welcomes improvements from the community.
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Commit your changes
git commit -m 'Add amazing feature' - Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
- Follow TypeScript best practices
- β Write tests for new features
- π Update documentation
- π¨ Follow existing code style
- π¬ Write clear commit messages
This project is licensed under the MIT License - see the LICENSE file for details.
- π Documentation
- π¬ GitHub Discussions
- π Issue Tracker
- π§ Email Support
Built with β€οΈ by Lyzr AI