Synaptic is a full-stack idea exploration app. A user enters one seed idea, gets a graph of AI-generated directions, clicks into any node to inspect a structured dossier, runs cross-checks against external sources, and exports the session as a one-pager.
- Start with one seed idea
- Generate up to 5 top-level teaser idea nodes
- Expand a node into up to 5 child ideas
- Render idea nodes as a clean circular graph
- Open a modal on node click and hydrate the full idea dossier on demand
- Run cross-check on demand from the node modal
- Export a one-pager PDF
- Sign in with email/password or Google
- Verify email and reset passwords with Supabase Auth
- Persist sessions, ideas, and edges in Supabase
- Run Exa, patent, GitHub, and optional Elasticsearch cross-checks with Jina reranking
- Next.js 16
- React 19
- TypeScript
- Tailwind CSS 4
- React Flow
- D3
- OpenAI Responses API for structured generation
- Exa for web and paper search
- Serper patents for patent lookup
- GitHub search for repository discovery
- Elasticsearch for indexed internal or domain-specific corpora
- Jina reranker for prior-art ordering
- Supabase for canonical persistence
The runtime split is:
-
OpenAI
- idea generation
- node expansion
- critique / tension analysis
- one-pager generation
-
External search
- Exa web and paper search
- Serper patent search
- GitHub repository search
- Optional Elasticsearch index search
- Jina reranking for final match ordering
-
Supabase
- Auth for login, Google OAuth, email verification, and recovery
- source of truth for sessions
- normalized storage for ideas and edges
- per-user session ownership and privacy
Diagram assets:
Create a .env.local file from .env.example.
Required variables:
OPENAI_API_KEY=
OPENAI_MODEL=gpt-5-mini
OPENAI_EMBEDDING_MODEL=text-embedding-3-small
EXA_API_KEY=
SERPER_API_KEY=
JINA_API_KEY=
SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=Optional Elasticsearch variables:
ELASTICSEARCH_URL=
ELASTICSEARCH_INDEX=
ELASTICSEARCH_API_KEY=
ELASTICSEARCH_USERNAME=
ELASTICSEARCH_PASSWORD=Recommended:
- Use
gpt-5-minifor generation NEXT_PUBLIC_SUPABASE_URLshould usually matchSUPABASE_URL- Do not use
SUPABASE_SERVICE_ROLE_KEYin client-side code - Configure either
ELASTICSEARCH_API_KEYorELASTICSEARCH_USERNAMEplusELASTICSEARCH_PASSWORDif you want Elastic included in cross-checks - The Elasticsearch index should expose a canonical URL field and at least one text field such as
title,snippet,description,content,body, ortext
- Install dependencies
- Create
.env.local - Run 0000_synaptic_full_setup.sql
- Configure Supabase Auth URLs and Google provider settings from auth.md
- Start the app
npm install
npm run devnpm install will pull in the graph renderer dependencies, including d3, three, and TypeScript dev types used by both renderers.
If you are adding them manually for any reason:
npm install d3
npm install -D @types/d3
npm install three
npm install -D @types/threeThe graph view supports both a 2D D3 mode and an interactive 3D Three.js mode with camera reset and zoom-aware labels/descriptions.
Open http://localhost:3000.
npm run lint
npm run build- Existing saved sessions keep the content they were generated with. Improvements to generation affect new sessions and new expansions.
- Cross-check is on-demand from the node modal, not automatic on initial graph generation.
- If OpenAI returns brittle or low-quality structured output, switch to a stronger generation model before debugging the parser.
- Sessions are now private to the authenticated Supabase user. Older rows without
user_idwill not appear in the app.
- app/page.tsx: landing page and session launcher
- app/session/[id]/page.tsx: shareable session route
- components/graph-workbench.tsx: main graph UI and node modal
- components/thought-node.tsx: circular node renderer
- lib/agent/engine.ts: session orchestration
- lib/agent/search.ts: cross-check search pipeline
- lib/integrations/openai.ts: OpenAI generation helpers
- lib/integrations/supabase.ts: Supabase admin client
- lib/integrations/supabase-browser.ts: browser auth client
- lib/integrations/supabase-server.ts: server auth client
- proxy.ts: auth session refresh
- lib/storage/sessions.ts: Supabase persistence layer
- lib/graph/schema.ts: graph/session schema
- lib/graph/layout.ts: graph layout