Skip to content

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Delve AI 🔍

image

Next.js Express.js TypeScript Prisma Supabase Tailwind CSS

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.


🚀 Live Demo

(https://delve-ai-web.vercel.app/)

🔄 Application Workflow

  1. User Input: The user submits a query via the Next.js glassmorphic UI.
  2. API Trigger: The frontend initiates a connection to the Express backend (hosted on Render).
  3. Database Validation: The backend uses Prisma and Supabase's connection pooler (Port 6543) to fetch conversation history and validate the session.
  4. LLM Processing: The backend forwards the contextualized prompt to the AI model.
  5. Real-Time Streaming: As the LLM generates tokens, the Express backend pipes them directly to the client as a readable stream.
  6. Dynamic Parsing: The frontend's useDelveStream hook captures the stream, strips backend-specific XML tags (like <ANSWER> or <FOLLOWUPS>), and buffers the raw text.
  7. Progressive Rendering: react-markdown instantly renders the buffered text to the screen, providing a smooth typewriter effect without UI flickering.

✨ Key Features

  • 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.

🛠️ Tech Stack

Frontend (Client)

  • Next.js (App Router)
  • TypeScript
  • Tailwind CSS & Framer Motion
  • react-markdown & remark-gfm for 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)

💻 Local Setup & Development

Prerequisites

Make sure you have Bun and Node.js installed.

1. Clone the repository

  git clone [https://github.com/Deepanshu1230/Delve_AI.git]
cd delve-ai
cd apps/web
bun run dev  ("This is for running Frontend")

About

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages