Why Self-Host ThinkEx?
Self-hosting ThinkEx gives you complete control over your visual thinking environment:- Full Data Control: Your notes, PDFs, conversations, and insights remain on your infrastructure
- Privacy First: No external data processing - everything stays local
- Customization: Modify and extend ThinkEx to fit your workflow
- No Vendor Lock-in: Run on your own hardware with your choice of AI models
- Open Source Freedom: Inspect, audit, and modify the codebase (AGPL-3.0 License)
What’s Included
ThinkEx is a complete self-hosted visual thinking environment built with:Technology Stack
- Framework: Next.js - React framework for production
- Styling: Tailwind CSS and Shadcn UI
- Database: PostgreSQL (v12+) with Drizzle ORM
- State Management: TanStack Query and Zustand
- Authentication: Better Auth with OAuth support
Core Features
Spatial Canvas
Arrange notes, PDFs, videos, and AI chats side-by-side on an infinite canvas
User-Controlled Context
Manually select exact cards, notes, or document sections for AI analysis
First-Class Media
Native PDF viewing with highlights and YouTube videos with transcript context
Multi-Model AI
Switch between AI models per task without provider lock-in
Deployment Options
Local Development
- PostgreSQL: Run in Docker container (recommended) or use local installation
- Next.js App: Runs locally with hot reload for development
- Storage: Local filesystem (
./uploads/) or Supabase cloud storage - Perfect for: Development, testing, and single-user setups
Production Self-Hosting
- Database: PostgreSQL with persistent volumes
- Application: Next.js app in production mode
- Storage: Local storage or Supabase for distributed deployments
- Scaling: Supports horizontal scaling for multiple users
The setup script (
setup.sh) is optimized for local development using Docker for PostgreSQL and running the Next.js app locally for hot reload.Prerequisites
Before installing ThinkEx, ensure you have:Required Software
- Node.js v20 or higher
- pnpm (installed automatically if missing)
- Docker (recommended for PostgreSQL) OR PostgreSQL v12+ installed locally
Required API Keys
Google AI API Key
Google AI API Key
Required for AI model access. Get your free API key from Google AI Studio.Environment variable:
GOOGLE_GENERATIVE_AI_API_KEYAssistant UI Credentials
Assistant UI Credentials
Required for the assistant interface. Get credentials from Assistant Cloud.Environment variables:
NEXT_PUBLIC_ASSISTANT_BASE_URLASSISTANT_API_KEY
Optional API Keys
Google OAuth
Google OAuth
Optional for OAuth login support. Get credentials from Google Cloud Console.Environment variables:
GOOGLE_CLIENT_IDGOOGLE_CLIENT_SECRET
Supabase Storage
Supabase Storage
Optional cloud storage alternative to local filesystem. Get credentials from Supabase.Environment variables:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_PUBLISHABLE_OR_ANON_KEYSUPABASE_SERVICE_ROLE_KEY
Next Steps
Installation
Follow the step-by-step installation guide
Configuration
Configure environment variables and settings
Storage Setup
Choose between local and Supabase storage