How 07yashbhoite/compliance-document-review-app works
Compliance Document Review is a two-role web app for submitting client-facing documents and recording compliance decisions. Advisors authenticate, upload documents, track status, and resubmit revisions; officers review the queue, inspect documents and optional AI assistance, then approve, reject, or request revisions. The backend enforces roles and document state, links revisions, and records an audit trail. AI analysis is documented as an optional capability, although the README says the deployed assist endpoint is stubbed. Several subsystem connections are based on README or SOURCE INDEX references rather than fully sampled implementations.
Main entry points: service.py Assist analysis · OfficerDashboard.jsx Review dashboard · main.py FastAPI application · App.jsx App routes
Components 24
Web application
- App routes
frontend/src/App.jsx - Session context
frontend/src/contexts/AuthContext.jsx - Submission dashboard
frontend/src/pages/AdvisorDashboard.jsx - Review dashboard
frontend/src/pages/OfficerDashboard.jsx - Assist panel
frontend/src/components/AssistPanel.jsx - Status badges
frontend/src/components/Badges.jsx - API client
frontend/src/lib/api.js
API and workflow
- FastAPI application
backend/app/main.py - Authentication
backend/app/routers/auth.py - Document workflow
backend/app/routers/documents.py - Review decisions
backend/app/routers/reviews.py - Administration
backend/app/routers/admin.py - Identity and roles
backend/app/security.py
AI assistance
- Text extraction
backend/app/ai/text_extraction.py - Assist analysis
backend/app/ai/service.py - PII masking
backend/app/ai/masker.py - Rule and precedent retrieval
backend/app/ai/retrieval.py - LLM client
backend/app/ai/llm_client.py
Persistence
- Database session
backend/app/database.py - Workflow and AI records
backend/app/models.py - Compliance corpus
backend/app/models.py - Precedent index
backend/app/models.py
Other components
- Advisor
- Compliance officer
Connections 31
- Advisor → App routes: uses
README.md - Compliance officer → App routes: uses
README.md - App routes → Session context: provides session
frontend/src/App.jsx - App routes → Submission dashboard: routes to
frontend/src/App.jsx - App routes → Review dashboard: routes to
frontend/src/App.jsx - Session context → API client: calls
frontend/src/contexts/AuthContext.jsx - Submission dashboard → API client: requests documents
frontend/src/pages/AdvisorDashboard.jsx - Review dashboard → API client: requests reviews
frontend/src/pages/OfficerDashboard.jsx - Submission dashboard → Status badges: renders
frontend/src/pages/AdvisorDashboard.jsx - Review dashboard → Status badges: renders
frontend/src/pages/OfficerDashboard.jsx - Review dashboard → Assist panel: renders
frontend/src/pages/OfficerDashboard.jsx - API client → FastAPI application: sends HTTP requests
frontend/src/lib/api.js - FastAPI application → Authentication: registers
backend/app/main.py - FastAPI application → Document workflow: registers
backend/app/main.py - FastAPI application → Review decisions: registers
backend/app/main.py - FastAPI application → Administration: registers
backend/app/main.py - Document workflow → Assist analysis: requests assistance
backend/app/routers/documents.py - Document workflow → Text extraction: extracts text
backend/app/routers/documents.py - Review decisions → Workflow and AI records: records decisions and audit
backend/app/routers/reviews.py - Document workflow → Database session: uses sessions
backend/app/routers/documents.py - Review decisions → Database session: uses sessions
backend/app/routers/reviews.py - Database session → Workflow and AI records: persists
backend/app/database.py - Assist analysis → PII masking: masks and unmasks
backend/app/ai/service.py - Assist analysis → Text extraction: reads extracted text
backend/app/ai/service.py - Assist analysis → Rule and precedent retrieval: retrieves rules
backend/app/ai/service.py - Assist analysis → LLM client: requests analysis
backend/app/ai/service.py - Assist analysis → Workflow and AI records: caches analysis
backend/app/ai/service.py - Rule and precedent retrieval → Compliance corpus: queries rules
backend/app/ai/retrieval.py - Rule and precedent retrieval → Precedent index: queries examples
backend/app/ai/retrieval.py - Rule and precedent retrieval → Workflow and AI records: uses record types
backend/app/ai/retrieval.py - Review dashboard → API client: loads assist
frontend/src/pages/OfficerDashboard.jsx