{"id":51087261,"url":"https://github.com/usman-rizwan/docsy-ai","last_synced_at":"2026-06-23T22:33:45.986Z","repository":{"id":315799397,"uuid":"1059662822","full_name":"usman-rizwan/docsy-ai","owner":"usman-rizwan","description":"Docsy AI transforms your static PDF documents into interactive, intelligent assistants. Simply upload a PDF and start chatting — ask natural questions, get instant summaries, and extract key insights from complex content with ease using an AI-powered interface.","archived":false,"fork":false,"pushed_at":"2026-02-05T19:07:45.000Z","size":299,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-06T04:56:47.876Z","etag":null,"topics":["ai","chatwithdocs","clerk","convex","gemini","langchain","nextjs","pdf-parser","react-hook-form","shadcn-ui","sonner","sql","uploadthing","zod"],"latest_commit_sha":null,"homepage":"https://docsy-ai.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/usman-rizwan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-18T18:55:02.000Z","updated_at":"2026-02-05T19:07:50.000Z","dependencies_parsed_at":"2025-09-20T20:44:21.528Z","dependency_job_id":"841fcf27-ef85-450f-96c7-ad787806cd7e","html_url":"https://github.com/usman-rizwan/docsy-ai","commit_stats":null,"previous_names":["usman-rizwan/docsy-ai"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/usman-rizwan/docsy-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usman-rizwan%2Fdocsy-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usman-rizwan%2Fdocsy-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usman-rizwan%2Fdocsy-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usman-rizwan%2Fdocsy-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usman-rizwan","download_url":"https://codeload.github.com/usman-rizwan/docsy-ai/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usman-rizwan%2Fdocsy-ai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34709804,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","chatwithdocs","clerk","convex","gemini","langchain","nextjs","pdf-parser","react-hook-form","shadcn-ui","sonner","sql","uploadthing","zod"],"created_at":"2026-06-23T22:33:45.460Z","updated_at":"2026-06-23T22:33:45.976Z","avatar_url":"https://github.com/usman-rizwan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docsy AI\n\n\nDocsy AI transforms your static PDF documents into interactive conversational partners. Upload your PDFs and ask questions, get summaries, and find information instantly using a powerful AI-driven chat interface. This project is built with Next.js, Convex, Clerk, UploadThing, and LangChain.\n\n## Key Features\n\n*   **Interactive Chat Interface**: Ask questions in natural language and get answers directly from your PDF content.\n*   **Secure Document Uploads**: Upload PDF files safely using UploadThing.\n*   **AI-Powered Document Analysis**: Leverages LangChain and Google Gemini to understand document context and provide accurate responses.\n*   **User Authentication**: Secure user management and authentication powered by Clerk.\n*   **Real-time Backend**: Built on Convex for a seamless, real-time database and backend experience.\n*   **Modern UI**: A clean and responsive user interface built with Next.js, Tailwind CSS, and shadcn/ui.\n\n## Tech Stack\n\n*   **Framework**: Next.js (App Router)\n*   **Backend \u0026 Database**: [Convex](https://convex.dev/)\n*   **Authentication**: [Clerk](https://clerk.com/)\n*   **File Uploads**: [UploadThing](https://uploadthing.com/)\n*   **AI \u0026 LLM**: [LangChain](https://www.langchain.com/) with [Google Gemini](https://ai.google.dev/)\n*   **Styling**: Tailwind CSS \u0026 [shadcn/ui](https://ui.shadcn.com/)\n*   **Language**: TypeScript\n\n## How It Works\n\n1.  **Authentication**: Users sign up or sign in using Clerk. A corresponding user record is created in the Convex database.\n2.  **Document Upload**: The user uploads a PDF file through the UploadThing widget.\n3.  **Processing**: Upon a successful upload, the file URL is sent to a Next.js API route (`/api/process-document`).\n    *   The API fetches the PDF and uses LangChain's `WebPDFLoader` to extract text.\n    *   The text is split into manageable chunks using `RecursiveCharacterTextSplitter`.\n    *   These chunks are saved to the `documentChunks` table in the Convex database.\n    *   A new chat linked to the document is created.\n4.  **Chat Interaction**:\n    *   When the user sends a message, a request is made to the `/api/chat` route.\n    *   The API fetches the relevant document chunks from Convex to build a context.\n    *   The user's question and the context are sent to the Google Gemini model via a LangChain prompt template.\n    *   The AI's response is returned and displayed in the chat UI, and the conversation is saved to Convex.\n\n## Getting Started\n\nFollow these instructions to get a local copy up and running.\n\n### Prerequisites\n\n*   Node.js (v18.0 or later)\n*   pnpm (or your preferred package manager)\n*   Accounts for:\n    *   [Convex](https://convex.dev/)\n    *   [Clerk](https://clerk.com/)\n    *   [UploadThing](https://uploadthing.com/)\n    *   [Google AI Studio](https://aistudio.google.com/)\n\n### Installation\n\n1.  **Clone the repository:**\n\n    ```bash\n    git clone https://github.com/usman-rizwan/docsy-ai.git\n    cd docsy-ai\n    ```\n\n2.  **Install dependencies:**\n\n    ```bash\n    pnpm install\n    ```\n\n3.  **Set up Environment Variables:**\n\n    Create a `.env.local` file in the root of the project and add the following variables. Obtain the values from your respective service dashboards.\n\n    ```env\n    # Convex\n    NEXT_PUBLIC_CONVEX_URL= \"https://\u003cyour-convex-project-name\u003e.convex.cloud\"\n\n    # Clerk\n    NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...\n    CLERK_SECRET_KEY=sk_test_...\n\n    # UploadThing\n    UPLOADTHING_SECRET=sk_live_...\n    UPLOADTHING_APP_ID=\u003cyour-app-id\u003e\n\n    # Google Gemini API Key\n    GOOGLE_API_KEY=AIza...\n    ```\n\n\n4.  **Set up Convex:**\n\n    Run the Convex development server. This will sync your schema and functions with the Convex cloud.\n\n    ```bash\n    npx convex dev\n    ```\n\n    Follow the CLI prompts to link your project to your Convex account.\n\n5.  **Run the development server:**\n\n    In a new terminal window, start the Next.js development server with Turbopack.\n\n    ```bash\n    pnpm dev\n    ```\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser to see the running application.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusman-rizwan%2Fdocsy-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusman-rizwan%2Fdocsy-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusman-rizwan%2Fdocsy-ai/lists"}