An AI-powered assignment management platform that allows admins to create assignments with built-in Q&A chatbots for candidates.
- ✅ Admin authentication with Google OAuth
- ✅ Create/publish assignments with Q&A database
- ✅ Public assignment pages with AI chatbot
- ✅ Together AI integration for answering candidate questions
- ✅ Email notifications for unanswered questions
- ✅ Candidate submission form
- ✅ Admin dashboard to view submissions & chat history
- Framework: Next.js 14 (App Router)
- Database: PostgreSQL with Prisma ORM
- Authentication: NextAuth.js with Google OAuth
- AI: Together AI (Llama 3.1)
- Email: Resend
- Styling: Tailwind CSS
- Deployment: Vercel (recommended)
- Node.js 18+ installed
- PostgreSQL installed and running
- Google OAuth credentials
- Together AI API key
- Resend API key
Create a .env file in the root directory:
# Database
DATABASE_URL="postgresql://your-username@localhost:5432/assessmentai"
# NextAuth
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="generate-with: openssl rand -base64 32"
# Google OAuth (Get from https://console.cloud.google.com)
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
# Together AI (Get from https://api.together.xyz)
TOGETHER_API_KEY="your-together-ai-key"
# Resend (Get from https://resend.com)
RESEND_API_KEY="your-resend-api-key"
ADMIN_EMAIL="your-email@example.com"- Go to Google Cloud Console
- Create a new project (or select existing)
- Enable Google+ API
- Go to "Credentials" → "Create Credentials" → "OAuth 2.0 Client ID"
- Set application type to "Web application"
- Add authorized redirect URI:
http://localhost:3000/api/auth/callback/google - Copy Client ID and Client Secret to
.env
- Sign up at Together AI
- Get your API key from the dashboard
- Add to
.envasTOGETHER_API_KEY
- Sign up at Resend
- Get your API key
- Important: Configure your sending domain (or use test mode)
- Update the
fromaddress inlib/email.tsto match your domain - Add to
.envasRESEND_API_KEY
npm installThe database should already be created. If not:
createdb assessmentaiThen run migrations:
npx prisma migrate devopenssl rand -base64 32Copy the output to NEXTAUTH_SECRET in .env
npm run devOpen http://localhost:3000 in your browser.
- Sign In: Visit the app and sign in with Google
- Create Assignment:
- Click "Create Assignment"
- Fill in company name, assignment name, compensation, expected time
- Add assignment details (description, requirements)
- Add Q&A pairs (questions candidates might ask + answers)
- Click "Publish Assignment" or "Save as Draft"
- Share Link: Copy the public link and share with candidates
- View Submissions: Click on an assignment to see all submissions
- Review Chat History: See what questions each candidate asked
- Monitor Unanswered Questions: Get email alerts when AI can't answer
- Visit Assignment Link: Open the link shared by the company
- Read Details: Review assignment requirements
- Ask Questions: Use the AI chatbot to get answers
- Submit Work:
- Enter your name, email, phone
- Paste link to your completed assignment (GitHub, etc.)
- Optionally add LinkedIn profile
- Click "Submit Assignment"
/app
/admin # Protected admin pages
/assignments
/new # Create assignment form
/[id] # Assignment details
/submissions # View submissions
/api
/auth # NextAuth configuration
/assignments # Assignment CRUD
/chat # AI chatbot endpoint
/submissions # Submission handling
/assignment/[id] # Public candidate page
/auth/signin # Sign-in page
/lib
/prisma.ts # Database client
/email.ts # Email utilities
/prisma
/schema.prisma # Database schema
/migrations # Database migrations
- Push your code to GitHub
- Go to Vercel
- Import your repository
- Add all environment variables from
.env - Update
NEXTAUTH_URLto your production URL - Update Google OAuth redirect URI to include production URL
- Deploy!
For production, use:
- Vercel Postgres
- Supabase
- Railway
- Any PostgreSQL provider
Update DATABASE_URL accordingly.
- Check redirect URI matches exactly in Google Console
- Make sure GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET are correct
- Try clearing cookies
- Verify API key is correct
- Check you have credits in your Together AI account
- Review API rate limits
- Verify Resend API key
- Configure your domain in Resend dashboard
- Check
fromaddress inlib/email.tsmatches your verified domain - In development, Resend may require domain verification
- Make sure PostgreSQL is running:
brew services list - Check DATABASE_URL is correct
- Run
npx prisma studioto test connection
- Rating system for submissions (1-10)
- Admin notes on submissions
- Edit assignments after creation
- Update Q&A database from admin panel
- Bulk actions on submissions
- Export submissions to CSV
- Analytics dashboard
- Multiple admin users
- Assignment templates
MIT