How viswaags/ai_report_compliance_system works
AI Report Compliance System supports role-based college event-report submission, template-driven validation, coordinator review, and archiving. The principal path is report upload through extraction, canonical mapping, compliance and semantic checks, then correction feedback or review and repository archiving. Separate capabilities include template analysis/versioning, club and event administration, dashboards, notifications, and Google Drive/email integrations. Edges rely on README statements or shown source references/calls; unsampled API and service internals are represented at their exact directories, with uncertain links omitted.
Main entry points: report_pipeline_service.py Validation pipeline · main.py FastAPI routes · review_workflow.py Review workflow · api.ts API client
Components 29
Web application
- React app
frontend/src/App.tsx - API client
frontend/src/lib/api.ts - Report screens
frontend/src/pages/ReportsPage.tsx - Review screens
frontend/src/pages/ReviewsPage.tsx - Review queries
frontend/src/hooks/useReviews.ts
Access and administration
- FastAPI routes
backend/app/main.py - Authentication
backend/app/api/auth.py - Clubs and events
backend/app/api - Application database
backend/app/database/db.py - Domain records
backend/app/models
Report validation
- Report endpoints
backend/app/api/reports.py - Report workflow
backend/app/workflows/report_workflow.py - Document extraction
backend/app/services/raw_extraction_builder.py - Canonical mapping
backend/app/services/template_guided_mapper.py - Validation pipeline
backend/app/services/report_pipeline_service.py - Rule compliance
backend/app/services/compliance_engine.py - Semantic validation
backend/app/services/semantic_validator.py - Correction feedback
backend/app/services/feedback_service.py
Review and archive
- Review endpoints
backend/app/api/reviews.py - Review workflow
backend/app/workflows/review_workflow.py - Review decisions
backend/app/services/review_service.py - Event records
backend/app/services/record_management_service.py - Approved repository
backend/app/services/repository_service.py
Templates and integrations
- Template workflows
backend/app/workflows/template_workflow.py - Template management
backend/app/services/template_service.py - Notifications
backend/app/services/notification_service.py - Google Drive
backend/app/services/google_drive_service.py - Email delivery
backend/app/services/email_service.py
Other components
- System user
Connections 29
- System user → React app: uses
- React app → API client: loads API client
- Report screens → API client: requests data
- Review screens → Review queries: uses queries
- Review queries → API client: calls
frontend/src/hooks/useReviews.ts - API client → FastAPI routes: HTTP requests
- FastAPI routes → Authentication: routes auth
backend/app/main.py - FastAPI routes → Report endpoints: routes reports
backend/app/main.py - FastAPI routes → Review endpoints: routes reviews
backend/app/main.py - FastAPI routes → Clubs and events: routes administration
backend/app/main.py - Report endpoints → Report workflow: runs workflow
- Report workflow → Validation pipeline: invokes pipeline
- Validation pipeline → Document extraction: builds extraction
backend/app/services/report_pipeline_service.py - Validation pipeline → Canonical mapping: maps report
backend/app/services/report_pipeline_service.py - Validation pipeline → Rule compliance: validates rules
backend/app/services/report_pipeline_service.py - Validation pipeline → Semantic validation: checks semantics
backend/app/services/report_pipeline_service.py - Validation pipeline → Correction feedback: generates feedback
backend/app/services/report_pipeline_service.py - Validation pipeline → Application database: persists results
- Template workflows → Template management: stores template
- Template workflows → Notifications: notifies coordinators
- Review endpoints → Review workflow: runs decisions
backend/app/api/reviews.py - Review workflow → Review decisions: executes review
backend/app/workflows/review_workflow.py - Review workflow → Event records: records approval
backend/app/workflows/review_workflow.py - Review workflow → Notifications: notifies outcome
backend/app/workflows/review_workflow.py - Review decisions → Email delivery: sends messages
backend/app/services/review_service.py - Event records → Approved repository: archives record
- Report endpoints → Google Drive: stores versions
- Template workflows → Google Drive: uploads templates
- Application database → Domain records: maps entities
backend/app/models/review.py