How unknownmember4u/nyaymitra works
NyayMitra is a React legal-assistance platform backed by Firebase. The main client workflow is account registration/login, complaint intake and urgency analysis, case tracking, lawyer recommendations, assignment, and case chat. Admin and advocate dashboards provide separate oversight and case-management branches. README capabilities such as secure document uploads, verification, notifications, awareness content, and multilingual access are retained where the tree supports a component; implementation details and some links are unsampled, so those relationships are omitted rather than inferred.
Main entry points: App.jsx Route application · AuthContext.jsx Session and roles · firebase.js Firebase client · RecommendedLawyers.jsx Lawyer recommendations
Components 29
Access and roles
- Route application
src/App.jsx - Navigation
src/components/layout/Navbar.jsx - Session and roles
src/context/AuthContext.jsx - Login
src/pages/Login.jsx - Registration
src/pages/Register.jsx - Authentication
src/services/authService.js
Case intake and tracking
- Complaint intake
src/pages/CreateCase.jsx - Urgency analysis
src/utils/aiLogic.js - Case records
src/services/caseService.js - Client dashboard
src/pages/Dashboard.jsx - Case details
src/pages/CaseDetails.jsx - Advocate dashboard
src/pages/LawyerDashboard.jsx - Admin oversight
src/pages/AdminDashboard.jsx - Admin operations
src/services/adminService.js
Lawyer discovery
- Lawyer recommendations
src/pages/RecommendedLawyers.jsx - Matching and ranking
src/utils/aiLogic.js - Lawyer profiles
src/services/lawyerService.js
Messaging and alerts
- Case chat
src/pages/Chat.jsx - Chat records
src/services/chatService.js - Assignment email
src/utils/emailService.js
Platform services
- Firebase client
src/services/firebase.js - Firebase Authentication
- Firestore
- EmailJS
- Gemini AI
Other components
- Citizen
- Advocate
- Administrator
- Transcription endpoint
Connections 47
- Citizen → Route application: uses
README.md - Advocate → Route application: uses
README.md - Administrator → Route application: uses
README.md - Route application → Navigation: renders
src/App.jsx - Route application → Session and roles: provides session
src/App.jsx - Route application → Login: routes to
src/App.jsx - Route application → Registration: routes to
src/App.jsx - Route application → Client dashboard: routes to
src/App.jsx - Route application → Complaint intake: routes to
src/App.jsx - Route application → Lawyer recommendations: routes to
src/App.jsx - Route application → Case chat: routes to
src/App.jsx - Route application → Case details: routes to
src/App.jsx - Route application → Admin oversight: routes to
src/App.jsx - Session and roles → Authentication: subscribes
src/context/AuthContext.jsx - Session and roles → Firebase client: reads user records
src/context/AuthContext.jsx - Login → Authentication: authenticates
src/pages/Login.jsx - Registration → Authentication: registers
src/pages/Register.jsx - Authentication → Firebase client: uses client
src/services/authService.js - Complaint intake → Session and roles: reads user
src/pages/CreateCase.jsx - Complaint intake → Urgency analysis: detects urgency
src/pages/CreateCase.jsx - Complaint intake → Case records: creates case
src/pages/CreateCase.jsx - Complaint intake → Gemini AI: refines description
src/pages/CreateCase.jsx - Complaint intake → Transcription endpoint: requests transcript
src/pages/CreateCase.jsx - Case records → Urgency analysis: detects urgency
src/services/caseService.js - Case records → Firebase client: uses client
src/services/caseService.js - Client dashboard → Session and roles: reads user
src/pages/Dashboard.jsx - Client dashboard → Case records: loads cases
src/pages/Dashboard.jsx - Client dashboard → Chat records: uses chat
src/pages/Dashboard.jsx - Case details → Case records: case operations
- Advocate dashboard → Session and roles: reads user
src/pages/LawyerDashboard.jsx - Advocate dashboard → Case records: manages cases
src/pages/LawyerDashboard.jsx - Advocate dashboard → Chat records: uses chat
src/pages/LawyerDashboard.jsx - Admin oversight → Session and roles: reads user
src/pages/AdminDashboard.jsx - Admin oversight → Admin operations: performs operations
src/pages/AdminDashboard.jsx - Admin operations → Firebase client: uses client
src/services/adminService.js - Lawyer recommendations → Lawyer profiles: loads lawyers
src/pages/RecommendedLawyers.jsx - Lawyer recommendations → Matching and ranking: ranks matches
src/pages/RecommendedLawyers.jsx - Lawyer recommendations → Case records: loads case
src/pages/RecommendedLawyers.jsx - Lawyer recommendations → Chat records: starts chat
src/pages/RecommendedLawyers.jsx - Lawyer recommendations → Assignment email: sends assignment email
src/pages/RecommendedLawyers.jsx - Lawyer recommendations → Session and roles: reads user
src/pages/RecommendedLawyers.jsx - Lawyer profiles → Firebase client: uses client
src/services/lawyerService.js - Case chat → Chat records: uses chat
- Chat records → Firebase client: uses client
src/services/chatService.js - Assignment email → EmailJS: sends mail
src/utils/emailService.js - Firebase client → Firebase Authentication: initializes
src/services/firebase.js - Firebase client → Firestore: initializes
src/services/firebase.js