{"id":30856959,"url":"https://github.com/techycsr/ai-powered-document-insight-tool","last_synced_at":"2026-07-16T05:31:18.389Z","repository":{"id":312426958,"uuid":"1046226142","full_name":"TechyCSR/AI-Powered-Document-Insight-Tool","owner":"TechyCSR","description":"AI-powered document analysis platform specializing in resume processing. ","archived":false,"fork":false,"pushed_at":"2025-09-07T02:51:09.000Z","size":248,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-22T10:55:47.610Z","etag":null,"topics":["document-analysis","gemmini","resume-analysis","typescript-application"],"latest_commit_sha":null,"homepage":"https://summary.techycsr.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TechyCSR.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-08-28T11:26:52.000Z","updated_at":"2025-09-07T02:51:12.000Z","dependencies_parsed_at":"2025-08-30T15:26:29.199Z","dependency_job_id":"a606c508-524e-4a53-8317-bc9b023e99f3","html_url":"https://github.com/TechyCSR/AI-Powered-Document-Insight-Tool","commit_stats":null,"previous_names":["techycsr/ai-powered-document-insight-tool"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TechyCSR/AI-Powered-Document-Insight-Tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechyCSR%2FAI-Powered-Document-Insight-Tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechyCSR%2FAI-Powered-Document-Insight-Tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechyCSR%2FAI-Powered-Document-Insight-Tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechyCSR%2FAI-Powered-Document-Insight-Tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TechyCSR","download_url":"https://codeload.github.com/TechyCSR/AI-Powered-Document-Insight-Tool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechyCSR%2FAI-Powered-Document-Insight-Tool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35532634,"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-07-16T02:00:06.687Z","response_time":83,"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":["document-analysis","gemmini","resume-analysis","typescript-application"],"created_at":"2025-09-07T12:44:32.476Z","updated_at":"2026-07-16T05:31:18.372Z","avatar_url":"https://github.com/TechyCSR.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI-Powered Document Insight Tool\n\n\u003e **Professional-grade resume analysis platform powered by advanced AI models with intelligent document type detection and comprehensive insight generation.**\n\n[![Live Demo](https://img.shields.io/badge/🌐_Live_Demo-summary.techycsr.me-blue?style=for-the-badge)](https://summary.techycsr.dev)\n[![API Status](https://img.shields.io/badge/🔗_API-summaryapi.techycsr.me-green?style=for-the-badge)](https://summaryapi.techycsr.dev/api/v1/health)\n\n## 🎯 **Project Overview**\n\nAn enterprise-grade document analysis platform specializing in resume processing with AI-powered insights. The system automatically detects document types and provides structured analysis optimized for professional recruitment and career development workflows.\n\n### **🔑 Key Specializations**\n- **Resume Analysis**: Specialized parsing for professional documents with structured output\n- **Document Type Detection**: Intelligent classification of uploaded documents\n- **Multi-AI Integration**: Dual AI provider setup with intelligent fallback mechanisms\n- **Real-time Processing**: Asynchronous document processing with live progress tracking\n\n---\n\n## 🏗️ **System Architecture**\n\n```mermaid\ngraph TB\n    subgraph \"Frontend Layer (Vercel)\"\n        A[React 18 + TypeScript]\n        A1[TailwindCSS Styling]\n        A2[Clerk Authentication]\n        A3[Mobile Detection]\n        A4[404 Error Handling]\n    end\n    \n    subgraph \"API Gateway (Vercel Serverless)\"\n        B[FastAPI Backend]\n        B1[JWT Validation]\n        B2[File Upload Handler]\n        B3[Error Management]\n        B4[Health Monitoring]\n    end\n    \n    subgraph \"Document Processing Engine\"\n        C[PDFPlumber Extractor]\n        C1[Document Type Detector]\n        C2[Content Sanitization]\n        C3[Text Preprocessing]\n    end\n    \n    subgraph \"AI Analysis Layer\"\n        D[Sarvam AI Primary]\n        E[Gemini AI Secondary]\n        F[Intelligent Fallback]\n        G[Response Structuring]\n    end\n    \n    subgraph \"Data Layer\"\n        H[MongoDB Atlas]\n        H1[User Document Store]\n        H2[Binary PDF Storage]\n        H3[Analysis History]\n    end\n    \n    subgraph \"Authentication \u0026 Security\"\n        I[Clerk Identity Provider]\n        I1[JWT Token Management]\n        I2[User Session Handling]\n    end\n    \n    A --\u003e|HTTPS API Calls| B\n    B --\u003e|Document Upload| C\n    C --\u003e|Extracted Text| D\n    D --\u003e|Fallback on Error| E\n    E --\u003e|Final Fallback| F\n    D --\u003e|Success Response| G\n    E --\u003e|Success Response| G\n    F --\u003e|Keyword Analysis| G\n    G --\u003e|Structured Data| H\n    B --\u003e|Auth Validation| I\n    H --\u003e|User Data| B\n    B --\u003e|JSON Response| A\n```\n\n---\n\n## 🛠️ **Technology Stack**\n\n### **Backend Infrastructure**\n| Component | Technology | Version | Purpose |\n|-----------|------------|---------|---------|\n| **Framework** | FastAPI | 0.104.1 | High-performance async API |\n| **Language** | Python | 3.12+ | Core backend logic |\n| **Database** | MongoDB Atlas | 7.0 | Document storage \u0026 history |\n| **PDF Processing** | PDFPlumber | 0.9.0 | Text extraction from PDFs |\n| **HTTP Client** | httpx | 0.24.0 | Async AI API communications |\n| **Authentication** | PyJWT | 2.8.0 | JWT token validation |\n| **Deployment** | Vercel Serverless | - | Auto-scaling serverless functions |\n\n### **Frontend Architecture**\n| Component | Technology | Version | Purpose |\n|-----------|------------|---------|---------|\n| **Framework** | React | 18.2.0 | Component-based UI framework |\n| **Language** | TypeScript | 5.0.2 | Type-safe development |\n| **Build Tool** | Vite | 5.0+ | Fast development \u0026 bundling |\n| **Styling** | TailwindCSS | 3.3.0 | Utility-first CSS framework |\n| **Authentication** | Clerk React | 4.29.0 | User authentication SDK |\n| **HTTP Client** | Axios | 1.6.0 | API communication |\n| **Icons** | Lucide React | 0.263.0 | Consistent iconography |\n| **Routing** | React Router | 6.8.0 | Client-side navigation |\n\n\n\n---\n\n---\n\n## 🚀 **Local Development Setup**\n\n### **Prerequisites**\n- **Node.js** 18+ and npm\n- **Python** 3.9+\n- **Git** for version control\n- **MongoDB Atlas** account (free tier available)\n- **Clerk** account for authentication\n- **AI API Keys** (optional - fallback available)\n\n### **1. Clone Repository**\n```bash\ngit clone https://github.com/TechyCSR/AI-Powered-Document-Insight-Tool.git\ncd AI-Powered-Document-Insight-Tool\n```\n\n### **2. Backend Setup**\n```bash\ncd backend\n\n# Create virtual environment\npython -m venv venv\n\n# Activate virtual environment\n# On Windows:\nvenv\\Scripts\\activate\n# On macOS/Linux:\nsource venv/bin/activate\n\n# Install dependencies\npip install -r requirements.txt\n\n# Setup environment variables\ncp env.example .env\n```\n\n**Edit `backend/.env` with your configuration:**\n```env\n# MongoDB Configuration\nMONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/document_insights?retryWrites=true\u0026w=majority\n\n# Clerk Configuration\nCLERK_SECRET_KEY=sk_test_your_clerk_secret_key_here\n\n# AI API Keys (Optional - fallback available)\nSARVAM_API_KEY=your_sarvam_api_key_here\nGEMINI_API_KEY=your_gemini_api_key_here\n\n# Application Settings\nENVIRONMENT=development\nDEBUG=True\nALLOWED_ORIGINS=http://localhost:5173,http://localhost:3000\n```\n\n### **3. Frontend Setup**\n```bash\ncd frontend\n\n# Install dependencies\nnpm install\n\n# Setup environment variables\ncp env.example .env.local\n```\n\n**Edit `frontend/.env.local` with your configuration:**\n```env\nVITE_CLERK_PUBLISHABLE_KEY=pk_test_your_clerk_publishable_key_here\nVITE_API_URL=http://localhost:8000\n```\n\n### **4. Start Development Servers**\n\n**Terminal 1 - Backend API:**\n```bash\ncd backend\n# Ensure virtual environment is activated\nuvicorn app.main:app --reload --host 0.0.0.0 --port 8000\n```\n\n**Terminal 2 - Frontend Application:**\n```bash\ncd frontend\nnpm run dev\n```\n\n### **5. Access Application**\n- **Frontend**: [`http://localhost:5173`](http://localhost:5173)\n- **Backend API**: [`http://localhost:8000`](http://localhost:8000)\n- **API Documentation**: [`http://localhost:8000/docs`](http://localhost:8000/docs)\n- **Health Check**: [`http://localhost:8000/api/v1/health`](http://localhost:8000/api/v1/health)\n\n### **6. Development Workflow**\n1. **Backend Changes**: Auto-reload enabled with `--reload` flag\n2. **Frontend Changes**: Hot Module Replacement (HMR) active\n3. **Database**: MongoDB Atlas automatically syncs\n4. **Authentication**: Clerk handles dev/prod environments automatically\n\n### **📝 Quick Setup Checklist**\n- [ ] Python 3.9+ installed\n- [ ] Node.js 18+ installed\n- [ ] MongoDB Atlas account created\n- [ ] Clerk account setup with project created\n- [ ] Environment variables configured\n- [ ] Dependencies installed\n- [ ] Both servers running\n- [ ] Application accessible at localhost:5173\n\n---\n\n## 🌐 **Production Deployment**\n\n### **Production URLs**\n- **Frontend Application**: [`https://summary.techycsr.dev`](https://summary.techycsr.dev)\n- **Backend API**: [`https://summaryapi.techycsr.me`](https://summaryapi.techycsr.me)\n- **Health Endpoint**: [`https://summaryapi.techycsr.dev/api/v1/health`](https://summaryapi.techycsr.dev/api/v1/health)\n\n### **API Endpoints**\n\n#### **Core Endpoints**\n```http\nGET    /api/v1/health                     # System health check\nPOST   /api/v1/upload-resume              # Document upload \u0026 analysis\nGET    /api/v1/insights                   # User document history\nGET    /api/v1/document/{id}/preview      # PDF preview (authenticated)\n```\n\n#### **Health Check Response**\n```json\n{\n  \"status\": \"healthy\",\n  \"timestamp\": \"2025-08-30T13:27:21.331972\",\n  \"environment\": \"production\",\n  \"database\": {\n    \"connected\": true,\n    \"status\": \"connected\",\n    \"error\": null,\n    \"insights_count\": 42\n  }\n}\n```\n\n#### **Upload Resume Request**\n```http\nPOST /api/v1/upload-resume\nContent-Type: multipart/form-data\nAuthorization: Bearer {jwt_token}\n\nfile: {pdf_file}\nprovider: \"sarvam\" | \"gemini\"\n```\n\n#### **Upload Response (Resume)**\n```json\n{\n  \"summary\": \"**👤 Name:** John Doe\\n**📧 Contact:** john.doe@email.com, +1-555-0123\\n**💼 Professional Summary:** Experienced software engineer with 5+ years...\",\n  \"provider\": \"sarvam\",\n  \"is_fallback\": false,\n  \"filename\": \"resume.pdf\",\n  \"upload_date\": \"2025-08-30T13:27:21.331972\",\n  \"document_id\": \"66d1b2c3d4e5f6789abcdef0\"\n}\n```\n\n---\n\n## 🧠 **AI Analysis Features**\n\n### **Resume Analysis Format**\n```\n👤 Name: [Extracted full name]\n📧 Contact: [Phone, Email, Location]\n💼 Professional Summary: [Key qualifications highlights]\n🎯 Core Skills: [Technical and soft skills]\n💪 Experience Highlights:\n  • [Most relevant role with quantified achievements]\n  • [Second important position with metrics]\n  • [Third significant role with impact data]\n🎓 Education: [Degrees, institutions, GPA if available]\n🏆 Notable Achievements:\n  • [Top accomplishment with quantified results]\n  • [Second significant achievement]\n  • [Third notable accomplishment]\n📊 Career Insights:\n  • Years of Experience: [Calculated total]\n  • Industry Focus: [Primary domain]\n  • Career Level: [Entry/Mid/Senior/Executive]\n```\n\n### **General Document Analysis Format**\n```\n📄 Document Type: [Auto-detected type]\n📝 Document Summary: [Comprehensive overview]\n🔍 Key Insights: [Major findings and observations]\n📊 Main Topics: [Primary and secondary topics]\n💡 Critical Information: [Important facts and recommendations]\n🎯 Target Audience: [Intended readers]\n📈 Key Takeaways: [Actionable insights]\n```\n\n### **Document Type Detection**\nThe system automatically detects document types:\n- **Resume/CV**: Professional experience documents\n- **Research Paper**: Academic and scientific documents\n- **Proposal**: Project and business proposals\n- **Legal Document**: Contracts and agreements\n- **Report**: Analysis and findings documents\n- **General Document**: Other document types\n\n---\n\n## 🚀 **Core Functionality**\n\n### **1. Document Upload \u0026 Processing**\n- **File Validation**: PDF-only, 10MB size limit\n- **Text Extraction**: Advanced PDFPlumber integration\n- **Content Sanitization**: Clean text preprocessing\n- **Progress Tracking**: Real-time upload status\n\n### **2. AI-Powered Analysis**\n- **Document Type Detection**: Intelligent classification\n- **Dual AI Integration**: Primary (Sarvam) + Secondary (Gemini)\n- **Intelligent Fallback**: Keyword frequency analysis\n- **Structured Output**: Formatted, actionable insights\n\n### **3. User Management**\n- **Secure Authentication**: Clerk-based JWT validation\n- **Personal History**: Complete analysis tracking\n- **PDF Preview**: Authenticated document viewing\n- **Session Management**: Persistent user sessions\n\n### **4. Enterprise Features**\n- **Responsive Design**: Mobile detection with desktop optimization\n- **Error Handling**: Professional 404 pages and error management\n- **Health Monitoring**: System status tracking\n- **Performance Optimization**: Async processing and caching\n\n---\n\n## 📱 **User Experience Design**\n\n### **Responsive Behavior**\n- **Desktop Optimized**: Full-featured dashboard experience\n- **Mobile Detection**: Automatic redirection to mobile-optimized messaging\n- **Tablet Support**: Warning banners for limited mobile functionality\n- **Progressive Enhancement**: Graceful degradation across devices\n\n### **Interface Highlights**\n- **Modern Dashboard**: Clean, professional layout\n- **Drag-and-Drop Upload**: Intuitive file handling\n- **Real-time Feedback**: Progress indicators and status updates\n- **Theme Support**: Dark/light mode toggle\n- **Error Recovery**: User-friendly error messages and recovery options\n\n---\n\n## ⚡ **Performance \u0026 Scalability**\n\n### **Backend Optimization**\n- **Serverless Architecture**: Auto-scaling Vercel functions\n- **Async Processing**: Non-blocking I/O operations\n- **Connection Pooling**: Optimized MongoDB connections\n- **Error Recovery**: Graceful degradation and reconnection logic\n\n### **Frontend Optimization**\n- **Code Splitting**: Dynamic imports for reduced bundle size\n- **Lazy Loading**: On-demand component loading\n- **Caching Strategy**: Optimized API response caching\n- **Bundle Analysis**: Size optimization and tree shaking\n\n### **Database Performance**\n- **Indexed Queries**: Optimized user-based data retrieval\n- **Document Storage**: Efficient binary PDF storage\n- **Connection Management**: Serverless-optimized pooling\n\n---\n\n## 🔒 **Security Implementation**\n\n### **Authentication \u0026 Authorization**\n- **JWT Validation**: Secure token-based authentication\n- **User Isolation**: Strict data access controls\n- **Session Management**: Secure session handling\n- **API Protection**: Authenticated endpoint access\n\n### **Data Security**\n- **File Validation**: Strict PDF-only upload enforcement\n- **Size Limits**: 10MB maximum file size\n- **Content Sanitization**: Safe text processing\n- **Secure Storage**: Encrypted MongoDB Atlas storage\n\n### **Infrastructure Security**\n- **HTTPS Enforcement**: SSL/TLS encryption\n- **Environment Variables**: Secure configuration management\n- **API Rate Limiting**: Protection against abuse\n- **Error Handling**: Secure error message disclosure\n\n---\n\n## 📊 **System Status**\n\n```\n✅ Backend API: Operational (99.9% uptime)\n✅ Frontend App: Deployed \u0026 Responsive\n✅ Database: MongoDB Atlas Connected (42 documents)\n✅ AI Services: Sarvam + Gemini Operational\n✅ Authentication: Clerk Integration Active\n✅ File Processing: PDF Upload \u0026 Analysis Working\n✅ Mobile Support: Detection \u0026 Redirection Active\n✅ Error Handling: 404 Pages \u0026 Recovery Implemented\n```\n\n---\n\n## 🎯 **Project Highlights**\n\n- **Production-Ready**: Fully deployed and operational system\n- **Enterprise-Grade**: Professional UI/UX with comprehensive error handling\n- **AI-Specialized**: Optimized for resume analysis with fallback intelligence\n- **Scalable Architecture**: Serverless deployment with auto-scaling capabilities\n- **Modern Tech Stack**: Latest frameworks and best practices implementation\n- **Security-First**: Comprehensive authentication and data protection\n- **Performance-Optimized**: Fast loading times and efficient processing\n\n---\n\n*Built with modern web technologies for professional document analysis workflows. Deployed and operational at [summary.techycsr.me](https://summary.techycsr.dev)*\n      \"filename\": \"resume.pdf\",\n      \"upload_date\": \"2025-08-28T14:00:00Z\",\n      \"provider\": \"sarvam\",\n      \"summary\": \"Professional summary...\",\n      \"is_fallback\": false,\n      \"file_size\": 1234567\n    }\n  ],\n  \"total_count\": 1\n}\n```\n\n## 🚀 Deployment\n\n### Prerequisites for Deployment\n1. **Vercel Account** - For hosting both frontend and backend\n2. **MongoDB Atlas** - Cloud database\n3. **Clerk Account** - Authentication service\n4. **Domain** (optional) - For custom domain\n\n### Backend Deployment (Vercel)\n\n1. **Connect to Vercel**\n```bash\ncd backend\nnpm i -g vercel  # Install Vercel CLI\nvercel  # Follow the prompts\n```\n\n2. **Set Environment Variables**\nGo to your Vercel dashboard and add:\n- `MONGODB_URI`\n- `CLERK_SECRET_KEY`\n- `SARVAM_API_KEY`\n- `GEMINI_API_KEY`\n- `ENVIRONMENT=production`\n- `DEBUG=False`\n- `ALLOWED_ORIGINS=https://your-frontend-domain.vercel.app`\n\n### Frontend Deployment (Vercel)\n\n1. **Connect to Vercel**\n```bash\ncd frontend\nvercel  # Follow the prompts\n```\n\n2. **Set Environment Variables**\nAdd to Vercel dashboard:\n- `VITE_CLERK_PUBLISHABLE_KEY`\n- `VITE_API_BASE_URL=https://your-backend-domain.vercel.app/api/v1`\n\n### Post-Deployment Configuration\n\n1. **Update Clerk Settings**\n   - Add your production domains to allowed origins\n   - Update redirect URLs\n\n2. **Update API CORS**\n   - Add production frontend URL to backend CORS settings\n\n3. **Test the Deployment**\n   - Verify authentication flow\n   - Test file upload functionality\n   - Check AI provider integration\n\n---\n\n## 👨‍💻 **Developer**\n\n**Built with ❤️ by [@TechyCSR](https://techycsr.me)**\n\n*Professional full-stack developer specializing in AI-powered applications and modern web technologies.*\n\n---\n\n*© 2025 TechyCSR • AI-Powered Document Analysis Platform • [summary.techycsr.me](https://summary.techycsr.dev)*\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechycsr%2Fai-powered-document-insight-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechycsr%2Fai-powered-document-insight-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechycsr%2Fai-powered-document-insight-tool/lists"}