Clerk.io - AI Assistant

Dec 6, 2023


Clerk.io is an simple SaaS project that allow user to upload PDF files and use LLM and Generative AI to generate response. This application is perfect for students or any amateurs who want to learn more about LLM and AI. Simply upload your PDF file and it will automatically process and train your own LLM model, and give actuate responses based on the context provided.


Clerk.io is an open-source software built with following code stacks and technologies: TypeScript + React + Next.js + tRPC + Tailwind + Prisma, and LangChain + Pinecone + OpenAI


URL: https://clerk-io.vercel.app/

GitHub: https://github.com/siranchao/clerk.io


typescriptreactnextnodetwcssprismamysql
demodemodemo

Demo video

Tech stack

The project is primarilybuilt with TypeScript + React + Next.js + tRPC and use Tailwind CSS + Shadcn as UI framework. Also it involves many other libraries and packages including:


  • Frontend JS framework: React, Next 13.5
  • CSS & UI framework:Tailwind.css, shadcn/ui
  • API & Data fetching:tRPC, React Query, Prisma ORM
  • Form & validation:React-hook-form, Zod
  • Authentication & User management:Clerk
  • Blob Storeage:Uploadthing
  • Database:MySQL-PlanetScale(serverless database), Pinecone
  • Payment service:Stripe

Clerk.io is heavily based on LangChain + Pinecone to combine Documents into a vector database. And using OpenAI APIs as embeddings to generate AI responses. Here the diagram shows the overall idea of how this process works:


mind-map

Features

Here are some of the features:

  • - Simple drag and drop for file upload
  • - Optimistic updates with tPRC and React Query
  • - Infinite query during chat conversation
  • - Fully mobile responsive with accessibility
  • - Completely free to use and able to upgrade to premium plan
  • - Use Stripe for payment and subscription management

Additional info

Clerk.io support OAuth authentication, it is suggest to use gmail or facebook account to proceed for sake of simplicity.


Alternatively, you can use this demo account:

Email: demo@test.com

Password: demo1234


In payment session, users will be redirect to Stripe payment page for proceeding. Currently the project is using test payment method, so you can use test card info to stimulate the process. For more information please visit Stripe.com