Modern business website with integrated AI assistant powered by CopilotKit and Google Gemini.
# Install dependencies
npm install
# Run development server
npm run dev
# Open http://localhost:3000┌─────────────────────────────────────────┐
│ User's Browser │
└────────────────┬────────────────────────┘
│
▼
┌─────────────────────────────────────────┐
│ Next.js Application │
│ (React 19 + Next.js 16) │
└────────────────┬────────────────────────┘
│
▼
┌─────────────────────────────────────────┐
│ CopilotKit Runtime │
│ (/api/copilotkit) │
└────────────────┬────────────────────────┘
│
▼
┌─────────────────────────────────────────┐
│ Google Gemini API │
│ (AI Model Provider) │
└─────────────────────────────────────────┘
- ✅ Conversational AI chatbot
- ✅ Understands company services and offerings
- ✅ Context-aware responses using
useCopilotReadable - ✅ Powered by Google Gemini
- 🔌 RESTful API - Discoverable by other AI assistants
- 📋 OpenAPI Specification - Ready for GPT Actions & Copilot Connectors
- 🔐 Secure Authentication - API key-based access control
- 📊 Service Discovery - Programmatic access to services and information
- 📅 Consultation Booking - AI assistants can book consultations on behalf of users
- 🏠 Homepage - Company overview and services
- 💼 Consulting - AI consulting services and expertise
- 🔬 Research - B2B research platform details
- 🔒 Compliance - Security certifications and standards
- 📞 Contact - Contact methods and office locations
- ⚡ Next.js 16 with App Router
- ⚛️ React 19
- 🎨 Tailwind CSS 4
- 🤖 CopilotKit for AI integration
- 🔐 Google Gemini for AI responses
Create a .env.local file:
# Required: Google Gemini API Key
GEMINI_API_KEY=your_gemini_api_key_here
# Alternative (if not using GEMINI_API_KEY)
GOOGLE_API_KEY=your_google_api_key_here
# Required for API endpoints: API Key for external AI integrations
# Generate with: openssl rand -hex 32
API_KEY=your_secure_api_key_here
# Optional: CopilotKit License
NEXT_PUBLIC_COPILOT_LICENSE_KEY=your_copilotkit_license_keyGet your Gemini API key: https://aistudio.google.com/app/apikey
Generate API key for external integrations:
openssl rand -hex 32# Development
npm run dev # Start development server
# Production
npm run build # Build for production
npm start # Start production server
# Linting
npm run lint # Run ESLint-
Connect Repository
- Push your code to GitHub
- Import project in Vercel Dashboard
-
Set Environment Variables
- Add
GEMINI_API_KEYin Vercel project settings - Go to Settings → Environment Variables
- Add
-
Deploy
- Vercel auto-deploys on every push
- Or manually:
vercel --prod
| Variable | Required | Description |
|---|---|---|
GEMINI_API_KEY |
✅ Yes | Google Gemini API key |
GOOGLE_API_KEY |
Alternative | Alternative to GEMINI_API_KEY |
API_KEY |
✅ Yes (for API) | API key for external AI integrations (GPT Actions, Copilot Connectors) |
# Start the dev server
npm run dev
# Test the AI assistant
1. Open http://localhost:3000
2. Click the AI assistant icon (bottom right)
3. Ask: "What services does your company offer?"After deploying to Vercel:
# Check API endpoint
curl https://your-app.vercel.app/api/copilotkit
# Should return 200 or 405 (not 500)new-oss/
├── app/ # Next.js App Router
│ ├── page.tsx # Homepage
│ ├── consulting/ # Consulting page
│ ├── research/ # Research page
│ ├── compliance/ # Compliance page
│ ├── contact/ # Contact page
│ ├── api/
│ │ ├── copilotkit/ # CopilotKit API route
│ │ └── v1/ # RESTful API v1
│ │ ├── services/ # Service discovery endpoints
│ │ ├── consultations/ # Consultation booking
│ │ └── status/ # System status
│ ├── layout.tsx # Root layout
│ └── globals.css # Global styles
├── components/ # React components
│ ├── ui/ # shadcn/ui components
│ └── ...
├── lib/ # Utility functions
│ ├── api-auth.ts # API authentication
│ ├── errors.ts # Error handling
│ └── utils.ts # General utilities
├── docs/ # Documentation
│ └── API_REGISTRATION_GUIDE.md # GPT Actions & Copilot registration
├── openapi.yaml # OpenAPI specification (Rosetta Stone)
├── public/ # Static assets
├── .env.local # Environment variables (git-ignored)
└── package.json # Dependencies
Built with shadcn/ui and Tailwind CSS:
- Modern, accessible components
- Dark mode support
- Fully customizable
- TypeScript-first
- ✅ Security controls built around recognized frameworks
- ✅ Secure, governed handling of sensitive data
- ✅ Secure API key management
- ✅ Environment variable validation
- ✅ Error boundary protection
- Context Injection: Each page uses
useCopilotReadableto provide context - User Query: User asks a question via the chatbot
- AI Processing: CopilotKit sends context + query to Google Gemini
- Intelligent Response: AI responds with relevant, contextual information
// In any page component
import { useCopilotReadable } from "@copilotkit/react-core";
export default function Page() {
useCopilotReadable({
description: "Page description",
value: {
key: "value",
data: {...}
}
});
return <div>Your page content</div>;
}docs/API_REGISTRATION_GUIDE.md- NEW! Guide to register API as GPT Action or Copilot Connectoropenapi.yaml- OpenAPI 3.1.0 specification for AI integrationsVERCEL_DEPLOYMENT.md- Detailed deployment guideVERCEL_CHECKLIST.md- Pre-deployment checklist
The project now exposes a RESTful API that can be discovered by AI assistants:
| Endpoint | Method | Description |
|---|---|---|
/api/v1/services |
GET | List all available services |
/api/v1/services/{serviceId} |
GET | Get detailed service information |
/api/v1/consultations |
POST | Book a consultation |
/api/v1/status |
GET | Check system health |
All API endpoints require an X-API-Key header:
curl -H "X-API-Key: your-api-key" \
https://your-domain.vercel.app/api/v1/servicesSee docs/API_REGISTRATION_GUIDE.md for instructions on:
- Registering as an OpenAI GPT Action
- Registering as a Microsoft Copilot Connector
- Testing and verification steps
- Check
GEMINI_API_KEYis set - Verify API key is valid at https://aistudio.google.com
- Check browser console for errors
- Review Vercel function logs
# Clean install
rm -rf .next node_modules
npm install
npm run buildEnsure .env.local exists with required variables:
GEMINI_API_KEY=AIza...- ⚡ Fast page loads with Next.js 16
- 📦 Optimized bundle sizes
- 🔄 Incremental Static Regeneration
- 🌐 Edge-ready for global deployment
- 💨 Streaming responses from AI
Private project - All rights reserved
For issues or questions:
- Email: hello@overturesystems.com
- Website: https://overturesystems.com
Built with ❤️ using Next.js, React, and CopilotKit