An AI-powered search engine and conversational answer platform inspired by Perplexity. Built with Bun, LangGraph, Tavily Web Search, Prisma, Supabase Auth, and React.
graphplex.demo.mp4
Graphplex is a full-stack AI answer engine designed to provide accurate, grounded responses to user queries using real-time search and multi-step AI workflows.
- 🌐 Real-Time Web Search: Uses Tavily Search API to fetch live web data, news, and citations.
- 📄 Context Engineering & Summarization: Extracts and condenses relevant web content before invoking the language model.
- 🧠 Autonomous LangGraph Workflow:
- Answer Generation: Generates structured answers backed by citations.
- Quality Reviewer & Reflection: Evaluates answer completeness and triggers dynamic re-generation if quality thresholds aren't met.
- Follow-Up Generator: Automatically generates relevant follow-up questions in parallel.
- 💬 Threaded Context: Contextualizes follow-up questions using past conversation history.
- 🔐 Auth & Storage: Secure user authentication powered by Supabase and persistent conversation threads backed by PostgreSQL & Prisma ORM.
- Runtime & Manager: Bun
- Backend: Express.js, TypeScript, LangChain / LangGraph, Tavily Search API, Prisma ORM, Supabase
- Frontend: React 19, React Router v8, Tailwind CSS v4, Radix UI, Lucide Icons
- Database: PostgreSQL (via Supabase / Prisma)
Perplexity/
├── backend/ # Express API, LangGraph agent workflow, Prisma schema
│ ├── prisma/ # Database schema & migrations
│ ├── src/ # Controllers, graph nodes, & routes
│ └── .env.example # Backend environment variables reference
├── frontend/ # React single-page application
│ ├── src/ # UI components, pages, & API integration
│ └── .env.example # Frontend environment variables reference
└── README.md
- Install Bun (
curl -fsSL https://bun.sh/install | bashorpowershell -c "irm bun.sh/install.ps1") - A Supabase project (for Auth & PostgreSQL)
- A Tavily Search API key
Copy .env.example files to .env in both folders and fill in your credentials.
Backend (backend/.env):
TAVIL_API_KEY=your_tavily_api_key
GROQ_API_KEY=your_groq_api_key
DATABASE_URL="postgresql://user:password@host:6543/postgres?pgbouncer=true"
DIRECT_URL="postgresql://user:password@host:5432/postgres"
SUPABASE_API_SECRET=your_supabase_secret_keyFrontend (frontend/.env):
BUN_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
BUN_PUBLIC_PUBLISHABLE_KEY=your_supabase_publishable_keycd backend
bun install
bunx prisma db push
bun devBackend runs at http://localhost:3001
cd frontend
bun install
bun devFrontend runs at http://localhost:3000 (or specified Bun port)
| Workspace | Command | Action |
|---|---|---|
| Backend | bun dev |
Start Express server with Bun |
| Backend | bunx prisma studio |
Open Prisma database GUI |
| Frontend | bun dev |
Start React dev server with Hot Reload |
| Frontend | bun run build |
Build frontend production bundle |