An interactive survey platform that rewards users for sharing their experiences through AI-powered voice interviews. Built with Next.js, ElevenLabs Conversational AI, and Prisma.
- Voice-based Surveys: Natural conversations with an AI interviewer
- Earnings System: Get paid for completing surveys (real-time earnings tracking)
- Topic Selection: Choose from various survey categories
- Live Transcripts: Real-time transcription of conversations
- User Authentication: Secure login with NextAuth.js
- Progress Tracking: View earnings history and statistics
- Database Storage: Persistent data with Prisma and MySQL
- Node.js 18.0.0 or higher
- pnpm 10.12.1 or higher
- MySQL database (or other Prisma-supported database)
- An ElevenLabs account with a Conversational AI agent
- Google OAuth credentials (for NextAuth.js authentication)
- Clone the repository:
git clone https://github.com/yourusername/curiosity-engine.git
cd curiosity-engine- Install dependencies:
pnpm install- Set up the database:
# Initialize Prisma and create database tables
pnpm prisma db push
# (Optional) Seed the database with sample data
pnpm prisma db seed- Configure environment variables:
- Copy
.env.exampleto.env.local - Add your configuration:
- Copy
# Database (MySQL)
DATABASE_URL="mysql://user:password@localhost:3306/curiosity_engine"
# ElevenLabs
ELEVENLABS_API_KEY=your-elevenlabs-api-key-here
NEXT_PUBLIC_ELEVENLABS_AGENT_ID=your-elevenlabs-agent-id-here
# NextAuth.js
AUTH_SECRET=your-auth-secret-here
AUTH_URL=http://localhost:3000
# Google OAuth (required for authentication)
AUTH_GOOGLE_ID=your-google-oauth-client-id
AUTH_GOOGLE_SECRET=your-google-oauth-client-secret- Configure your ElevenLabs agent:
- Log in to your ElevenLabs dashboard
- Create a new Conversational AI agent
- Configure the agent as an empathetic interviewer
- Set up dynamic variables for
initial_questionandsurvey_topic - Copy the Agent ID to your environment variables
Run the development server:
pnpm devOpen http://localhost:3000 to see the application.
- Sign in with your preferred authentication method
- Browse available survey topics on the main screen
- Select a topic that interests you
- Click "Start Interview" to begin the conversation
- Allow microphone access when prompted
- Answer the AI interviewer's questions naturally
- Watch your earnings accumulate in real-time
- Click "End Interview" when you're done
- Your earnings are automatically saved to your account
src/
├── app/
│ ├── page.tsx - Main dashboard with topic selection
│ ├── layout.tsx - Root layout with authentication
│ ├── actions/ - Server actions for earnings
│ ├── api/
│ │ ├── auth/ - NextAuth.js endpoints
│ │ ├── earnings/ - Earnings API routes
│ │ └── interviews/ - Interview data endpoints
│ ├── login/ - Login page
│ └── protected/ - Protected routes
├── components/
│ ├── TopicGrid.tsx - Survey topic selection grid
│ ├── InterviewPanel.tsx - Active interview interface
│ ├── EarningsPanel.tsx - Real-time earnings tracker
│ ├── EarningsOverview.tsx - Earnings statistics display
│ ├── TranscriptContainer.tsx - Live conversation transcript
│ ├── UserProfile.tsx - User authentication status
│ ├── SessionProvider.tsx - NextAuth session provider
│ └── ui/ - Reusable UI components
├── config/
│ └── surveyTopics.ts - Available survey configurations
├── lib/
│ ├── auth.ts - NextAuth configuration
│ ├── auth.config.ts - Edge-compatible auth config
│ └── prisma.ts - Prisma client instance
├── types/
│ └── next-auth.d.ts - NextAuth type extensions
└── middleware.ts - Authentication middleware
prisma/
└── schema.prisma - Database schema
- Next.js 15.3.4 - React framework with App Router
- React 19 - UI library
- TypeScript 5 - Type safety
- Tailwind CSS v4 - Styling framework
- ElevenLabs Conversational AI - AI voice agent platform
- Prisma 6.10 - Type-safe database ORM
- NextAuth.js v5 Beta - Authentication framework
- Framer Motion 12 - Animation library
- pnpm 10.12.1 - Fast, efficient package manager
# Install dependencies
pnpm install
# Run development server with Turbopack
pnpm dev
# Build for production
pnpm build
# Start production server
pnpm start
# Run linting
pnpm lint
pnpm lint:fix
# Format code
pnpm format
pnpm format:check
# Type checking
pnpm typecheck
# Run all checks
pnpm check-all
# Database commands
pnpm prisma studio # Open Prisma Studio
pnpm prisma db push # Push schema changes
pnpm prisma generate # Generate Prisma ClientThe easiest way to deploy your Next.js app is to use the Vercel Platform.
Check out the Next.js deployment documentation for more details.
This project is open source and available under the MIT License.