How riyanamanda/helpdesk-backend works
This is a Go/Echo REST API for internal IT helpdesk operations. Employees and administrators use the HTTP API for authentication, ticket handling, user/profile administration, feedback, and supporting lookups; services persist domain data and return API responses. Ticket and user workflows can also produce queued events that the background worker publishes and processes for email. The README describes a handler–service–repository architecture. Some domain implementations and integrations were not excerpted, so those branches are shown only where wiring is explicit or documented.
Main entry points: main.go HTTP API · ticket/service.go Ticket management · auth/service.go Authentication · repository.go Event outbox
Components 21
API and workers
- HTTP API
cmd/api/main.go
Helpdesk domains
- Authentication
internal/auth/service.go - Ticket management
internal/ticket/service.go - User management
internal/user/service.go - Categories
internal/category/service.go - Divisions
internal/division/service.go - Feedback
internal/feedback/service.go - User profiles
internal/profile/service.go - Dashboard
internal/dashboard/service.go - Access control
internal/rbac/permission_service.go - Queue and SIMGOS
internal/ihs
Infrastructure
- PostgreSQL
internal/platform/database/postgres.go - SIMGOS database
- Redis cache
internal/platform/redis/client.go - Object storage
internal/platform/storage/storage.go
Event processing
- Event outbox
internal/outbox/repository.go - RabbitMQ
internal/platform/rabbitmq/rabbitmq.go - Worker consumers
internal/worker/consumer.go - Outbox publisher
internal/worker/publisher.go - Email delivery
internal/mailer/mailer.go
Other components
- API user
Connections 33
- API user → HTTP API: sends requests
README.md - HTTP API → Authentication: registers routes
cmd/api/main.go - HTTP API → Ticket management: registers routes
cmd/api/main.go - HTTP API → User management: registers routes
cmd/api/main.go - HTTP API → Categories: registers routes
cmd/api/main.go - HTTP API → Divisions: registers routes
cmd/api/main.go - HTTP API → Feedback: registers routes
cmd/api/main.go - HTTP API → User profiles: registers routes
cmd/api/main.go - HTTP API → Access control: registers routes
cmd/api/main.go - HTTP API → Queue and SIMGOS: registers routes
cmd/api/main.go - HTTP API → Dashboard: registers routes
- HTTP API → PostgreSQL: connects
cmd/api/main.go - HTTP API → SIMGOS database: optionally connects
cmd/api/main.go - HTTP API → Redis cache: connects
cmd/api/main.go - Ticket management → Object storage: uploads attachments
internal/ticket/service.go - User profiles → Object storage: uploads avatars
internal/profile/service.go - Ticket management → Categories: looks up categories
internal/ticket/service.go - Ticket management → Divisions: looks up divisions
internal/ticket/service.go - Ticket management → User management: looks up users
internal/ticket/service.go - Authentication → Access control: gets permissions
internal/auth/service.go - Authentication → Redis cache: stores sessions
internal/auth/service.go - Authentication → RabbitMQ: publishes reset event
internal/auth/service.go - User management → Event outbox: records events
internal/user/service.go - Ticket management → Event outbox: records events
internal/ticket/service.go - HTTP API → RabbitMQ: connects
cmd/api/main.go - HTTP API → Worker consumers: starts separately
- Outbox publisher → Event outbox: reads pending events
- Outbox publisher → RabbitMQ: publishes events
- Worker consumers → RabbitMQ: consumes messages
- Worker consumers → Email delivery: delivers email
- HTTP API → Event outbox: initializes repository
cmd/api/main.go - HTTP API → Dashboard: wires service
- HTTP API → Queue and SIMGOS: wires SIMGOS services
cmd/api/main.go