Leo’s Build Log
PostsProjectsAbout한국어

AlgoSu

An algorithm study tool that carries a submission through GitHub saving to AI code review

Screens

Overview

Period
Feb 2026 – present (live)
Team
Solo
Role
Planning · design · frontend · backend · infra · operations

The problem

An algorithm study group needed one place for problems, code submissions, solution history and code review. Building and running it alone also meant finding a way to ship AI-agent-written code with confidence.

The approach

  1. 01
    One flow from submission to AI reviewA submission is saved to GitHub and reviewed by Claude in sequence, with progress shown live.
  2. 02
    Slow work runs asynchronouslyGitHub saves and AI analysis run off a queue, and a saga tracks each submission so delays and failures are retried and recovered.
  3. 03
    Reviewing together in the study roomEach problem gathers members' code and AI scores, with a shared study note.

Architecture

ArchitectureClientEdgeServicesData · queueWorkers · externalRESTSSE statuspublishstatus eventsubscribe
FrontendNext.js · Monaco Editor
GatewayAuth · API entry · SSE
Redisstatus event
IdentityUsers · studies
ProblemProblems · deadlines
SubmissionSaga Orchestrator
Identity DB
Problem DB
Submission DB
RabbitMQJob queue · DLQ (failures)
Claude API
GitHub App
GitHub WorkerCommits code
AI AnalysisFastAPI
  1. 01
    Service boundariesIdentity, Problem and Submission each own their database
  2. 02
    Async splitGitHub Worker and AI Analysis consume from the queue
  3. 03
    Status deliverySubmission → Redis event → Gateway → SSE

User scenario

User scenarioUserSystemFailure pathstatus event · SSEyesrestart
Member
Pick a problemWeekly problems · due
Submit codeWrite in the editor
Watch progressSave → commit → review (SSE)
AI feedbackScore · review
Dashboard
Save submissionSubmission DB · start saga
Publish to RabbitMQGitHub and AI jobs split
GitHub WorkerCommit to repo
AI AnalysisClaude API
Step failed?
Keep in DLQ · retryStatus set to failed
Resume sagaAutomatic on restart
  1. 01
    User flowPick a problem → submit → progress → feedback → dashboard
  2. 02
    System flowSave → publish to queue → GitHub commit → AI analysis → SSE
  3. 03
    Failure pathKept in the DLQ; unfinished sagas resume on restart

My work

  1. 01
    Service boundariesGateway, Identity, Problem and Submission services plus GitHub and AI workers, each service owning its own database.Next.js · NestJS · TypeORM · FastAPI · PostgreSQL · RabbitMQ · Redis
  2. 02
    Submission saga and live statusState transitions, timeouts and retries for submit → GitHub save → AI analysis, with progress pushed over Redis and SSE.Saga · RabbitMQ · Redis events · SSE · GitHub App · Claude API
  3. 03
    Role-based AI agentsWork split by area (gateway security, submission flow, DB schema) to keep each agent's context narrow, with design decisions recorded apart from AI implementation.ADRs · dev log
  4. 04
    Verifying and shipping AI-written codeLint, type checks, tests and security scans in CI, images shipped to k3s through GitOps, and operations watched through metrics.GitHub Actions · GHCR · Argo CD · k3s · Prometheus · Grafana

Why these tools

Saga Pattern · 상태 머신No way to tell where a multi-service submission failedSix states track progress and failure; unfinished work resumes on restart
RabbitMQ · DLQGitHub and AI work with very different durations coupled synchronouslyAsync split; repeatedly failing messages are kept
Redis Pub/Sub · SSEDelivering submission and analysis status in real timeServer push, with a shared subscriber to avoid exhausting connections
NestJS · PostgreSQLResponsibilities and data ownership mixed across servicesSeparate services, each owning its database
k3s · ArgoCD · GitHub ActionsRunning many services on a single ARM VMLightweight cluster, GitOps deploys, only changed services checked and built
Prometheus · Grafana · Loki · Structured LoggingNo evidence for resource settings or intermittent errorsMetrics to tune connection pools and resources, structured logs to trace errors

Improvements

  1. 01
    A stuck rolloutA health-check regression and a missing env var kept the new version from starting, hidden because old pods still answered. Fixed the check and config and resealed the SealedSecret.
  2. 02
    Gateway reading the Identity DB directlyMoved to Identity API calls so the boundary holds in code, weighing the added internal HTTP calls and failure coupling.

Related posts