{"id":27726400,"url":"https://github.com/akhilsharmaa/reslm.site","last_synced_at":"2026-04-06T21:32:53.983Z","repository":{"id":289411139,"uuid":"957371533","full_name":"akhilsharmaa/reslm.site","owner":"akhilsharmaa","description":"Reslm.site Reasearch Assistant - AI-powered document chat platform: Upload PDFs to S3, extract text, generate embeddings (pgvector), stream LLM responses via SSE, with JWT auth, session saving, credit limits, and secure EC2 deployment.","archived":false,"fork":false,"pushed_at":"2025-07-01T07:10:11.000Z","size":10124,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-18T02:22:37.220Z","etag":null,"topics":["ci","docker","docker-compose","langchain","nodejs","pdf","pisma","postgres","rag","reactjs","s3-bucket","vector-database"],"latest_commit_sha":null,"homepage":"http://reslm.site","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/akhilsharmaa.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}},"created_at":"2025-03-30T07:39:34.000Z","updated_at":"2025-07-01T07:10:14.000Z","dependencies_parsed_at":"2025-07-18T01:57:51.323Z","dependency_job_id":"53219dcb-4b6d-49ba-a5f9-46d4fb4ca5ac","html_url":"https://github.com/akhilsharmaa/reslm.site","commit_stats":null,"previous_names":["akhilsharmaa/reslm.site"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/akhilsharmaa/reslm.site","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akhilsharmaa%2Freslm.site","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akhilsharmaa%2Freslm.site/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akhilsharmaa%2Freslm.site/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akhilsharmaa%2Freslm.site/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akhilsharmaa","download_url":"https://codeload.github.com/akhilsharmaa/reslm.site/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akhilsharmaa%2Freslm.site/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31491097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T17:22:55.647Z","status":"ssl_error","status_checked_at":"2026-04-06T17:22:54.741Z","response_time":112,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ci","docker","docker-compose","langchain","nodejs","pdf","pisma","postgres","rag","reactjs","s3-bucket","vector-database"],"created_at":"2025-04-27T22:57:34.285Z","updated_at":"2026-04-06T21:32:53.965Z","avatar_url":"https://github.com/akhilsharmaa.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Screenshot from 2025-07-01 12-34-33](https://github.com/user-attachments/assets/c1f7d3e1-f38d-4d01-a350-be26d2ba40d8)\n\n## Video demo [link](https://youtu.be/_u-zO0ltbqM)\n\n## Key Features \n- Ingestion \u0026 Process: Upload PDFs, store on S3, then extract text, generate embeddings for RAG system.\n- Embeddings: Docs are chunked and embedded, stored in pgvector for fast ‘similarity and retrieval’.\n- Chat+Stream: SSE for live LLM output, short-lived tokens, save chats sessions, also visualize chunks.\n- Deployment: CI pipeline builds \u0026 deploys with Docker Compose on EC2, mapped domain (reslm.site).\n- Security \u0026 Access: Features include Jwt authentication, user credit limits, and secure PDF deletion.\n\n## TODOS: \n- [x] Authentication: login/register system using JWT.\n  - [ ] All credit limits to the LLM. \n  - [ ] Add Auth2.0 (goggle)\n  - [ ] send email on signup to the user. \n- [x] **PDF Upload:** file upload functionality using multer to accept PDF files\n- [X] **Convert PDF to Image Thumbnail**: Convert uploaded PDFs into a single image as first page. \n- [x] **Upload to S3 Bucket**: Store the image in S3 and get a viewable public URL.\n  - [x] save file data (metadata) in the database simultaneously.\n  - [ ] delete the image + pdf for local storage. \n- [x] **Generate Embedding on Upload**: Use OpenAI embeddings for each uploaded document.\n- [x] **Storing Embeddings in PostgreSQL**: Save embeddings using `pgvector` for fast similarity search.\n- [x] **SSE with Live LLM Output**: Stream LLM responses in real-time using Server-Sent Events,\n  - [x] create Short live token, for SSE request (as they don't support bearear token)\n  - [x] save chats in the database simultaneously.\n- [x] Create embedding for user prompt\n- [x] Fetch nearest chunks from stored embeddings\n- [x] Combine prompt + chunks\n- [x] Send to LLM for grounded response\n- [ ] User credit score: fuctionality to limit the chat per user.\n- [ ] **Delete PDF**: allowing users to delete the PDF.\n  - [ ] delete the embedding+chunks of the upload.\n  - [ ] delete the image thumbnail from s3 bucket.\n  - [ ] delete complete metadata of upload.\n### Important: \n- [ ] **Deployment:**\n  - [x] Setup Docker for production: \n  - [x] CI pipeline \n  - [x] migrate local to cloud Postgre database\n  - [x] migrate cloud postgre to docker based postgres (using docker-compose). \n---\n\n**Server Setup**\n1. Create EC2 instance atleat ()\n[https://docs.docker.com/engine/install/ubuntu/](docker docs)\n```\n# Add Docker's official GPG key:\nsudo apt-get update\nsudo apt-get install ca-certificates curl\nsudo install -m 0755 -d /etc/apt/keyrings\nsudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc\nsudo chmod a+r /etc/apt/keyrings/docker.asc\n\n# Add the repository to Apt sources:\necho \\\n  \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \\\n  $(. /etc/os-release \u0026\u0026 echo \"${UBUNTU_CODENAME:-$VERSION_CODENAME}\") stable\" | \\\n  sudo tee /etc/apt/sources.list.d/docker.list \u003e /dev/null\nsudo apt-get update\n\nsudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin\n\nsudo apt install docker-compose\n```\n\n2. Now assign the elastic-ip to the EC2 you have created. \n3. Edit Inbound rule to allow 8000 from everywhere.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakhilsharmaa%2Freslm.site","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakhilsharmaa%2Freslm.site","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakhilsharmaa%2Freslm.site/lists"}