How praveenms02/juris-ai works
JurisAI turns uploaded legal documents into searchable, analyzed records, then supports document Q&A, risk review, and study workflows. The main path runs from authenticated upload through backend persistence and AI extraction/indexing; later requests analyze or query the stored document, with results saved and presented in the frontend. Separate learning and collaborative-room capabilities extend the product. The README documents the cross-service phases; sampled source and the SOURCE INDEX support several implementation links, while unsampled feature internals are represented at their known paths.
Main entry points: server.js Express API · App.jsx React application · app.py FastAPI endpoints · Document.js MongoDB records
Components 24
Web application
- React application
frontend/src/App.jsx - Document workflows
frontend/src/pages/DocumentDetailPage.jsx - Chat interface
frontend/src/pages/ChatPage.jsx - Risk dashboard
frontend/src/pages/RiskAnalysisPage.jsx
Backend API
- Express API
backend/server.js - Document handling
backend/controllers/documentController.js - Chat handling
backend/controllers/chatController.js - Risk persistence
backend/services/riskService.js - AI service client
backend/services/aiService.js
AI service
- FastAPI endpoints
ai-service/app.py - Text ingestion
ai-service/services/extraction.py - Document analysis
ai-service/services/analyzer.py - RAG pipeline
ai-service/services/rag_pipeline.py - Risk engine
ai-service/services/risk_engine.py
Persistence
- MongoDB records
backend/models/Document.js - Vector index
ai-service/services/vector_store.py
Learning and collaboration
- Learning modes
ai-service/services/mode_engine.py - Quiz generation
ai-service/services/quiz_engine.py - Learning pages
frontend/src/pages/LearningHub.jsx - Discussion rooms
frontend/src/pages/DiscussionRoom.jsx - Room workflows
backend/controllers/roomController.js - Room management
backend/services/roomService.js - Realtime messaging
backend/sockets/roomSocket.js
Other components
- User
Connections 35
- User → React application: uses
README.md - React application → Document workflows: routes to
frontend/src/App.jsx - React application → Chat interface: routes to
frontend/src/App.jsx - React application → Risk dashboard: routes to
frontend/src/App.jsx - React application → Learning pages: routes to
frontend/src/App.jsx - React application → Discussion rooms: routes to
frontend/src/App.jsx - Document workflows → Express API: requests
README.md - Chat interface → Express API: requests
README.md - Risk dashboard → Express API: requests
README.md - Express API → Document handling: routes
backend/server.js - Express API → Chat handling: routes
backend/server.js - Express API → Risk persistence: routes
backend/server.js - Express API → Room workflows: routes
backend/server.js - Document handling → MongoDB records: reads and writes
backend/controllers/documentController.js - Document handling → AI service client: calls
backend/controllers/documentController.js - AI service client → FastAPI endpoints: calls endpoints
backend/services/aiService.js - FastAPI endpoints → Text ingestion: extracts and chunks
README.md - Text ingestion → Vector index: indexes chunks
README.md - FastAPI endpoints → Document analysis: analyzes text
ai-service/app.py - Document handling → MongoDB records: persists analysis
README.md - Chat handling → MongoDB records: loads history
backend/controllers/chatController.js - Chat handling → AI service client: calls
backend/controllers/chatController.js - FastAPI endpoints → RAG pipeline: runs chat
ai-service/app.py - RAG pipeline → Vector index: retrieves chunks
README.md - Risk persistence → MongoDB records: stores results
backend/services/riskService.js - Risk persistence → AI service client: requests analysis
- FastAPI endpoints → Risk engine: scores risks
README.md - Learning pages → Express API: requests learning
- FastAPI endpoints → Learning modes: runs modes
ai-service/app.py - Learning modes → Quiz generation: generates quizzes
ai-service/services/mode_engine.py - Discussion rooms → Express API: requests rooms
- Room workflows → Room management: delegates room work
backend/controllers/roomController.js - Room workflows → Realtime messaging: emits updates
backend/controllers/roomController.js - Room management → MongoDB records: reads documents
backend/services/roomService.js - Discussion rooms → Realtime messaging: exchanges messages