Delve AI 🔍
Delve AI is a premium, Perplexity-inspired AI research application designed for "a quieter search." It features a custom streaming architecture that delivers chunk-by-chunk LLM responses, seamlessly parsing structured AI metadata into a highly interactive, glassmorphic UI.
(https://delve-ai-web.vercel.app/)
- User Input: The user submits a query via the Next.js glassmorphic UI.
- API Trigger: The frontend initiates a connection to the Express backend (hosted on Render).
- Database Validation: The backend uses Prisma and Supabase's connection pooler (Port 6543) to fetch conversation history and validate the session.
- LLM Processing: The backend forwards the contextualized prompt to the AI model.
- Real-Time Streaming: As the LLM generates tokens, the Express backend pipes them directly to the client as a readable stream.
- Dynamic Parsing: The frontend's
useDelveStreamhook captures the stream, strips backend-specific XML tags (like<ANSWER>or<FOLLOWUPS>), and buffers the raw text. - Progressive Rendering:
react-markdowninstantly renders the buffered text to the screen, providing a smooth typewriter effect without UI flickering.
- Real-Time AI Streaming: Utilizes standard node streams and custom buffers to render AI responses word-by-word without UI flickering.
- Dynamic Metadata Parsing: Custom regex parsers strip out
<ANSWER>,<SOURCES>, and<FOLLOWUPS>tags on the fly, rendering follow-up questions as interactive UI components at the end of the stream. - Premium UI/UX: Built with Tailwind CSS and Framer Motion for smooth layout transitions, featuring responsive light/dark modes, markdown rendering, and typing indicators.
- Robust Connection Pooling: Built on a Supabase-hosted PostgreSQL instance using port 6543, optimized for serverless environments with
@prisma/adapter-pg.
Frontend (Client)
- Next.js (App Router)
- TypeScript
- Tailwind CSS & Framer Motion
react-markdown&remark-gfmfor rich text formatting
Backend (Server)
- Express.js & Node.js
- Prisma ORM (
@prisma/client&@prisma/adapter-pg) - Supabase (PostgreSQL Database & JWT Auth validation)
- Bun (Runtime environment)
Make sure you have Bun and Node.js installed.
git clone [https://github.com/Deepanshu1230/Delve_AI.git]
cd delve-ai
cd apps/web
bun run dev ("This is for running Frontend")