$ show TabbycatDebate/tabbycat
Tabbycat is a Django web application for managing debate tournaments, supporting both British Parliamentary and two-team formats. It provides comprehensive tournament management features including draw generation (power-paired, round-robin, elimination, random), adjudicator allocation (Hungarian algorithm, preformed panels), ballot entry and results computation, speaker and team standings, break qualification, check-ins, notifications, and venue management. The system uses a monolith architecture with Django REST Framework for API access, Django Channels for real-time updates (WebSockets), and a Vue.js frontend for interactive drag-and-drop interfaces. It is deployed with PostgreSQL, Redis, and Nginx, and supports Docker and Heroku deployment. The codebase is well-structured with extensive use of mixins, base classes, and design patterns, though it exhibits some tight coupling between apps and a large migration history.
The LLM identified 5 files worth highlighting for reuse:
Implements the Hungarian algorithm for optimal adjudicator assignment to debates, with configurable cost functions based on conflicts, scores, and history. Demonstrates a non-obvious combinatorial optimization pattern that could be extracted for other assignment problems.
Provides a generic, extensible standings generation framework with pluggable metric and ranking annotators. Supports SQL window functions and Python-based computations. The base class pattern allows easy addition of new metrics and rankings, reusable for any competition scoring system.
A well-structured base class for CSV-to-model importers with error handling, duplicate detection, and an interpreter pattern for flexible column mapping. Demonstrates robust data import patterns that can be adapted for other domains.
Implements debate result classes using the Template Method pattern for loading, validating, and saving scoresheets. A factory function selects the appropriate subclass based on tournament configuration. The design encapsulates complex scoring logic and could be reused for other multi-judge event scoring.
A reusable Vue 3 composable for managing WebSocket connections with automatic reconnection and lifecycle management. Demonstrates clean separation of concerns for real-time features.