How inatanayaxsk/nyayasahaya works
Component Interactions and Data Flow
• Flow from the React frontend:
• User interactions in the UI trigger calls to the backend API endpoints (e.g., POST /api/chat for legal inquiries).
• How navigation could initiate document generation processes (for example, launching Streamlit’s document generator).
• Backend API Interaction:
• For the Chat API, make sure to show the expected request (a JSON payload with the user’s question) and the structured response (detailed sections like Applicable Law, Legal Consequences, etc.).
• Internal Service Communication:
• If applicable, illustrate how document processing might interact with the PDF generator and reference material stored under “legal_document_generator/reference”.
Architectural Patterns and Technologies
• Separation of concerns: separate modules for the legal chatbot, document generator, and summarizer.
• Point out that the backend uses modern Python frameworks (FastAPI, LangChain) to handle conversational context and AI-driven responses.
• Frontend’s modular React component structure (with routing and state management).
• Mention security patterns such as CORS middleware, API key protection (environment variables), and input validation.