How markgrushevski/justpaint works
justpaint is a web drawing product centered on asynchronous, AI-judged drawing duels, with practice and a free-draw editor as companion modes. The principal flow is players joining a match, drawing the shared prompt, submitting vector documents, and receiving judged results that update ratings and the leaderboard. The Vue client shares a vector-editor package; the Go service coordinates match and AI workflows, persistence, and live updates. README capabilities are retained, but several client-to-API links are unverified because their callers were not sampled.
Main entry points: index.ts Route views · service.go Duel lifecycle · app.go HTTP service · http.ts HTTP client
Components 25
Web experience
- Vue application
apps/web/src/App.vue - Route views
apps/web/src/router/index.ts - Duel screen
apps/web/src/features/play/PlayView.vue - Practice screen
apps/web/src/features/practice/PracticeView.vue - Free-draw screen
apps/web/src/features/draw/DrawView.vue - Drawing gallery
apps/web/src/features/gallery/GalleryView.vue - Leaderboard
apps/web/src/features/leaderboard/LeaderboardView.vue - HTTP client
apps/web/src/core/api/http.ts
Drawing editor
- Editor host
apps/web/src/features/editor/useEditorHost.ts - Editor runtime
packages/editor/src/editor.ts - Undo history
packages/editor/src/history.ts - Vector document
packages/editor/src/document/types.ts
Game workflows
- Duel lifecycle
server/internal/game/service.go - Practice scoring
server/internal/practice/service.go - Drawing guess
server/internal/guess/service.go - AI assist
server/internal/assist/handler.go - Saved drawings
server/internal/drawings/handler.go - Ratings and ranking
server/internal/ratings/service.go - Live match updates
server/internal/ws/handler.go
AI and rendering
- AI judge
server/internal/judge/judge.go - Raster renderer
server/internal/render/render.go
Service and data
- HTTP service
server/cmd/server/app.go - Postgres
server/internal/db/db.go
Other components
- Player
- AI provider
Connections 40
- Player → Route views: opens modes
README.md - Vue application → Route views: renders routes
apps/web/src/main.ts - Route views → Duel screen: routes to
apps/web/src/router/index.ts - Route views → Practice screen: routes to
apps/web/src/router/index.ts - Route views → Free-draw screen: routes to
apps/web/src/router/index.ts - Route views → Drawing gallery: routes to
apps/web/src/router/index.ts - Route views → Leaderboard: routes to
apps/web/src/router/index.ts - Free-draw screen → Editor host: hosts editor
- Editor host → Editor runtime: creates editor
apps/web/src/features/editor/useEditorHost.ts - Editor runtime → Undo history: records commands
packages/editor/src/editor.ts - Editor runtime → Vector document: maintains document
packages/editor/src/editor.ts - Player → Duel screen: draws prompt
README.md - Duel screen → HTTP client: requests match
- Practice screen → HTTP client: requests scoring
- Free-draw screen → HTTP client: uses AI features
- Drawing gallery → HTTP client: manages drawings
- Leaderboard → HTTP client: loads rankings
- HTTP client → HTTP service: calls API
README.md - HTTP service → Duel lifecycle: registers routes
server/cmd/server/app.go - HTTP service → Practice scoring: registers routes
server/cmd/server/app.go - HTTP service → Drawing guess: registers routes
server/cmd/server/app.go - HTTP service → AI assist: registers routes
server/cmd/server/app.go - HTTP service → Saved drawings: registers routes
server/cmd/server/app.go - Duel lifecycle → Raster renderer: renders submissions
server/internal/game/service.go - Duel lifecycle → AI judge: scores drawings
server/internal/game/service.go - Practice scoring → Raster renderer: renders drawing
server/internal/practice/service.go - Practice scoring → AI judge: scores drawing
server/internal/practice/service.go - Drawing guess → Raster renderer: renders drawing
server/internal/guess/service.go - Drawing guess → AI judge: requests guess
server/internal/guess/service.go - AI assist → Raster renderer: validates preview
server/internal/assist/handler.go - Player → AI provider: AI evaluation
README.md - AI judge → AI provider: delegates scoring
README.md - Duel lifecycle → Postgres: persists match
- Practice scoring → Postgres: stores runs
- Saved drawings → Postgres: reads and writes
- Duel lifecycle → Ratings and ranking: updates Elo
README.md - Ratings and ranking → Postgres: reads rankings
- Duel lifecycle → Live match updates: publishes updates
README.md - Player → Drawing gallery: saves and reopens
README.md - Editor runtime → Raster renderer: shares rendering
README.md