An AI-powered thinking partner application that helps users work through problems and ideas through structured conversation with Claude AI.
- User authentication via Supabase magic links
- Create and manage thinking sessions
- Real-time chat interface with Claude AI
- Persistent conversation history
- User profiles
- Mobile-responsive design following professional design principles
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- Database & Auth: Supabase
- AI: Anthropic Claude API
- Deployment: Vercel (recommended)
- Node.js 18+ installed
- Supabase account
- Anthropic API key
npm install- Create a new project at supabase.com
- Go to SQL Editor and run the schema from
supabase/schema.sql - Copy your project URL and anon key from Settings > API
Create a .env.local file in the root directory:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
ANTHROPIC_API_KEY=your_anthropic_api_keynpm run devOpen http://localhost:3000 in your browser.
profiles
id(UUID, references auth.users)display_name(TEXT)occupation(TEXT)bio(TEXT)created_at(TIMESTAMPTZ)updated_at(TIMESTAMPTZ)
sessions
id(UUID, primary key)user_id(UUID, references auth.users)title(TEXT)initial_problem(TEXT)status('active' | 'completed')created_at(TIMESTAMPTZ)updated_at(TIMESTAMPTZ)
messages
id(UUID, primary key)session_id(UUID, references sessions)role('user' | 'assistant')content(TEXT)created_at(TIMESTAMPTZ)
thinking-partner/
├── app/
│ ├── api/
│ │ └── chat/
│ │ └── route.ts # Claude API integration
│ ├── auth/
│ │ ├── signin/
│ │ │ └── page.tsx # Sign in page
│ │ └── callback/
│ │ └── route.ts # Auth callback handler
│ ├── dashboard/
│ │ ├── page.tsx # Sessions dashboard
│ │ ├── new/
│ │ │ └── page.tsx # Create new session
│ │ └── session/[id]/
│ │ └── page.tsx # Chat interface
│ ├── profile/
│ │ └── page.tsx # User profile
│ ├── page.tsx # Landing page
│ ├── layout.tsx # Root layout
│ └── globals.css # Global styles
├── components/
│ ├── ui/
│ │ ├── Button.tsx
│ │ ├── Input.tsx
│ │ ├── Textarea.tsx
│ │ ├── Card.tsx
│ │ └── Loading.tsx
│ └── Header.tsx # App header
├── lib/
│ └── supabase/
│ ├── client.ts # Client-side Supabase
│ ├── server.ts # Server-side Supabase
│ └── middleware.ts # Auth middleware
├── types/
│ └── database.types.ts # TypeScript types
├── supabase/
│ └── schema.sql # Database schema
└── middleware.ts # Next.js middleware
- Magic link authentication via Supabase
- Automatic session refresh with middleware
- Protected routes for authenticated users
- Real-time messaging with Claude AI
- Conversation history persistence
- Automatic scrolling to latest message
- Typing indicators
- Error handling and retry logic
- Mobile-first responsive design
- Consistent spacing (8px grid system)
- Typography: Baskerville (body) + Raleway (headers)
- Color palette: Neutral grays + Teal accent
- Accessible UI with proper contrast ratios
- Push your code to GitHub
- Connect your repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy
Make sure to configure your Supabase redirect URLs:
- Development:
http://localhost:3000/auth/callback - Production:
https://your-domain.vercel.app/auth/callback
This project follows a professional design system with:
- Clean, minimal aesthetics
- Consistent 8px grid spacing
- High-contrast, readable typography
- Subtle shadows and depth
- Mobile-first responsive layouts
- Comprehensive loading and error states
See DESIGN_SPEC.md for complete design guidelines.
| Variable | Description | Required |
|---|---|---|
NEXT_PUBLIC_SUPABASE_URL |
Your Supabase project URL | Yes |
NEXT_PUBLIC_SUPABASE_ANON_KEY |
Your Supabase anonymous key | Yes |
ANTHROPIC_API_KEY |
Your Anthropic API key | Yes |
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLint
This is an MVP built to specification. Future enhancements could include:
- Session templates
- Export conversation history
- Analytics dashboard
- Email notifications
- Advanced search
- Session sharing
- Admin panel
MIT
For issues or questions, please open an issue on GitHub.