{"id":31364241,"url":"https://github.com/ashram15/synopspy","last_synced_at":"2026-05-05T04:09:44.280Z","repository":{"id":316833742,"uuid":"1022877112","full_name":"ashram15/synopspy","owner":"ashram15","description":"SynopSpy is a full stack web application that help users understand and assess complex documents. ","archived":false,"fork":false,"pushed_at":"2026-04-09T18:00:54.000Z","size":10307,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-09T20:05:43.457Z","etag":null,"topics":["auth0-jwt","auth0-react","cross-origin-resource-sharing","docker","full-stack-development","gemeni-api","legal-risk-analysis","mongodb","mongodb-database","natural-language-processing","nosql-database","react","restful-api","vitejs-react"],"latest_commit_sha":null,"homepage":"https://synopspy.onrender.com","language":"JavaScript","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/ashram15.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-07-20T03:22:25.000Z","updated_at":"2026-03-19T04:46:38.000Z","dependencies_parsed_at":"2025-09-27T02:37:33.127Z","dependency_job_id":"9043392a-ac0e-4971-bf68-c168f06d67db","html_url":"https://github.com/ashram15/synopspy","commit_stats":null,"previous_names":["ashram15/synopspy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ashram15/synopspy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashram15%2Fsynopspy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashram15%2Fsynopspy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashram15%2Fsynopspy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashram15%2Fsynopspy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ashram15","download_url":"https://codeload.github.com/ashram15/synopspy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashram15%2Fsynopspy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32634774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"online","status_checked_at":"2026-05-05T02:00:06.033Z","response_time":54,"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":["auth0-jwt","auth0-react","cross-origin-resource-sharing","docker","full-stack-development","gemeni-api","legal-risk-analysis","mongodb","mongodb-database","natural-language-processing","nosql-database","react","restful-api","vitejs-react"],"created_at":"2025-09-27T06:27:51.653Z","updated_at":"2026-05-05T04:09:44.274Z","avatar_url":"https://github.com/ashram15.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SynopSpy \n### AI-Powered Document Analyzer \u0026 Risk Assessor\n\n![Python](https://img.shields.io/badge/Python-3.10+-blue?style=for-the-badge\u0026logo=python\u0026logoColor=white)\n![FastAPI](https://img.shields.io/badge/FastAPI-005571?style=for-the-badge\u0026logo=fastapi)\n![React](https://img.shields.io/badge/React-20232A?style=for-the-badge\u0026logo=react\u0026logoColor=61DAFB)\n![Vite](https://img.shields.io/badge/Vite-646CFF?style=for-the-badge\u0026logo=vite\u0026logoColor=white)\n![Google Gemini](https://img.shields.io/badge/Google%20Gemini-8E75B2?style=for-the-badge\u0026logo=googlegemini\u0026logoColor=white)\n![Auth0](https://img.shields.io/badge/Auth0-EB5424?style=for-the-badge\u0026logo=auth0\u0026logoColor=white)\n![MongoDB](https://img.shields.io/badge/MongoDB-47A248?style=for-the-badge\u0026logo=mongodb\u0026logoColor=white)\n![Render](https://img.shields.io/badge/Render-46E3B7?style=for-the-badge\u0026logo=render\u0026logoColor=white)\n![Tests](https://img.shields.io/badge/tests-passing-brightgreen?style=for-the-badge\u0026logo=pytest\u0026logoColor=white)\n![Docker](https://img.shields.io/badge/Docker-2496ED?style=for-the-badge\u0026logo=docker\u0026logoColor=white)\n\n### [Click Here to Launch Live App]: https://synopspy.onrender.com\n*(Note: App is deployed on Render Free Tier. Please allow ~60-120 seconds for the server to spin up on first load.)*\n\n![synopspy_demo.gif](frontend/src/assets/synopspy2.0.gif)\n\nSynopSpy is a full stack web application that help users understand and assess complex\ndocuments. Some examples of documents SynopSpy helps analyze are legal fine print, court documents, or terms and conditions. SynopSpy uses NLP(Natural Language Processing) to summarize and analyze these documents, flag risky language, and assign a document safety rating.\n\n## System Architecture  \n```mermaid\ngraph TD\n    subgraph Client [\"Frontend (Client Side)\"]\n        User[User] --\u003e|Uploads Document| UI[React + Vite App]\n        UI --\u003e|JWT Auth Token| Auth0[Auth0 Service]\n    end\n\n    subgraph Server [\"Backend (Server Side)\"]\n        UI --\u003e|HTTPS POST /upload| API[FastAPI Entry Point]\n        \n        subgraph Core [\"Core Logic\"]\n            API --\u003e|Validate Token| Sec[Security Service]\n            API --\u003e|Route Request| Router[Upload Router]\n        end\n\n        subgraph Services [\"Service Layer\"]\n            Router --\u003e|Stream Data| FileSvc[File Parsing Service]\n            FileSvc --\u003e|Extracted Text| AISvc[Gemini AI Service]\n            AISvc --\u003e|JSON Schema| LLM[Google Gemini API]\n        end\n        \n        Router --\u003e|Save Metadata| DB[(MongoDB)]\n    end\n```\n## Key Features\n- \u003cstrong\u003eAI-Powered Summarization and Risk Analysis:\u003c/strong\u003e Leverages \u003cstrong\u003eGoogle's Gemini API \u003c/strong\u003e to perform complex NLP tasks, including large document summarization and content risk analysis. Detects complex legal language and highlights sections in the document that require increased oversight. \n- \u003cstrong\u003eDynamic Safety Rating:\u003c/strong\u003e processes AI output and generates a 1-5 safety score, providing users with a quick understanding of document risk.\n- \u003cstrong\u003eUser Authentication\u003c/strong\u003e: Integrates a secure login using \u003cstrong\u003eAuth0\u003c/strong\u003e to ensure that document uploads are tied to individual users. \n- \u003cstrong\u003eUpload History:\u003c/strong\u003e Stores and retrieves a user's previous document analysis using \u003cstrong\u003eMongoDB\u003c/strong\u003e, allowing for easy comparison and review. \n- \u003cstrong\u003eAnalysis Download Function\u003c/strong\u003eAuthenticated users can download their document analysis.\n\n## Process \n- Developed a RESTful API with FastAPI, connected to a React frontend via JavaScript. \n- User authentication handled via Auth0\n- Uploaded documents are processed using PyMuPDF and python-docx, analyzed with Google Gemini API. \n- MongoDB stores user-specific upload history\n\n## Technologies \n* \u003cstrong\u003eBackend:\u003c/strong\u003e FastAPI, Python\n* \u003cstrong\u003eFrontend:\u003c/strong\u003e React, Javascript \n* \u003cstrong\u003eDatabase:\u003c/strong\u003e MongoDB | NoSQL storage for user upload history and analysis\n* \u003cstrong\u003eSecurity:\u003c/strong\u003e Auth0 | Secure user session management\n* \u003cstrong\u003eDeployment:\u003c/strong\u003e Render (PaaS) | Automated build and deployment pipeline \n* \u003cstrong\u003eAPI-Communication: \u003c/strong\u003eCustom built RESTful API handles all data exchanges between frontend and backend. CORS is used to allow cross-origin requests. \n* \u003cstrong\u003eFile Processing:\u003c/strong\u003e PyMuPDF, python-docx Libraries\n* \u003cstrong\u003eAI-Model:\u003c/strong\u003e Google Gemini \n* \u003cstrong\u003eContainer:\u003c/strong\u003e Docker, backend containerized on docker. \n\n## How to Run Locally:   \n- To run the program, run both the \u003cstrong\u003eReact\u003c/strong\u003e frontend and the \u003cstrong\u003eFastAPI\u003c/strong\u003e backend code simultaneously.   \n1. Clone the Repo\n    ```git clone [https://github.com/ashram15/synopspy.git](https://github.com/ashram15/synopspy.git)```\n2. First navigate to the project root    \n    ```cd synopspy-project```  \n3. Start the frontend    \n    ```cd frontend ```  \n    ```npm install ```  \n    ```npm run dev```  \n4. Start the backend on localhost:8000:  \n    ```cd backend\u003c/code\u003e```  \n    - Create and activate venv  \n        ```python -m venv .venv```  \n        ```source .venv/bin/activate```\n    - Install Requirements   \n        ```pip install -r requirements.txt```\n    - Run Backend:  \n        ```uvicorn app:app --reload\u003c/code\u003e```  \n5. Access the App\n    - Go to browser and access frontend through \u003ccode\u003elocalhost:5173\u003c/code\u003e\n\u003cstrong\u003eThe Frontend should now be running on \u003ccode\u003elocalhost:5173\u003c/code\u003e and the backend on \u003ccode\u003elocalhost:8000\u003c/code\u003e\u003c/strong\u003e \n\n## Testing \u0026 Quality Assurance\n\nTo ensure system reliability, the backend includes a unit testing suite built with **Pytest** and **FastAPI TestClient**.\n\n**Current Test Coverage:**\n* API Health Checks\n* Environment Configuration\n* Route Availability\n\n**How to run tests:**\n```bash\n# 1. Navigate to backend\ncd backend\n\n# 2. Run the test suite\npytest\n\n# Expected Output:\n# tests/test_app.py . [100%]\n# 1 passed in 0.xx seconds\n```\n\n\n## Key Design Decisions\n- Why Fast API\n    - Chosen for its asynchronous capabilities and high performance when handling multiple file uploads concurrently \n    - Minimal boilerplate code compared to Flask/Django for REST APIs \n- Why Mongo DB\n    * JSON-like format integrates seamlessly with React/JS frontend \n    * Scales well for user-specific document queries \n    * Flexible schema allows for easy iteration on stored document metadata \n- Why Gemini \n    * Free tier with generous quote limits\n    * Multi-modal capabilities (Synopspy may extend to analyzing image/pdf analysis in future) \n    * Lower latency \n\n## Future Improvements \n* **Email Notifications:** sending alerts when high-risk documents are detected \n* **Collaborative Features:** sharing document analyses with friends, lawyers, or team members \n* **Export Options:** Enable PDF/CSV export of analysis results \n* **Custom Risk Categories:** allow users to define custom risk keywords/phrases for Synopspy to flag. \n* **Mobile Responsiveness:** optimize UI for mobile devices \n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashram15%2Fsynopspy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashram15%2Fsynopspy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashram15%2Fsynopspy/lists"}