How overmindv/tasks works
tasks is an internal service for authoring, publishing, and solving IT tasks. The main workflow is HTTP task retrieval and submission, with choice answers evaluated in-service and programming submissions sent asynchronously to an external sandbox through Kafka; users poll for results. Other documented capabilities include immutable task versions, candidate ingestion and review, problem lists, progress, replay, and result history. The graph preserves these branches. Some subsystem links rely on the README or wiring excerpt because their implementation excerpts were not shown.
Main entry points: handler.go HTTP routes · code_submissions.go Code submissions · usecase/candidates.go Candidate review · httpapi/candidates.go Candidate endpoints
Components 26
HTTP API
- HTTP routes
internal/transport/httpapi/handler.go - Task endpoints
internal/transport/httpapi/tasks.go - Submission endpoints
internal/transport/httpapi/submissions.go - Code endpoints
internal/transport/httpapi/code_submissions.go - Candidate endpoints
internal/transport/httpapi/candidates.go - History endpoints
internal/transport/httpapi/problem_lists.go
Task authoring
- Task lifecycle
internal/usecase/tasks.go - Task persistence
internal/adapter/postgres/tasks.go
Submissions and execution
- Choice evaluation
internal/usecase/submissions.go - Submission history
internal/adapter/postgres/submissions.go - Code submissions
internal/usecase/code_submissions.go - Execution contract
internal/execution/contracts.go - Execution queue
internal/adapter/postgres/execution_queue.go - Kafka outbox
internal/transport/kafka/outbox.go - Result consumer
internal/transport/kafka/results.go
Curation and history
- Candidate review
internal/usecase/candidates.go - Candidate queue
internal/adapter/postgres/candidates.go - Problem lists
internal/usecase/problem_lists.go - Progress
internal/usecase/progress.go - Execution replay
internal/usecase/replay.go - Problem-list storage
internal/adapter/postgres/problem_lists.go
Other components
- Admin
- Task user
- task-hunter
- Kafka
- Sandbox
Connections 28
- Admin → HTTP routes: uses
internal/transport/httpapi/handler.go - Task user → HTTP routes: uses
internal/transport/httpapi/handler.go - task-hunter → Candidate endpoints: batch ingests
- HTTP routes → Task endpoints: routes to
internal/transport/httpapi/handler.go - HTTP routes → Submission endpoints: routes to
internal/transport/httpapi/handler.go - HTTP routes → Code endpoints: routes to
internal/transport/httpapi/handler.go - HTTP routes → Candidate endpoints: routes to
internal/transport/httpapi/handler.go - HTTP routes → History endpoints: routes to
internal/transport/httpapi/handler.go - Task endpoints → Task lifecycle: calls
- Task lifecycle → Task persistence: persists versions
internal/usecase/tasks.go - Submission endpoints → Choice evaluation: calls
- Choice evaluation → Submission history: records answers
internal/usecase/submissions.go - Code endpoints → Code submissions: calls
internal/transport/httpapi/code_submissions.go - Code submissions → Execution queue: queues runs
internal/usecase/code_submissions.go - Code submissions → Execution contract: builds requests
internal/usecase/code_submissions.go - Kafka outbox → Execution queue: claims messages
internal/transport/kafka/outbox.go - Kafka outbox → Kafka: publishes requests
README.md - Kafka → Sandbox: dispatches runs
README.md - Sandbox → Kafka: publishes results
README.md - Kafka → Result consumer: delivers results
README.md - Result consumer → Code submissions: updates submissions
internal/transport/kafka/results.go - Candidate endpoints → Candidate review: calls
- Candidate review → Candidate queue: manages candidates
internal/usecase/candidates.go - Candidate review → Task lifecycle: creates approved tasks
- History endpoints → Problem lists: calls
- Problem lists → Problem-list storage: reads lists
internal/usecase/problem_lists.go - Admin → Execution replay: replays runs
README.md - Task user → Progress: checks progress
README.md