How mr-vicky-01/legal-doc-analyzer works
Project type and purpose
• This is a lightweight full-stack web application (“Legal Doc Analyzer”) that exposes a user interface for uploading legal documents or text prompts, processes them locally (parsing/extraction), then calls out to an external AI service (Google’s Gemini via the Google Generative AI SDK) to generate responses.
File structure
• Top-level files:
• .env – environment variable storage (GOOGLE_API_KEY)
• README.md – user and developer documentation
• requirements.txt – pinned Python dependencies (e.g., google-generativeai, Flask/Gradio/Streamlit if used)
• app.py – main entry point / web server and request router
• extractor.py – document-parsing module (text, metadata extraction)
• llm.py – wrapper module handling interaction with the Gemini model API
Key insights from README
• The app runs via python app.py
• Users can upload documents or send prompts
• Workflow: user → app.py (UI & routing) → extractor.py (preprocessing) → llm.py (API client) → Gemini API → llm.py → app.py → user
Final advice
• Be explicit about data flows and module interfaces
• Dependencies (API keys, third-party libraries)