AI-powered social coordination. Friends connect Google Calendar and optionally share location; Claude analyzes availability overlaps, proximity, and activity preferences to generate meetup suggestions.
- Next.js 16 (App Router) + TypeScript
- Shadcn/ui + Tailwind CSS
- NextAuth v4 — Google OAuth with
calendar.readonly+calendar.eventsscopes - Prisma 7 + PostgreSQL (
@prisma/adapter-pg) - Claude API (
claude-sonnet-4-6) via@anthropic-ai/sdk - Google Calendar API (read for sync, write for confirmed meetups)
Copy and fill in .env.local:
DATABASE_URL=postgresql://...
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=<openssl rand -base64 32>
GOOGLE_CLIENT_ID=...
GOOGLE_CLIENT_SECRET=...
ANTHROPIC_API_KEY=...
Google Cloud setup:
- Enable Calendar API and People API
- Add
https://www.googleapis.com/auth/calendar.readonlyandhttps://www.googleapis.com/auth/calendar.eventsto consent screen - Add redirect URI:
http://localhost:3000/api/auth/callback/google - If you add calendar scopes after users have already signed in, they must reconnect Google once so their stored token is re-issued with the new permissions.
npx prisma db push
npm run db:seed # optional demo datanpm run dev- Sign in with Google → tokens stored in DB
- Settings → sync calendar → availability blocks computed
- Settings → share location → proximity enabled
- Settings → set activity preferences
- Add friends, accept their requests
- Dashboard → AI pipeline runs:
- Loads availability blocks for user + friends (next 48h)
- Computes pairwise overlapping free windows
- Scores clusters by proximity × activity overlap
- Sends top 10 clusters to Claude as structured context
- Claude returns JSON array of suggestions
- Suggestions persisted (cached 4h)
- Confirm a suggestion → creates a Meetup record
src/
├── app/
│ ├── page.tsx # Landing / auth gate
│ ├── dashboard/page.tsx # Suggestion feed + upcoming meetups
│ ├── friends/page.tsx # Friend management
│ ├── groups/page.tsx # Group management
│ ├── settings/page.tsx # Calendar, location, preferences
│ └── api/ # All API routes
├── components/ # UI components by domain
├── lib/
│ ├── matching.ts # Algorithmic candidate clustering
│ ├── claude.ts # Claude prompt + response parsing
│ ├── availability.ts # Free-block computation
│ └── google-calendar.ts # Calendar API + token refresh
└── types/index.ts