devhmac / sift-ai

A full stack, LLM powered document interpreter allowing you to chat with any uploaded PDF. Full CRUD functoinality, create an account, upload your PDF's, and safe your chats.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

.Sift-AI

A Full-Stack AI Powered Document Interpreter

Allowing Artificial inteligence to extract information and insights from uploaded PDF documents in real-time, based on your questions and converstaion.


Tech Stack

FrontEnd

  • Typescript
  • NextJS
  • Tailwindcss
  • Shadcn

Backend

  • Planetscale PostGres Database
  • Pinecone DB Vector Database
  • Prisma ORM
  • Tanstack & tRPC
  • LangChain - parsing and enabling the vectorization of your document for LLM Context

APIs and Helpers

  • Kinde Authentication
  • OpenAI: GPT-3 LLM
  • Uploadthing - AWS S3 document upload abstraction layer

Landing Page


sift-ai-landing

Streamed AI responses


Streamed AI Response


Upload PDF's Manage, view and delete files
Dashboard upload
PDF reader functionality Infinite message rendering
PDF Infinite Scroll

Techniques and Notables

NextJS Server Components

Experimenting with NextJS server components and routes.

Optimistic Chat Updates

Update state immediately upon a message being sent for maxium responsiveness and user experience. If there is an error in the message endpoint, or a failure loging to the db, rollback the state, saving the initial message condition so the user can immediately try again.

Streamed AI Responses

AI responses can be slow to complete. Instead of waiting for the full response to finish, it is streamed into the application in real time as it is being generated.

Infinite Message Rendering

Your document conversations can be lengthy. Instead of rendering every single message when a document page is openned, only the first 10 messages and queried. Using a rolling limit, as you scroll up your chat window, previous messages are automatically rendered in as needed. Seamlessly increasing performance without interruping user needs.

Authentication

Utilizing Kinde Auth for full Sign-in/sign-up account creating. Keeping your documents private and secure.

Try It out yourself

First clone the git repo locally

git clone git@github.com:devhmac/sift-ai.git

Install Dependencies

npm install

Environment Variables

  • Refer to the exampleenv for required API and Library keys

Run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser

About

A full stack, LLM powered document interpreter allowing you to chat with any uploaded PDF. Full CRUD functoinality, create an account, upload your PDF's, and safe your chats.


Languages

Language:TypeScript 97.6%Language:CSS 2.0%Language:JavaScript 0.4%