How vinayak2006tech/nyaya-lens-ai-legal-literacy-assistant-for-indian-citizens works
Nyaya Lens is a legal-literacy assistant for Indian citizens. The main journey is to enter or upload a document, request analysis, and review clause risks, plain-language explanations, statute citations, and remedies. The interface also exposes distinct supporting capabilities—authentication, scam warnings, fair-clause comparisons, consequence simulation, dispute timelines, checklists, and governance audits. The excerpts show the frontend’s analysis request and backend’s legal-engine dependency; some backend routes and AI-service behavior are unsampled, so those connections are omitted or marked unverified.
Main entry points: App.tsx Workspace · server.js API gateway · LandingPage.tsx Landing page · DocumentPane.tsx Document input
Components 21
Citizen experience
- Workspace
frontend/src/App.tsx - Document input
frontend/src/components/DocumentPane.tsx - Landing page
frontend/src/components/LandingPage.tsx - Workspace navigation
frontend/src/components/Navbar.tsx - Animated backdrop
frontend/src/components/LineWaves.tsx - Split-flap display
frontend/src/components/SplitFlapText.tsx
Legal analysis
- Risk review
frontend/src/components/RiskAnalysisPane.tsx - Clause evaluator
backend/legalEngine.js - Statutes and templates
backend/data
Backend services
- API gateway
backend/server.js - API configuration
frontend/src/config/api.ts - Authentication dialog
frontend/src/components/AuthModal.tsx - MongoDB
- AI service
ai-service/main.py
Additional guidance
- Scam alert
frontend/src/components/ScamAlertBanner.tsx - Action checklist
frontend/src/components/ActionableChecklistDrawer.tsx - Consequence simulator
frontend/src/components/ConsequenceSimulatorModal.tsx - Fair clause comparison
frontend/src/components/FairClauseModal.tsx - Dispute timeline
frontend/src/components/DisputeTimelineModal.tsx - Governance audit
frontend/src/components/WatsonGovernanceAuditModal.tsx
Other components
- Citizen
Connections 22
- Citizen → Workspace: uses
- Workspace → Landing page: renders
frontend/src/App.tsx - Workspace → Workspace navigation: renders
frontend/src/App.tsx - Workspace → Document input: renders
frontend/src/App.tsx - Workspace → Risk review: renders
frontend/src/App.tsx - Workspace → Scam alert: renders
frontend/src/App.tsx - Workspace → Action checklist: renders
frontend/src/App.tsx - Workspace → Consequence simulator: renders
frontend/src/App.tsx - Workspace → Fair clause comparison: renders
frontend/src/App.tsx - Workspace → Dispute timeline: renders
frontend/src/App.tsx - Workspace → Governance audit: renders
frontend/src/App.tsx - Landing page → Animated backdrop: renders
frontend/src/components/LandingPage.tsx - Landing page → Split-flap display: renders
frontend/src/components/LandingPage.tsx - Workspace → API gateway: requests analysis
frontend/src/App.tsx - Document input → API gateway: requests extraction
frontend/src/components/DocumentPane.tsx - Authentication dialog → API gateway: submits credentials
frontend/src/components/AuthModal.tsx - Workspace → Authentication dialog: opens
frontend/src/App.tsx - API gateway → Clause evaluator: dispatches analysis
backend/server.js - Clause evaluator → Statutes and templates: loads knowledge
backend/legalEngine.js - API gateway → MongoDB: syncs users
backend/server.js - API gateway → AI service: queries service
backend/server.js - Risk review → Workspace: shows results
frontend/src/App.tsx