AI-powered meeting preparation assistant. Sign in with Google, see your upcoming calendar meetings, and generate structured AI briefings — with context pulled from your emails.
- Google OAuth login — sign in with your Google account
- Calendar sync — fetches upcoming meetings (next 24 hours) from Google Calendar
- Gmail context — pulls related email threads with meeting participants
- AI briefings — generates structured meeting briefs using Groq (llama-3.3-70b-versatile)
- PostgreSQL persistence — stores users, meetings, and generated briefs
- Frontend: Next.js 14 (App Router) + Tailwind CSS
- Backend: Next.js API Routes
- Database: PostgreSQL (Neon Serverless)
- APIs: Google Calendar, Gmail, Groq
- Node.js 18+ and npm
- PostgreSQL (e.g., Neon Serverless Postgres)
- Google Cloud Project with OAuth 2.0 credentials
- Groq API key
cd Chief
npm installCreate a database:
CREATE DATABASE chiefofstaff;Run the schema:
psql -d chiefofstaff -f src/lib/schema.sql- Go to Google Cloud Console
- Create a new project (or use an existing one)
- Enable Google Calendar API and Gmail 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 the Client ID and Client Secret
Copy the example env file:
cp .env.example .env.localFill in your values:
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
NEXTAUTH_SECRET=any-random-string-at-least-32-chars
NEXTAUTH_URL=http://localhost:3000
DATABASE_URL=postgresql://user:password@localhost:5432/chiefofstaff
OPENAI_API_KEY=sk-your-openai-api-keynpm run devOpen http://localhost:3000 in your browser.
| Variable | Description |
|---|---|
GOOGLE_CLIENT_ID |
Google OAuth 2.0 Client ID |
GOOGLE_CLIENT_SECRET |
Google OAuth 2.0 Client Secret |
NEXTAUTH_SECRET |
Random string for NextAuth session encryption |
NEXTAUTH_URL |
App URL (use http://localhost:3000 for local) |
DATABASE_URL |
PostgreSQL connection string |
OPENAI_API_KEY |
OpenAI API key |
src/
├── app/
│ ├── api/
│ │ ├── auth/[...nextauth]/route.js # Google OAuth
│ │ ├── meetings/route.js # Calendar sync
│ │ ├── briefs/
│ │ │ ├── generate/route.js # AI brief generation
│ │ │ └── [meetingId]/route.js # Get existing brief
│ ├── dashboard/page.js # Main dashboard
│ ├── layout.js # Root layout
│ ├── page.js # Login page
│ └── globals.css # Tailwind + custom CSS
├── components/
│ ├── AuthProvider.jsx # Session provider
│ ├── BriefCard.jsx # AI brief display
│ ├── MeetingCard.jsx # Meeting card w/ generate button
│ └── Navbar.jsx # Top navigation
└── lib/
├── ai/generate-brief.js # OpenAI integration
├── google/calendar.js # Google Calendar API
├── google/gmail.js # Gmail API
├── auth.js # Auth helpers
├── db.js # PostgreSQL connection
└── schema.sql # Database schema