How aryan-puranik/ticket_router works
Customer Support Ticket Router serves staff and customers through a Streamlit UI and FastAPI backend. Customers create tickets; staff can search, assign, prioritize, and move tickets through lifecycle stages. The service routes work using role, skill, capacity, priority, and SLA rules, while serving board and queue views and maintaining a tamper-evident audit trail. PostgreSQL is durable storage; the service rebuilds in-memory indexes and heaps at startup and persists each request as a transaction. The graph follows documented and indexed relationships; some subsystem internals were not sampled.
Main entry points: service.py Ticket Router · seed.py Demo Data Seeder · app.py Streamlit UI · main.py HTTP API
Components 13
User Interface
- Streamlit UI
app.py
Routing and Domain
- HTTP API
main.py - Ticket Router
service.py - Ticket Search
service.py - Lifecycle and Roles
models.py - Audit Hash Chain
audit.py - Runtime Settings
config.py
In-Memory Structures
- B+ Trees
bplus_tree.py - Indexed Heaps
indexed_heap.py
Persistence
- Database Adapter
db.py - PostgreSQL
- Demo Data Seeder
seed.py
Other components
- Customers and Staff
Connections 15
- Customers and Staff → Streamlit UI: use
README.md - Streamlit UI → HTTP API: HTTP requests
README.md - HTTP API → Ticket Router: dispatches
main.py - Ticket Router → Ticket Search: indexes and searches
service.py - Ticket Router → Lifecycle and Roles: uses rules
service.py - Ticket Router → Audit Hash Chain: creates and verifies
service.py - Ticket Router → B+ Trees: uses indexes
service.py - Ticket Router → Indexed Heaps: uses queues
service.py - Ticket Router → Database Adapter: loads and persists
README.md - Database Adapter → PostgreSQL: reads and writes
db.py - HTTP API → Runtime Settings: uses configuration
main.py - Streamlit UI → Runtime Settings: uses API defaults
app.py - Demo Data Seeder → Database Adapter: bulk loads data
seed.py - Demo Data Seeder → Audit Hash Chain: builds audit entries
seed.py - Demo Data Seeder → Lifecycle and Roles: uses domain values
seed.py