How huythedev/k23oj works
K23OJ is a Django-based online judge for programming practice and contests. The principal workflow is problem discovery, code submission, sandboxed judging, and publication of results; contest formats and ratings add a distinct competition stage. The map also includes local problem data, judge-to-site synchronization, live updates, and asynchronous tasks. Edges use README statements or shown source references; unsampled runtime wiring is omitted or marked unverified.
Main entry points: judge_handler.py Judge Protocol Handler · models/submission.py Submission Records · contest.py Contest Records · views/submission.py Submission Views
Components 22
Problem Platform
- Problem Views
judge/views/problem.py - Problem Archive
judge/models/problem.py - Problem Data
judge/models/problem_data.py - Submission Views
judge/views/submission.py - Submission Forms
judge/forms.py - User Profiles
judge/models/profile.py
Judging System
- Submission Records
judge/models/submission.py - Judge Protocol Handler
judge/bridge/judge_handler.py - Packet Transport
judge/bridge/base_handler.py - Judge Runtimes
judge/models/runtime.py - Judge Cache Sync
judge/caching.py
Contest Scoring
- Contest Records
judge/models/contest.py - Format Registry
judge/contest_format/registry.py - Default Scoring
judge/contest_format/default.py - Legacy IOI Scoring
judge/contest_format/legacy_ioi.py - Contest Ratings
judge/ratings.py
Async and Live Updates
- Background Tasks
judge/tasks/submission.py - Event Publisher
judge/event_poster.py - Websocket Service
websocket/daemon.js
UI and Localization
- Date Filters
judge/jinja2/datetime.py - Time Utilities
judge/utils/timedelta.py
Other components
- Participant
Connections 21
- Participant → Problem Views: browses problems
- Participant → Submission Views: submits code
- Submission Views → Submission Forms: uses forms
- Submission Views → Submission Records: creates submissions
- Problem Views → Problem Archive: displays archive
- Problem Archive → Problem Data: uses problem data
judge/models/problem.py - Submission Records → Judge Protocol Handler: enters judging
- Judge Protocol Handler → Packet Transport: uses transport
judge/bridge/judge_handler.py - Judge Protocol Handler → Submission Records: updates results
judge/bridge/judge_handler.py - Judge Protocol Handler → Problem Archive: loads problem
judge/bridge/judge_handler.py - Judge Protocol Handler → Judge Cache Sync: syncs cache
judge/bridge/judge_handler.py - Judge Protocol Handler → Background Tasks: dispatches tasks
judge/bridge/judge_handler.py - Contest Records → Format Registry: resolves format
judge/models/contest.py - Format Registry → Default Scoring: registers formats
judge/contest_format/__init__.py - Format Registry → Legacy IOI Scoring: registers formats
judge/contest_format/__init__.py - Contest Records → Submission Records: scores submissions
judge/models/contest.py - Contest Records → Contest Ratings: calculates ratings
judge/models/contest.py - Contest Records → User Profiles: tracks participants
judge/models/contest.py - Event Publisher → Websocket Service: publishes live events
- Submission Records → Event Publisher: announces updates
- Date Filters → Time Utilities: formats times