How hbuas-se-2026fall/cs2411-team06-campus-overflow works
CampusOverflow AI is a course-scoped university Q&A and content-governance platform. Students, teachers, and administrators use Next.js interfaces to ask and answer questions, manage courses, and review governance actions. Business records and final authorization belong to FastAPI/MySQL; the Agent provides retrieval, analysis, and proposed actions, with high-risk actions requiring human approval and backend revalidation. Markdown-backed RAG, workflow state, MCP, and the separate RAG ablation harness are important supporting capabilities. Links follow the README and shown wiring; unsampled internals are represented at their documented subsystem boundaries.
Main entry points: main.py FastAPI API · tasks.ts Chat and task routes · router_internal.py Agent internal API · app.ts Agent route app
Components 27
Web experience
- Student, teacher, admin UI
campus-overflow-ai/frontend/src/app/(student)/page.tsx - Next.js BFF
campus-overflow-ai/frontend/src/app/api/backend/[...path]/route.ts - Agent BFF
campus-overflow-ai/frontend/src/app/api/agent/[...path]/route.ts
Business backend
- FastAPI API
campus-overflow-ai/backend/app/main.py - Courses and discovery
campus-overflow-ai/backend/app/modules/courses/service.py - Questions and answers
campus-overflow-ai/backend/app/modules/qa/repository.py - Votes and interaction
campus-overflow-ai/backend/app/modules/interaction/service.py - Governance and approvals
campus-overflow-ai/backend/app/modules/governance/domain.py - Agent internal API
campus-overflow-ai/backend/app/modules/governance/router_internal.py
Agent runtime
- Agent route app
campus-overflow-ai/agent/src/app.ts - Chat and task routes
campus-overflow-ai/agent/src/routes/tasks.ts - Agent slot pool
campus-overflow-ai/agent/src/runtime/agent-pool.ts - Child-agent permissions
campus-overflow-ai/agent/src/agents/controller.ts - Structured task dispatch
campus-overflow-ai/agent/src/tasks/router.ts - Tools and execution gateway
campus-overflow-ai/agent/src/tools/execution-gateway.ts - Approval workflow
campus-overflow-ai/agent/src/approvals/requests.ts - Run audit
campus-overflow-ai/agent/src/observability/persistent-audit.ts - MCP services
campus-overflow-ai/agent/src/runtime/mcp-service.ts
Knowledge and state
- RAG retrieval
campus-overflow-ai/agent/src/knowledge/rag/runtime.ts - Course knowledge sources
campus-overflow-ai/agent/src/knowledge/catalog.ts - Workflow runtime state
campus-overflow-ai/agent/src/runtime/postgres-runtime.ts - Private memory and sessions
campus-overflow-ai/backend/app/modules/governance/service_contexts.py
RAG evaluation
- RAG ablation harness
Cross_testing/harness/variants.ts
Other components
- Campus users
- MySQL business store
- PostgreSQL workflow store
- RAG evaluator
Connections 33
- Campus users → Student, teacher, admin UI: use
README.md - Student, teacher, admin UI → Next.js BFF: business requests
README.md - Student, teacher, admin UI → Agent BFF: AI requests
README.md - Next.js BFF → FastAPI API: proxy requests
README.md - Agent BFF → Agent route app: proxy requests
README.md - FastAPI API → Courses and discovery: mounts routes
campus-overflow-ai/backend/app/main.py - FastAPI API → Questions and answers: mounts routes
campus-overflow-ai/backend/app/main.py - FastAPI API → Votes and interaction: mounts routes
campus-overflow-ai/backend/app/main.py - FastAPI API → Governance and approvals: mounts routes
campus-overflow-ai/backend/app/main.py - Courses and discovery → MySQL business store: stores facts
README.md - Questions and answers → MySQL business store: stores facts
README.md - Votes and interaction → MySQL business store: stores facts
README.md - Governance and approvals → MySQL business store: stores approvals
README.md - FastAPI API → Agent internal API: mounts internal routes
campus-overflow-ai/backend/app/main.py - Agent route app → Chat and task routes: registers routes
campus-overflow-ai/agent/src/app.ts - Chat and task routes → Agent slot pool: runs jobs
campus-overflow-ai/agent/src/routes/tasks.ts - Chat and task routes → Structured task dispatch: dispatches tasks
campus-overflow-ai/agent/src/routes/tasks.ts - Structured task dispatch → Tools and execution gateway: uses tools
- Child-agent permissions → Tools and execution gateway: restricts tools
campus-overflow-ai/agent/src/agents/controller.ts - Structured task dispatch → RAG retrieval: retrieves knowledge
- RAG retrieval → Course knowledge sources: retrieves evidence
README.md - Chat and task routes → Agent internal API: calls internal API
README.md - Agent internal API → Governance and approvals: requests approvals
README.md - Governance and approvals → MySQL business store: revalidates and executes
README.md - Chat and task routes → Run audit: records runs
campus-overflow-ai/agent/src/routes/tasks.ts - Run audit → Agent internal API: persists audit
- Agent route app → MCP services: offers MCP
README.md - Agent route app → Workflow runtime state: uses workflow state
README.md - Workflow runtime state → PostgreSQL workflow store: persists runtime state
README.md - Agent internal API → Private memory and sessions: serves private context
campus-overflow-ai/backend/app/modules/governance/router_contexts.py - Private memory and sessions → MySQL business store: derives scope
- RAG evaluator → RAG ablation harness: runs comparisons
README.md - RAG ablation harness → RAG retrieval: compares strategies
README.md