How nashiman-01/apna-wakeel-hackathon works
Apna Wakeel is a multilingual legal-information and navigation product for Pakistan. A person describes a problem through the web app; the backend can request clarification, classify the matter, research official sources, verify claims, and return a practical plan with referrals. The frontend also supports sign-in, conversation history, document handling, and voice input. The README documents these capabilities and the intended Groq, Supabase, and database integrations. Several page and API implementations were not excerpted, so those connections are shown only where documented or indexed.
Main entry points: orchestrator.py Case orchestrator · main.py FastAPI app · App.jsx App routing · Dashboard.jsx Case workspace
Components 33
Web experience
- App routing
apna-wakeel-frontend/src/App.jsx - Case workspace
apna-wakeel-frontend/src/pages/Dashboard.jsx - Public analysis
apna-wakeel-frontend/src/pages/PublicAnalysis.jsx - Voice input
apna-wakeel-frontend/src/pages/Voice.jsx - Transcript flow
apna-wakeel-frontend/src/services/voiceFlow.js - Speech services
apna-wakeel-frontend/src/services/speech.js - Document tools
apna-wakeel-frontend/src/services/documents.js - Language context
apna-wakeel-frontend/src/i18n/LanguageContext.jsx - API client
apna-wakeel-frontend/src/services/api.js - Auth client
apna-wakeel-frontend/src/services/auth.js
Backend workflow
- FastAPI app
bknd/app/main.py - Conversation API
bknd/app/api/conversations.py - Legal API
bknd/app/api/legal.py - Document API
bknd/app/api/documents.py - Auth API
bknd/app/api/auth.py - Case orchestrator
bknd/app/agents/orchestrator.py - Intake agent
bknd/app/agents/intake_agent.py - Classification agent
bknd/app/agents/classification_agent.py - Follow-up agent
bknd/app/agents/followup_agent.py - Research agent
bknd/app/agents/research_agent.py - Claim verification
bknd/app/agents/verification_agent.py - Response agent
bknd/app/agents/response_agent.py - Groq AI service
bknd/app/services/ai_service.py
Legal information
- Official source registry
bknd/app/legal_sources/source_registry.py - Evidence retrieval
bknd/app/legal_sources/evidence_retriever.py - Statute retrieval
bknd/app/legal_sources/statute_retriever.py - Evidence records
bknd/app/legal_sources/evidence.py - Legal domains
bknd/app/legal_sources/domain_catalog.py - Legal-aid referrals
bknd/app/legal_sources/referrals.py
Identity and state
- Conversation database
bknd/app/database/connection.py
Other components
- Person
- Supabase Auth
- Official sources
Connections 41
- Person → App routing: uses
- App routing → Case workspace: routes to
apna-wakeel-frontend/src/App.jsx - App routing → Public analysis: routes to
apna-wakeel-frontend/src/App.jsx - Case workspace → API client: requests cases
apna-wakeel-frontend/src/pages/Dashboard.jsx - Case workspace → Document tools: manages files
apna-wakeel-frontend/src/pages/Dashboard.jsx - Case workspace → Transcript flow: sends transcript
apna-wakeel-frontend/src/pages/Dashboard.jsx - Voice input → Speech services: uses
apna-wakeel-frontend/src/pages/Voice.jsx - Voice input → Transcript flow: uses
apna-wakeel-frontend/src/pages/Voice.jsx - Transcript flow → API client: submits case
- Public analysis → API client: submits analysis
apna-wakeel-frontend/src/pages/PublicAnalysis.jsx - App routing → Language context: uses language
apna-wakeel-frontend/src/App.jsx - API client → FastAPI app: calls backend
- Auth client → Auth API: calls auth routes
- FastAPI app → Conversation API: mounts router
bknd/app/main.py - FastAPI app → Legal API: mounts router
bknd/app/main.py - FastAPI app → Document API: mounts router
bknd/app/main.py - FastAPI app → Auth API: mounts router
bknd/app/main.py - Conversation API → Case orchestrator: runs case
bknd/app/api/conversations.py - Conversation API → Conversation database: reads and writes
bknd/app/api/conversations.py - Legal API → Case orchestrator: runs analysis
bknd/app/api/legal.py - Legal API → Legal-aid referrals: gets referrals
bknd/app/api/legal.py - Case orchestrator → Intake agent: calls
bknd/app/agents/orchestrator.py - Case orchestrator → Classification agent: calls
bknd/app/agents/orchestrator.py - Case orchestrator → Follow-up agent: calls
bknd/app/agents/orchestrator.py - Case orchestrator → Research agent: calls
bknd/app/agents/orchestrator.py - Case orchestrator → Claim verification: calls
bknd/app/agents/orchestrator.py - Case orchestrator → Response agent: calls
bknd/app/agents/orchestrator.py - Case orchestrator → Official source registry: uses
bknd/app/agents/orchestrator.py - Case orchestrator → Evidence retrieval: retrieves evidence
bknd/app/agents/orchestrator.py - Case orchestrator → Statute retrieval: retrieves statutes
bknd/app/agents/orchestrator.py - Case orchestrator → Legal domains: uses domains
bknd/app/agents/orchestrator.py - Research agent → Groq AI service: generates research
bknd/app/agents/research_agent.py - Claim verification → Groq AI service: checks claims
bknd/app/agents/verification_agent.py - Evidence retrieval → Official source registry: selects sources
bknd/app/legal_sources/evidence_retriever.py - Evidence retrieval → Evidence records: creates records
bknd/app/legal_sources/evidence_retriever.py - Statute retrieval → Official source registry: selects sources
bknd/app/legal_sources/statute_retriever.py - Statute retrieval → Evidence records: creates records
bknd/app/legal_sources/statute_retriever.py - Statute retrieval → Official sources: fetches statutes
bknd/app/legal_sources/statute_retriever.py - Auth API → Supabase Auth: validates identity
bknd/app/api/auth.py - Auth client → Supabase Auth: requests reset
apna-wakeel-frontend/src/services/auth.js - Document API → Conversation database: stores metadata