A highly configurable template for creating AI-powered Q&A assistants for any event.
Built with Next.js 16, featuring a full-screen chat interface with Google Gemini and community-driven FAQ voting system.
Customize in minutes - just edit config files. One-click FREE deployment on Vercel.
Current Example: AI Hackathon Festival 2025 (New Zealand)
Share Event Q&A AI Template
π Create your own event AI assistant in minutes. Fully configurable template for any event.
Tip
Experience the full-screen AI chat interface and community-driven FAQ system in action.
Tech Stack Badges:
Important
This is a reusable template - not just a single-purpose application. Clone it, edit a few config files, and deploy your own event Q&A AI in minutes. No code changes required for basic customization.
π Read the Quick Start Guide π
5 minutes from clone to deployment
Transform your hackathon experience with our revolutionary AI assistant powered by Google Gemini 2.5 Flash. Unlike traditional popup chatbots, our full-screen interface puts AI conversation at the center of your experience.
Key capabilities include:
- π Real-time Streaming: Character-by-character live responses
- π― Smart Suggestions: Pre-populated question cards for quick start
- π¬ Multi-line Input: Auto-resizing textarea with Shift+Enter support
- π Persistent History: 50 messages saved locally across sessions
- β‘ Instant Integration: FAQ questions flow seamlessly into chat
Tip
Try asking: "How do I form a team for the hackathon?" or click any FAQ card to see the instant integration in action.
Revolutionary FAQ management that evolves with your community. Users vote on helpful questions, automatically surfacing the most valuable content to the top.
Available Features:
- Voting System: π Helpful / π Not helpful with real-time sorting
- Smart Search: Find questions by keywords in title or content
- Category Filter: Browse by Event Info, Teams, Technical, etc.
- View Tracking: Popular questions rise to the top naturally
- One-Click Chat: Send any FAQ directly to AI for follow-up
Beyond the core functionality, this project includes:
- π¨ Instant Setup: Deploy in under 1 minute with one-click Vercel deployment
- π Responsive Design: Perfect experience on desktop (70/30 split) and mobile (tabs)
- π Privacy First: Chat data stored locally, votes synced to Notion
- π Modern Animations: Framer Motion powered micro-interactions
- π¨ Beautiful UI: shadcn/ui components with Tailwind CSS
- π Notion Backend: Real-time vote counts persisted to Notion database
- π Extensible: Update FAQ through Notion UI without code changes
- β‘ Performance Optimized: 5-min caching, optimistic updates, lazy loading
- π‘οΈ Graceful Fallback: Works without Notion (static questions)
β¨ Built as a reusable template - currently showcasing AI Hackathon Festival 2025 as an example configuration.
Frontend Stack:
- Framework: Next.js 16.1.1 with App Router
- Language: TypeScript for type safety
- Styling: Tailwind CSS v3 + Framer Motion v12
- UI Components: shadcn/ui + Radix UI primitives
- State Management: React hooks + Local Storage
AI Integration:
- AI SDK: Vercel AI SDK v4.3 for streaming
- AI Provider: Google Gemini 2.5 Flash via @ai-sdk/google
- Features: Real-time streaming, context awareness
- Performance: Optimized for low-latency responses
Backend Integration:
- Database: Notion API (@notionhq/client v2.3)
- FAQ System: Community-driven voting with real-time stats
- Caching: 5-minute client-side cache with optimistic updates
- Fallback: Static questions when Notion unavailable
DevOps & Performance:
- Deployment: Vercel with automatic CI/CD
- Performance: Lazy loading, efficient bundling
- Monitoring: Built-in error boundaries
- SEO: Next.js App Router with metadata
Tip
Each technology was carefully selected for developer experience, performance, and production readiness.
Note
Zero Code Changes Required - Customize everything through configuration files in the config/ directory.
This template uses a centralized configuration system. All event-specific content is separated from code:
| File | Purpose | What to Configure |
|---|---|---|
config/site.config.ts |
Event information | Name, dates, venue, organizers, links |
config/ai.config.ts |
AI assistant | System prompt, model settings, knowledge base |
config/content.config.ts |
Static content | FAQ questions, testimonials, chat suggestions |
config/branding.config.ts |
Visual assets | Logos, developer credits, project links |
1. Event Information (config/site.config.ts):
export const siteConfig: SiteConfig = {
name: 'Your Event Name 2025',
shortName: 'Event 2025',
tagline: 'Interactive Assistant',
dates: {
start: '2025-08-15',
end: '2025-08-16',
displayFormat: 'Aug 15-16, 2025',
},
venue: {
name: 'Convention Center',
address: '123 Main Street',
city: 'Your City',
},
organizers: [
{ name: 'Your Organization', logo: '/images/organizers/org.svg' },
],
};2. AI Knowledge (config/ai.config.ts):
// Add event-specific knowledge for the AI
const additionalContext = `
## Event Rules
- Teams: 2-5 members
- Duration: 24 hours
## Prize Categories
- Grand Prize: $5,000
- Best Innovation: $2,000
`;3. Branding (config/branding.config.ts):
export const brandingConfig: BrandingConfig = {
logos: {
main: '/images/event/logo.svg',
full: '/images/event/logo-full.svg',
},
showDeveloper: false, // Hide developer credits if desired
};public/images/
βββ event/ # Your event logos
β βββ logo.svg # Header/icon logo
β βββ logo-full.svg # Landing page logo
βββ organizers/ # Organizer/sponsor logos
β βββ org1.svg
β βββ org2.svg
βββ developer/ # Optional developer branding
βββ logo.svg
Tip
For detailed configuration instructions, see docs/TEMPLATE-SETUP.md
graph TB
subgraph "Configuration Layer"
CFG[config/]
CFG --> CFG1[site.config.ts]
CFG --> CFG2[ai.config.ts]
CFG --> CFG3[content.config.ts]
CFG --> CFG4[branding.config.ts]
end
subgraph "Frontend Layer"
A[Next.js App Router] --> B[React Components]
B --> C[Tailwind Styling]
C --> D[Framer Animations]
end
subgraph "AI Integration"
E[Vercel AI SDK] --> F[Google Gemini 2.5 Flash]
F --> G[Streaming Responses]
end
subgraph "Notion Backend"
N1[Notion API Client]
N2[(FAQ Database)]
N3[Vote & View Tracking]
N1 --> N2
N1 --> N3
end
subgraph "API Routes"
R1[/api/chat]
R2[/api/faq/questions]
R3[/api/faq/vote]
R4[/api/faq/view]
end
subgraph "Data Layer"
H[Local Storage] --> I[Chat History]
H --> J[User Votes Cache]
H --> K[FAQ Cache 5min]
end
subgraph "Deployment"
L[Vercel Platform]
M[Edge Functions]
end
CFG1 --> A
CFG2 --> R1
CFG3 --> B
CFG4 --> B
A --> E
B --> H
B --> R1
B --> R2
B --> R3
B --> R4
R1 --> F
R2 --> N1
R3 --> N1
R4 --> N1
L --> A
L --> M
config/ # π§ CONFIGURATION (edit these!)
βββ index.ts # Unified exports
βββ types.ts # TypeScript interfaces
βββ site.config.ts # Event name, dates, venue
βββ ai.config.ts # AI system prompt & settings
βββ content.config.ts # FAQ, testimonials, suggestions
βββ branding.config.ts # Logos, developer credits
app/ # Next.js App Router
βββ api/
β βββ chat/ # AI streaming endpoint (Gemini)
β βββ faq/ # FAQ endpoints
β βββ questions/ # GET - Fetch FAQ with stats
β βββ vote/ # POST - Record votes
β βββ view/ # POST - Track views
βββ chat/ # Chat page (70/30 layout)
βββ testimonials/ # Testimonials page
βββ globals.css # Global styles + color theme
βββ layout.tsx # Root layout (reads config)
βββ page.tsx # Home/landing page (reads config)
components/ # React components
βββ chat/ # EmbeddedChat, ChatSuggestions
βββ faq/ # FAQList, FAQCard (voting UI)
βββ chatbot/ # Chatbot, ChatMessage, types
βββ ui/ # shadcn/ui base components
hooks/ # Custom React hooks
βββ use-faq-voting.ts # FAQ voting with Notion sync
βββ use-scroll-direction.ts # Header visibility
lib/ # Utilities
βββ notion-faq.ts # Notion client & operations
βββ testimonials-data.ts # Wrapper β contentConfig
βββ utils.ts # Helper functions (cn)
docs/ # Documentation
βββ TEMPLATE-SETUP.md # Quick start guide
βββ UI-DESIGN-SYSTEM.md # Visual design guide
βββ NOTION-INTEGRATION.md # Notion backend docs
public/images/ # Static assets
βββ event/ # Event logos
βββ organizers/ # Organizer logos
βββ developer/ # Developer branding (optional)
Important
Ensure you have the following installed:
- Node.js 18.17+ (Download)
- npm/yarn/pnpm package manager
- Google Gemini API key (Get one here)
1. Clone Repository
git clone https://github.com/ChanMeng666/event-qa-ai-template.git
cd event-qa-ai-template2. Install Dependencies
# Using npm
npm install
# Using yarn
yarn install
# Using pnpm (recommended)
pnpm install3. Environment Setup
# Copy environment template
cp .env.example .env.local
# Edit environment variables
nano .env.localCreate .env.local file with the following variables:
# Required: Google Gemini API Key
GOOGLE_GENERATIVE_AI_API_KEY=your_google_gemini_api_key_here
# Required for FAQ Backend: Notion Integration
NOTION_TOKEN=your_notion_integration_token
NOTION_FAQ_DATABASE_ID=your_notion_database_id
# Optional: Application settings
NODE_ENV=development
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your_secret_key_hereTip
- Get your Google Gemini API key from Google AI Studio
- Get Notion token from Notion Integrations
- See docs/NOTION-INTEGRATION.md for database setup
- The app works without Notion (falls back to static questions)
4. Start Development
npm run devπ Success! Open http://localhost:3000 to view the application.
Important
Choose the deployment strategy that best fits your needs. Vercel is recommended for seamless Next.js deployment.
Deploy to Vercel (Recommended)
Vercel CLI:
# Install Vercel CLI
npm i -g vercel
# Deploy
vercel --prodOther Platforms:
Warning
Never commit sensitive environment variables to version control. Use secure secret management in production.
| Variable | Description | Required | Example |
|---|---|---|---|
GOOGLE_GENERATIVE_AI_API_KEY |
Google Gemini API key | β | AIza... |
NOTION_TOKEN |
Notion Integration token | β FAQ | secret_xxx... |
NOTION_FAQ_DATABASE_ID |
Notion FAQ database ID | β FAQ | abc123-... |
NEXTAUTH_SECRET |
Session encryption secret | πΆ | generated-secret-key |
NEXTAUTH_URL |
Application URL | πΆ | https://your-domain.vercel.app |
NODE_ENV |
Environment mode | πΆ | production |
Note
β Required, β FAQ = Required for FAQ voting feature, πΆ Optional
Without Notion variables, the app uses static FAQ questions (no voting persistence).
Desktop Experience:
- AI Chat (70%): Full-screen conversational interface
- FAQ Sidebar (30%): Community-driven question voting
- Seamless Integration: Click FAQ β flows into chat instantly
Mobile Experience:
- Tab Navigation: Swipe between Chat and FAQ views
- Optimized Layout: Full-screen on smaller devices
- Gesture Support: Native mobile interactions
Getting Started:
-
Choose Your Path:
- Click suggestion cards for instant common questions
- Type custom questions in natural language
- Send FAQ questions for detailed follow-up
-
Advanced Features:
- Multi-line Input: Use Shift+Enter for line breaks
- Context Awareness: AI remembers conversation history
- Instant Responses: Real-time streaming from Google Gemini 2.5 Flash
Example Interactions:
User: "How do I form a team?"
AI: [Streams detailed team formation guidance]
User: "What if I don't have technical skills?"
AI: [Provides specific advice for non-technical participants]
Community-Driven Ranking (Powered by Notion):
| Feature | Description | Benefit |
|---|---|---|
| π Upvote | Mark questions as helpful | Valuable content rises to top |
| π Downvote | Flag less useful content | Improves overall quality |
| π Real-time Stats | Vote counts synced to Notion | Persistent across sessions |
| π Search | Find by keywords | Quick access to specific topics |
| π·οΈ Filter | Browse by category | Organized content discovery |
| π¬ Send to Chat | One-click integration | Seamless AI follow-up |
Tip
Votes are stored locally for privacy and synced to Notion for persistence. The system uses optimistic updates for instant feedback.
Available Categories:
- π Event Information: Dates, schedule, logistics
- π₯ Team Formation: Finding teammates, roles, composition
- βοΈ Technical Details: AI requirements, datasets, tools
- π Awards & Judging: Criteria, prizes, evaluation process
- π― Mentorship: Getting help, Discord, support channels
Students can get help with:
- π― Getting Started: First-time hackathon guidance
- π₯ Team Building: Finding the right teammates
- π‘ Idea Development: Brainstorming and validation
- βοΈ Technical Setup: Tools, APIs, development environment
Mentors can assist with:
- π Resource Sharing: Point to useful FAQ answers
- π Teaching Moments: Use chat for detailed explanations
- π Quick References: Browse FAQ for common student questions
- π¬ Office Hours: Efficient Q&A through familiar interface
flowchart TD
A[Open Website] --> B{Choose Starting Point}
B -->|Quick Help| C[Click FAQ Card]
B -->|Custom Question| D[Type in Chat]
B -->|Browse Topics| E[Explore FAQ Categories]
C --> F[Read FAQ Answer]
F --> G[Send to Chat for More]
F --> V[Vote Helpful/Not]
D --> H[AI Streaming Response]
H --> I[Ask Follow-up Questions]
E --> J[Search & Filter]
J --> K[Discover Questions]
G --> H
I --> L[Continue Conversation]
K --> C
L --> M[Auto-saved to localStorage]
V --> N[Synced to Notion DB]
Tip
Pro Tip: Start with FAQ browsing to discover common topics, then use chat for personalized follow-up questions. Your votes help improve the experience for everyone!
Note
All customization is done through configuration files - no need to modify component code!
Edit config/site.config.ts to set your event's basic information:
export const siteConfig: SiteConfig = {
name: 'Your Event Name',
shortName: 'Event',
tagline: 'Your Tagline',
description: 'Event description for SEO',
dates: { start: '2025-08-15', end: '2025-08-16', displayFormat: 'Aug 15-16, 2025' },
venue: { name: 'Venue Name', address: '123 Main St', city: 'City' },
organizers: [{ name: 'Organization', shortName: 'Org', logo: '/images/organizers/org.svg' }],
};Edit config/content.config.ts to add or modify content:
const presetQuestions: PresetQuestion[] = [
{
id: 'unique-id',
category: 'event-info',
question: 'When is the event?',
answer: 'The event takes place on...',
},
];
const testimonials: Testimonial[] = [
{
id: '1',
quote: 'Amazing experience!',
author: 'John Doe',
role: 'participant',
organization: 'Company X',
},
];Edit config/ai.config.ts to customize the AI's knowledge and personality:
// Add event-specific knowledge
const additionalContext = `
## Event Rules
- Team size: 2-5 members
- Duration: 24 hours
## Prizes
- Grand Prize: $5,000
- Best Innovation: $2,000
`;
// Or override the entire system prompt
export const aiConfig: AIConfig = {
// ...
customSystemPrompt: 'Your completely custom system prompt here...',
};Edit app/globals.css to change the color scheme:
:root {
--primary: 221.2 83.2% 53.3%; /* Main brand color */
--primary-foreground: 210 40% 98%; /* Text on primary */
/* Modify other colors as needed */
}Edit config/branding.config.ts to set your visual identity:
export const brandingConfig: BrandingConfig = {
logos: {
main: '/images/event/logo.svg', // Header icon
full: '/images/event/logo-full.svg', // Landing page
favicon: '/images/event/logo.svg',
},
showDeveloper: false, // Hide developer credits
};Edit config/content.config.ts:
const categories: Record<string, string> = {
'event-info': 'Event Info',
'teams': 'Teams',
'your-new-category': 'Your Category Name', // Add new category
};Tip
For complete configuration reference, see docs/TEMPLATE-SETUP.md
We welcome contributions! Here's how you can help improve this project:
1. Fork & Setup:
# Fork the repository on GitHub
git clone https://github.com/YOUR_USERNAME/event-qa-ai-template.git
cd event-qa-ai-template
# Install dependencies
pnpm install
# Create environment file
cp .env.example .env.local
# Add your API keys2. Create Feature Branch:
git checkout -b feature/amazing-new-feature3. Development Guidelines:
- β Follow TypeScript best practices
- β Add comprehensive tests for new features
- β Use consistent code formatting (Prettier + ESLint)
- β Include JSDoc comments for public APIs
- β Follow accessibility guidelines (WCAG 2.1)
4. Submit Pull Request:
- Provide clear description of changes
- Include screenshots for UI changes
- Reference related issues
- Ensure all checks pass
| Type | Description | Examples |
|---|---|---|
| π Bug Fixes | Fix existing issues | API errors, UI glitches, performance |
| β¨ New Features | Add functionality | New categories, UI improvements |
| π Documentation | Improve guides | README updates, code comments |
| π¨ Design | Visual improvements | Better animations, color schemes |
| β‘ Performance | Optimize speed | Bundle size, loading times |
- Be respectful and inclusive
- Provide constructive feedback
- Help newcomers learn and contribute
- Focus on the project's goals
This project is licensed under the MIT License - see the LICENSE file for details.
Open Source Benefits:
- β Commercial use allowed
- β Modification allowed
- β Distribution allowed
- β Private use allowed
Chan Meng Creator & Lead Developer |
Author Contact:
- π Website: chanmeng.live
- πΌ LinkedIn: chanmeng666
- π§ Email: chanmeng.dev@gmail.com
- π GitHub: ChanMeng666
A reusable template for AI-powered event assistance
β Star us on GitHub β’ π Read the Setup Guide β’ π Report Issues β’ π‘ Request Features β’ π€ Contribute
Made with β€οΈ by Chan Meng




