How colin-ff/gov-graph works
GovGraph is a university governance registry and analytics platform. Staff authenticate, create or resume a group’s Terms of Reference (ToR), optionally autofill it and check for possible duplicates, then submit it for review; approved governance data feeds the registry, relationship visualisation and superuser analytics. Separate capabilities include account registration and admin approval. The graph reflects documented routes and sampled service behavior; unsampled route-to-service wiring is represented only where the API or README establishes the capability.
Main entry points: client.ts API client · App.tsx GovGraph SPA · db_schema Governance database · tor_service.py ToR validation and write
Components 27
Web application
- GovGraph SPA
frontend/src/App.tsx - Auth context
frontend/src/auth/AuthContext.tsx - ToR wizard
frontend/src/pages/NewGroupPage.tsx - Registry view
frontend/src/pages/RegistryPage.tsx - Graph view
frontend/src/pages/VisualisationPage.tsx - Analytics view
frontend/src/pages/AnalyticsPage.tsx - Registration review
frontend/src/pages/AdminRegistryPage.tsx - API client
frontend/src/api/client.ts
REST API
- Auth endpoints
backend/app/routes/auth.py - User registration
backend/app/routes/register.py - Admin registrations
backend/app/routes/admin_registrations.py - ToR endpoints
backend/app/routes/tor.py - ToR autofill
backend/app/routes/tor_autofill.py - Duplicate check
backend/app/routes/tor.py - Submission lifecycle
backend/app/routes/tor_submissions.py - Group endpoints
backend/app/routes/groups.py - Graph endpoint
backend/app/routes/graph.py - Analytics endpoint
backend/app/routes/analytics.py
Governance domain
- Credential verification
backend/app/services/auth_service.py - ToR validation and write
backend/app/services/tor_service.py - Similarity matching
backend/app/services/embedding_service.py - Submission workflow
backend/app/services/tor_submission_service.py - Governance database
backend/app/db_schema
Analysis and access
- Governance analytics
backend/app/analytics/main.py - Request identity
backend/app/auth.py
Other components
- Staff user
- Superuser
Connections 38
- Staff user → GovGraph SPA: uses
- Superuser → GovGraph SPA: uses
- GovGraph SPA → Auth context: provides auth
- GovGraph SPA → ToR wizard: opens
- GovGraph SPA → Registry view: opens
- GovGraph SPA → Graph view: opens
- GovGraph SPA → Analytics view: opens
- GovGraph SPA → Registration review: opens
- Auth context → API client: requests
- ToR wizard → API client: submits ToR
- Registry view → API client: loads registry
- Graph view → API client: loads graph
- Analytics view → API client: loads metrics
- Registration review → API client: reviews requests
- API client → Auth endpoints: login
- API client → User registration: register
- API client → Admin registrations: approve or reject
- API client → ToR endpoints: submit or read ToR
- API client → ToR autofill: uploads document
- API client → Duplicate check: checks draft
- API client → Submission lifecycle: manages drafts
- API client → Group endpoints: reads groups
- API client → Graph endpoint: reads graph
- API client → Analytics endpoint: requests analytics
- Auth endpoints → Credential verification: verifies credentials
- Credential verification → Governance database: reads users
- Request identity → Governance database: resolves caller
- ToR endpoints → ToR validation and write: validates and submits
- ToR validation and write → Governance database: writes governance data
- Duplicate check → ToR validation and write: checks payload
- ToR validation and write → Similarity matching: finds candidates
- Similarity matching → Governance database: reads embeddings
- Submission lifecycle → Submission workflow: manages lifecycle
- Submission workflow → Governance database: reads and writes submissions
- Group endpoints → Governance database: reads groups
- Graph endpoint → Governance database: reads relationships
- Analytics endpoint → Governance analytics: computes metrics
- Governance analytics → Governance database: queries governance data