Debate Domain Prototype
This project explores debate-domain modeling for structured discussion systems.
Instead of storing discussions as chronological comment threads, debates are modeled as explicit argument structures.
This repository is not intended to be a finished discussion platform, but a prototype for experimenting with structured debate models.
Most discussion platforms implement conversations as simple comment trees.
However, real discussions usually have structure:
- a central claim
- supporting arguments
- counterarguments
- moderation workflows
- reporting and review
- audit trails
These structures often exist implicitly but are rarely modeled explicitly.
Glitter experiments with treating debate structure as a first-class domain model.
The prototype represents discussions using several primary entities.
Thesis
├─ Argument
│ └─ Counter
├─ Argument
│ └─ Counter
└─ ...
| Entity | Description |
|---|---|
| Thesis | A central claim or topic under discussion |
| Argument | Supporting reasoning attached to a thesis |
| Counter | Counterarguments targeting specific arguments |
| ContentReport | Moderation workflow for problematic content |
| UserRole | Role system for moderators and operators |
| AuditLog | Audit trail for moderation and system events |
The goal is to represent debate structure rather than a flat comment tree.
The debate domain is implemented as a modular component within the project.
thinking/
├─ models.py
│ Domain entities
│
├─ services/
│ Domain write orchestration
│ ├─ reporting.py
│ └─ moderation.py
│
├─ queries/
│ Reusable read models
│ ├─ thesis_detail.py
│ ├─ moderation.py
│ └─ reporting.py
│
├─ policies.py
│ Shared domain policy
│ ├─ moderation roles
│ ├─ visibility rules
│ └─ status transitions
│
└─ interfaces/
├─ views.py
└─ api_views.py
- Domain-driven discussion model
- Reusable debate-domain module
- Service/query separation
- Shared policy layer
- SSR and API reuse of the same read models
Traditional forum:
Post
└─ Comment
└─ Reply
Structured debate model:
Thesis
├─ Argument
│ └─ Counter
├─ Argument
│ └─ Counter
└─ ...
This structure allows clearer reasoning chains and moderation workflows.
The prototype currently demonstrates:
- structured debate entities
- argument/counterargument relationships
- moderation workflows
- reporting system
- audit logging
- role-based moderation
- service/query separation
- shared policy layer
- SSR + API reuse of read models
The system supports both:
- server-rendered pages
- JSON API endpoints
The project uses Django with MariaDB/MySQL by default.
Create a virtual environment and install dependencies:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtEnvironment variables are loaded from the file specified by APP_ENV_FILE.
/volume1/hwi/config/env/DjangoProto8/.env
This path is specific to the production server and does not need to be used in development.
For local development:
cp .env.example .env
export APP_ENV_FILE=.envRun database migrations:
./run_manage.sh migrateStart the application server:
./run_gunicorn.shThe test suite currently includes:
- integration tests
- policy-layer tests
This repository is an early prototype.
It demonstrates:
- debate-domain modeling
- moderation/report workflows
- architectural separation (services / queries / policies)
It does not aim to be a production-ready platform.
The longer-term direction is to explore whether the debate model could become a reusable component for systems such as:
- AI-assisted discussion platforms
- knowledge review tools
- community forums
- research discussion environments
- decision review systems
Rather than building a single platform, the project experiments with a debate-domain engine that other systems could embed.
Feedback is welcome, especially regarding:
- debate-domain modeling
- moderation/report architecture
- service/query separation
- policy-layer design
- possible real-world use cases
Website
glitter.im
Repository
Debate Engine
TBD