An intelligent onboarding system that combines HR management, employee portal, and AI-powered assistance with automated email routing.
- Quick Employee Registration: Create new employee profiles with essential information
- Real-time Dashboard: View all onboarded employees and their status
- Automatic Provisioning: Employee credentials are instantly ready for use
- Personalized Portal: Login with HR-created credentials
- Interactive Onboarding Checklist: Track progress through onboarding tasks
- Integration Overview: View connected services (Slack, GitHub, etc.)
- AI Assistant: Get help through text or video avatar chat
- Voice-Activated Avatar: Talk naturally with an AI avatar
- Intelligent Routing: AI automatically sends emails to the right department
- Context-Aware: Understands license requests, HR questions, and manager communications
- No Manual Process: Employees simply ask, AI handles the rest
- Frontend: Next.js 16, React 19, TypeScript
- Styling: Tailwind CSS
- Database: Supabase (PostgreSQL)
- Authentication: Custom authentication with Supabase
- Email: Resend API
- AI: Anam AI with GPT-4.1 and function calling
- UI Components: Radix UI with custom styling
- Node.js 18+ and pnpm
- Supabase account
- Resend account
- Anam AI API access
pnpm install- Create a project at supabase.com
- Run this SQL in the SQL Editor:
CREATE TABLE employees (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
email TEXT UNIQUE NOT NULL,
password TEXT NOT NULL,
name TEXT NOT NULL,
role TEXT NOT NULL,
project TEXT NOT NULL,
manager_email TEXT,
onboarding_status TEXT DEFAULT 'active',
created_at TIMESTAMP WITH TIME ZONE DEFAULT TIMEZONE('utc', NOW())
);
ALTER TABLE employees ENABLE ROW LEVEL SECURITY;
CREATE POLICY "Allow all operations" ON employees
FOR ALL USING (true) WITH CHECK (true);- Get your credentials from Settings β API
- Create account at resend.com
- Create an API key in the dashboard
- (Optional) Add and verify your domain
Create .env.local file:
# Supabase
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
# Resend
RESEND_API_KEY=your_resend_api_key
# Anam AI (provided)
NEXT_PUBLIC_ANAM_API_KEY=NDYwOTNkNjctODE2Zi00MjVlLWE5YjktNGI1NDA5NmUyZmQ4OlUyKy80QWhnS29GcUIySUdzOGNHOVF1RWdERmhhNGsrK3k1L1B3dE9KZXM9
NEXT_PUBLIC_ANAM_KNOWLEDGE_FOLDER_ID=befa776a-c557-4846-b33b-620811e11327
NEXT_PUBLIC_ANAM_AVATAR_ID=30fa96d0-26c4-4e55-94a0-517025942e18
NEXT_PUBLIC_ANAM_VOICE_ID=6bfbe25a-979d-40f3-a92b-5394170af54b
NEXT_PUBLIC_ANAM_LLM_ID=0934d97d-0c3a-4f33-91b0-5e136a0ef466pnpm dev- Click "Admin Dashboard"
- Fill in the employee form
- Click "Create Employee Profile"
- Employee is added to database and can immediately log in
- Use email and password created by HR
- Access personalized dashboard
- View onboarding checklist and integrations
- Chat with AI assistant
- Click "Avatar" button in chatbot section
- Allow microphone access
- Wait for green "Ready to chat!" status
- Speak naturally:
- "I need access to Adobe Creative Cloud"
- "I have a question about vacation policy"
- "How do I contact my manager?"
- AI automatically sends emails to appropriate department
/api
βββ employees/create β Create new employee in database
βββ auth/login β Authenticate employee
βββ send-email β Send automated emails (called by Anam AI)
βββ chat β Text chatbot endpoint
components/
βββ employee-auth/
β βββ login-form.tsx β Employee login
βββ hr-onboarding-dashboard.tsx β HR admin interface
βββ employee-dashboard.tsx β Employee portal
βββ dual-chatbot-interface.tsx β Chat mode switcher
βββ text-chatbot.tsx β Text-based chat
βββ anam-avatar-chatbot.tsx β AI avatar with email automation
βββ onboarding-checklist.tsx β Task tracking
βββ integrations-panel.tsx β Connected services
employees
βββ id (UUID)
βββ email (TEXT, UNIQUE)
βββ password (TEXT)
βββ name (TEXT)
βββ role (TEXT)
βββ project (TEXT)
βββ manager_email (TEXT, optional)
βββ onboarding_status (TEXT)
βββ created_at (TIMESTAMP)
Anam AI uses function calling to detect when employees need help:
functions: [
{
name: "send_email_to_it",
description: "Send email to IT support for licenses/access",
parameters: { request_type, details, employee_name }
},
{
name: "send_email_to_hr",
description: "Send email to HR for policies/benefits",
parameters: { question_type, details, employee_name }
},
{
name: "send_email_to_manager",
description: "Send email to employee's manager",
parameters: { subject, message, employee_name }
}
]When employee speaks a request, Anam AI:
- Understands the intent
- Extracts relevant details
- Calls the appropriate function
- API sends email via Resend
- Confirms to employee
| Employee Request | AI Detects | Emails To |
|---|---|---|
| "I need a license" | send_email_to_it | it-support@raspberry-coffee.com |
| "Vacation policy question" | send_email_to_hr | hr@raspberry-coffee.com |
| "Talk to my manager" | send_email_to_manager | employee.manager_email |
- Setup Instructions - Detailed setup guide
- Demo Guide - Live demo presentation script
- Anam AI Docs - Anam AI documentation
For production, implement:
- Password hashing (bcrypt)
- JWT authentication
- Environment variable validation
- Input sanitization
- Rate limiting
- CORS configuration
- Secure headers
Update .env.local:
NEXT_PUBLIC_ANAM_AVATAR_ID=new_avatar_idBrowse avatars: Anam Avatar Gallery
Update .env.local:
NEXT_PUBLIC_ANAM_VOICE_ID=new_voice_idBrowse voices: Anam Voice Gallery
Edit components/anam-avatar-chatbot.tsx and add new functions to the functions array.
Edit app/api/send-email/route.ts to customize email content.
-
HR Creates Employee
- Fill form β Submit β Verify in list
-
Employee Logs In
- Use created credentials β Access dashboard
-
AI Email Automation
- Switch to Avatar mode
- Say: "I need Adobe Creative Cloud"
- Check Resend logs for sent email
- Check microphone permissions
- Verify Anam API keys
- Check browser console for errors
- Verify Supabase connection
- Check table exists
- Ensure .env.local is configured
- Check Resend API key
- Verify sender domain
- Check Resend logs
MIT
This is a demo project. For production use, please implement proper security measures.
For issues:
- Check SETUP_INSTRUCTIONS.md
- Review browser console errors
- Check server logs
- Verify all environment variables
Built with β€οΈ using Next.js, Supabase, Resend, and Anam AI