How qianlin1455/go-server works
Go-Server is a layered Go backend for fixed-revision GitHub source imports, evidence-grounded AI questions, and project/conversation/practice-task workflows. HTTP clients enter through the API; services enforce domain rules and repositories persist state. Imports proceed asynchronously through an outbox, Kafka delivery, and a shared runner that fetches GitHub source into searchable snapshots. The README documents the major workflows; some implementation details and wiring are unsampled, so edges rely on documented relationships where source excerpts do not show calls.
Main entry points: main.go API Assembly · mysql.go MySQL · project_service.go Project Service · github_binding.go Repository Binding
Components 22
HTTP API
- API Assembly
cmd/server/main.go - Authentication
internal/service/auth_service.go
Project Workflows
- Project Service
internal/service/project_service.go - Conversation Service
internal/service/conversation_service.go - Message Service
internal/service/message_service.go - Practice Tasks
internal/service/task_service.go - Task Evidence
internal/service/task_evidence_service.go - Task Review
internal/service/task_retrospective.go
Source Intelligence
- Repository Binding
internal/service/github_binding.go - Import Requests
internal/service/import_job.go - Snapshot Retrieval
internal/service/source_retrieval.go - Evidence-Grounded Ask
internal/service/ask_service.go - LLM Client
internal/llmclient/client.go
Async Imports
- Outbox Publisher
internal/publisher/publisher.go - Kafka Consumer
internal/consumer/handler.go - Import Runner
internal/worker/runner.go
Persistence And Integrations
- GitHub Client
internal/githubclient/client.go - MySQL
internal/database/mysql.go - Redis Services
internal/cache/redis.go - Kafka
Other components
- HTTP Client
- Model API
Connections 35
- HTTP Client → API Assembly: calls API
README.md - API Assembly → Authentication: routes auth
cmd/server/main.go - API Assembly → Project Service: routes projects
README.md - API Assembly → Conversation Service: routes conversations
README.md - API Assembly → Message Service: routes messages
README.md - API Assembly → Practice Tasks: routes tasks
README.md - API Assembly → Task Evidence: routes evidence
README.md - API Assembly → Task Review: serves review
README.md - API Assembly → Repository Binding: routes binding
README.md - API Assembly → Import Requests: routes imports
README.md - API Assembly → Snapshot Retrieval: routes source
README.md - API Assembly → Evidence-Grounded Ask: routes questions
README.md - Authentication → MySQL: stores users
internal/service/auth_service.go - Project Service → Redis Services: caches details
README.md - Project Service → MySQL: reads projects
README.md - Conversation Service → MySQL: persists sessions
README.md - Message Service → MySQL: stores messages
README.md - Practice Tasks → MySQL: updates tasks
README.md - Task Evidence → MySQL: stores evidence
README.md - Task Review → MySQL: reads audit
README.md - Repository Binding → GitHub Client: resolves revision
README.md - Repository Binding → Redis Services: rate limits
README.md - Import Requests → MySQL: writes job outbox
README.md - Import Requests → Redis Services: gates duplicates
README.md - Outbox Publisher → MySQL: scans outbox
README.md - Outbox Publisher → Kafka: publishes events
README.md - Kafka → Kafka Consumer: delivers events
README.md - Kafka Consumer → Import Runner: processes jobs
internal/consumer/handler.go - Kafka Consumer → MySQL: checks job state
internal/consumer/handler.go - Import Runner → GitHub Client: fetches revision
README.md - Import Runner → MySQL: claims and stores snapshot
README.md - Snapshot Retrieval → MySQL: reads snapshots
README.md - Evidence-Grounded Ask → Snapshot Retrieval: retrieves evidence
README.md - Evidence-Grounded Ask → LLM Client: requests completion
README.md - LLM Client → Model API: calls model API
README.md