How saanvisanjay13/benefai-legal-intelligence works
BenefAI is a beneficiary-intake and AI-assisted verification web app. The implemented flow collects applicant details, stores a beneficiary record, submits it to a server route for Groq scoring, and returns the result; the route also updates the record and writes an audit log. Audit and dashboard views provide oversight, though the dashboard excerpt uses hard-coded sample metrics. The README describes additional capabilities whose implementation is not present in the supplied tree, so they are shown as documented but unverified subsystems.
Main entry points: route.ts Verification route · supabase.ts Supabase client · IntakeForm.tsx Beneficiary form · page.tsx Intake page
Components 19
Intake
- Intake page
app/page.tsx - Beneficiary form
components/IntakeForm.tsx
Verification and storage
- Verification route
app/api/verify/route.ts - Supabase client
lib/supabase.ts
Oversight
- Audit log
app/audit/page.tsx - Metrics dashboard
app/dashboard/page.tsx
Documented extensions
- Duplicate detection
- Scheme eligibility
- Multilingual letters
- Document OCR
- Satellite checks
- WhatsApp alerts
- Batch CSV scoring
- Fraud visualizations
- Voice verification
- Realtime monitoring
Other components
- Applicant
- Groq API
- Supabase database
Connections 21
- Applicant → Intake page: opens
- Intake page → Beneficiary form: renders
app/page.tsx - Beneficiary form → Supabase client: inserts applicant
components/IntakeForm.tsx - Supabase client → Supabase database: stores record
README.md - Beneficiary form → Verification route: posts details
components/IntakeForm.tsx - Verification route → Groq API: requests score
app/api/verify/route.ts - Verification route → Supabase client: updates record
app/api/verify/route.ts - Verification route → Supabase client: writes audit entry
app/api/verify/route.ts - Verification route → Beneficiary form: returns decision
components/IntakeForm.tsx - Audit log → Supabase client: reads audit logs
app/audit/page.tsx - Metrics dashboard → Applicant: displays sample metrics
- Applicant → Duplicate detection: screened for duplicates
README.md - Applicant → Scheme eligibility: checked for schemes
README.md - Scheme eligibility → Multilingual letters: explained in letters
README.md - Applicant → Document OCR: documents processed
README.md - Applicant → Satellite checks: address assessed
README.md - Applicant → WhatsApp alerts: notified
README.md - Applicant → Batch CSV scoring: bulk scored
README.md - Fraud visualizations → Applicant: visualizes risk
README.md - Applicant → Voice verification: verified by voice
README.md - Realtime monitoring → Supabase database: monitors changes
README.md