How gani-sma/fie works
ENACT is a browser-based Indian legal assistant. Users enter through the routed React app, authenticate if needed, ask questions in chat, receive AI guidance, and can revisit conversation history. The repository also exposes results and case-tracking pages and conversation export/PDF utilities. The README documents provider fallback and legal-code grounding, but those implementations were not sampled; the legal-chat function and provider connections are therefore shown at the documented level only.
Main entry points: App.tsx App Router · Chat.tsx Chat Page · client.ts Supabase Client · index.ts Legal Chat Function
Components 21
Application
- App Router
src/App.tsx - Home
src/pages/Home.tsx - Authentication
src/pages/Auth.tsx - Results
src/pages/Results.tsx - Case Tracking
src/pages/CaseTracking.tsx
Chat and History
- Chat Page
src/pages/Chat.tsx - Chat Interface
src/components/chat/ChatInput.tsx - Voice Input
src/hooks/useVoiceInput.ts - Message State
src/hooks/useMessages.ts - Conversation State
src/hooks/useConversations.ts - Conversation Repository
src/repositories/conversationsRepository.ts
Backend Services
- Legal Chat Function
supabase/functions/legal-chat/index.ts - Supabase Client
src/integrations/supabase/client.ts - Supabase Database
Product Support
- Conversation Export
src/utils/conversationExport.ts - PDF Generator
src/utils/pdfGenerator.ts - Localization
src/i18n/config.ts
Other components
- User
- Groq AI
- Gemini AI
- OpenRouter AI
Connections 22
- User → App Router: opens
- App Router → Home: routes
- App Router → Authentication: routes
- App Router → Results: routes
- App Router → Case Tracking: routes
- App Router → Chat Page: routes
- Authentication → Supabase Client: authenticates via
- Chat Page → Chat Interface: renders
- Chat Page → Voice Input: uses
- Chat Page → Message State: manages messages
- Chat Page → Conversation State: manages history
- Chat Page → Legal Chat Function: requests guidance
- Legal Chat Function → Groq AI: inference
- Legal Chat Function → Gemini AI: fallback inference
- Legal Chat Function → OpenRouter AI: fallback inference
- Message State → Supabase Client: reads and writes
- Conversation State → Supabase Client: reads and writes
- Conversation Repository → Supabase Client: queries
- Supabase Client → Supabase Database: accesses
- Chat Page → Conversation Export: exports
- Conversation Export → PDF Generator: generates PDF
- App Router → Localization: uses translations