How codeiwan/algocoach works
AlgoCoach is an AI-assisted coding-problem coaching application. A learner enters a problem, gets it structured, then works in a solver workspace with analysis, progressive hints, and a pre-submission static review; ending a session can be followed by learner feedback. The backend exposes these capabilities through API routers, uses an interchangeable LLM provider, and keeps hint, completion, and feedback records in process memory. The graph preserves documented product stages, but frontend-to-API transport details are not shown in the sampled source, so those links are omitted.
Main entry points: main.py FastAPI application · provider.py LLM interface · App.vue Problem entry · hint_sessions.py Hint session store
Components 23
Learner workspace
- Problem entry
frontend/src/App.vue - Solver workspace
frontend/src/components/SolverWorkspace.vue - Problem preview
frontend/src/components/StructuredProblemPreview.vue - Coaching panels
frontend/src/components - Session panels
frontend/src/components
Backend API
- FastAPI application
backend/app/main.py - Problem structuring API
backend/app/api/problems.py - Code analysis API
backend/app/api/analysis.py - Progressive hint API
backend/app/api/hints.py - Submission review API
backend/app/api/submission.py - Completion API
backend/app/api/session_completion.py - Feedback API
backend/app/api/session_feedback.py - Request and result schemas
backend/app/schemas
Coaching and review
- Analysis graph
backend/app/agents/graph.py - Hint progression policy
backend/app/agents/hint_policy.py
Session records
- Hint session store
backend/app/services/hint_sessions.py - Completion store
backend/app/services/session_completions.py - Feedback store
backend/app/services/session_feedback.py
LLM providers
- LLM interface
backend/app/llm/provider.py - Provider factory
backend/app/llm/factory.py - Mock provider
backend/app/llm/mock.py - OpenAI provider
backend/app/llm/openai_provider.py
Other components
- Learner
Connections 25
- Learner → Problem entry: enters problem
frontend/src/App.vue - Problem entry → Problem preview: renders structure
frontend/src/App.vue - Problem entry → Problem structuring API: requests structuring
frontend/src/App.vue - Problem entry → Solver workspace: opens workspace
frontend/src/App.vue - FastAPI application → Problem structuring API: registers route
backend/app/main.py - FastAPI application → Code analysis API: registers route
backend/app/main.py - FastAPI application → Progressive hint API: registers route
backend/app/main.py - FastAPI application → Submission review API: registers route
backend/app/main.py - FastAPI application → Completion API: registers route
backend/app/main.py - FastAPI application → Feedback API: registers route
backend/app/main.py - FastAPI application → Provider factory: creates provider
backend/app/main.py - FastAPI application → Analysis graph: creates graph
backend/app/main.py - Problem structuring API → LLM interface: structures problem
backend/app/api/problems.py - Code analysis API → Analysis graph: runs analysis
backend/app/api/analysis.py - Progressive hint API → Hint session store: generates hint
backend/app/api/hints.py - Hint session store → Hint progression policy: checks progression
backend/app/services/hint_sessions.py - Hint session store → LLM interface: requests hint
backend/app/services/hint_sessions.py - Submission review API → LLM interface: reviews code
backend/app/api/submission.py - Completion API → Completion store: records completion
backend/app/api/session_completion.py - Feedback API → Feedback store: records feedback
backend/app/api/session_feedback.py - Feedback store → Completion store: checks completion
backend/app/services/session_feedback.py - Provider factory → Mock provider: selects provider
backend/app/llm/factory.py - Provider factory → OpenAI provider: selects provider
backend/app/llm/factory.py - Mock provider → LLM interface: implements interface
backend/app/llm/mock.py - OpenAI provider → LLM interface: implements interface
backend/app/llm/openai_provider.py