How airz-raj/by-law works
Mohlat helps people understand a legal notice, calculate a response deadline, and identify practical next steps. The main workflow runs from browser intake through API routing and document analysis to an evidence-backed report; follow-up features support agreement cross-checks, document-grounded questions, and legal-aid checks. The README also documents briefing sheets and calendar reminders. The graph reflects documented capabilities and indexed references; some frontend and pipeline internals were not excerpted, so uncertain connections are omitted.
Main entry points: main.js Browser workflow · pipeline.py Analysis pipeline · routes.py API routes · api.js API client
Components 22
User experience
- Browser workflow
web/js/main.js - Notice intake
web/js/intake.js - API client
web/js/api.js - Report display
web/js/report.js - Source receipts
web/js/source-view.js
API and services
- Application setup
app/main.py - API routes
app/api/routes.py - Service assembly
app/api/dependencies.py - Document extraction
app/adapters/extract.py
Notice analysis
- Analysis pipeline
app/services/pipeline.py - Gemini model adapter
app/adapters/llm.py - Identifier masking
app/core/redaction.py - Content screening
app/core/screening.py - Quote verification
app/core/evidence.py - Rule matching
app/core/rulebook.py - Deadline calculation
app/core/deadlines.py
Follow-up support
- Agreement cross-check
web/js/crosscheck.js - Document questions
web/js/ask.js - Legal-aid eligibility
app/core/legal_aid.py - Briefing and calendar
web/js/briefing.js
Other components
- Notice recipient
- Gemini service
Connections 24
- Notice recipient → Browser workflow: submits notice
README.md - Browser workflow → Notice intake: builds request
web/js/main.js - Browser workflow → API client: requests decode
web/js/main.js - API client → Application setup: sends request
- Application setup → API routes: mounts routes
app/main.py - API routes → Service assembly: gets services
app/api/dependencies.py - API routes → Document extraction: extracts upload
- API routes → Analysis pipeline: decodes notice
app/api/routes.py - Service assembly → Gemini model adapter: builds adapter
app/api/dependencies.py - Analysis pipeline → Identifier masking: masks text
app/services/pipeline.py - Analysis pipeline → Content screening: screens text
app/services/pipeline.py - Analysis pipeline → Gemini model adapter: requests extraction
app/services/pipeline.py - Gemini model adapter → Gemini service: calls model
app/adapters/llm.py - Analysis pipeline → Quote verification: verifies quotes
app/services/pipeline.py - Analysis pipeline → Rule matching: matches rules
app/services/pipeline.py - Analysis pipeline → Deadline calculation: computes date
app/services/pipeline.py - Browser workflow → Report display: renders report
web/js/main.js - Report display → Source receipts: shows receipts
web/js/report.js - Browser workflow → Agreement cross-check: renders check
web/js/main.js - Browser workflow → Document questions: renders questions
web/js/main.js - Agreement cross-check → API client: sends comparison
web/js/crosscheck.js - Document questions → API client: sends question
web/js/ask.js - API routes → Legal-aid eligibility: checks eligibility
app/api/routes.py - Browser workflow → Briefing and calendar: renders briefing
web/js/main.js