How headmaster21/counter-tours-operator works
Counter is a multi-tenant tour-operator operations platform, with separate Angular apps and Spring services; each tenant has its own realm and service databases. The principal workflow runs from booking through dispatch assignment and authorization, GPS tracking, service closure, and optional billing, with reporting and notifications as supporting capabilities. The README documents these domain relationships and the Kafka event architecture. Sampled source confirms route selection and tracking queries, but most service internals were not sampled, so the diagram does not infer finer-grained calls.
Main entry points: gateway API gateway · dispatch-service Dispatch · Topics.java Kafka events · tracking-service Tracking
Components 23
User applications
- Backoffice
frontend/projects/backoffice/src/app - Booking site
frontend/projects/booking-site/src/app - Partner portal
frontend/projects/partner-portal/src/app - Driver app
frontend/projects/driver-app/src/app
Reservations and operations
Tracking and insights
- Tracking
services/tracking-service - Billing
services/billing-service - Reporting
services/report-service - Notifications
services/notification-service
Platform services
- API gateway
infrastructure/api-gateway/src/main/java/com/appsworks/counter/gateway - Tenant management
services/tenant-service - Keycloak
Shared infrastructure
- Kafka events
libs/common-lib/src/main/java/com/appsworks/counter/common/events/Topics.java - Transactional outbox
libs/common-lib/src/main/java/com/appsworks/counter/common/outbox/OutboxPublisher.java - Shared services library
frontend/projects/shared/src/lib
Other components
- Operations staff
- Booking customer
- Driver
- GPS / Traccar
Connections 34
- Operations staff → Backoffice: operates
- Booking customer → Booking site: books through
- Booking customer → Partner portal: books through
- Driver → Driver app: uses
- Backoffice → API gateway: calls services via
- Booking site → API gateway: calls services via
- Partner portal → API gateway: calls services via
- Driver app → API gateway: calls services via
- API gateway → Catalog: routes to
- API gateway → Pricing: routes to
- API gateway → Bookings: routes to
- API gateway → Fleet: routes to
- API gateway → Dispatch: routes to
- API gateway → Tracking: routes to
- API gateway → Billing: routes to
- API gateway → Reporting: routes to
- API gateway → Tenant management: routes to
- Keycloak → API gateway: issues JWTs for
- Bookings → Dispatch: confirmed booking creates order
- Fleet → Dispatch: validates assignment
- Dispatch → Tracking: authorization opens trip
- GPS / Traccar → Tracking: sends positions and events
- Tracking → Dispatch: updates service status
- Dispatch → Billing: service closure feeds billing
- Dispatch → Reporting: service closure updates manifest
- Dispatch → Fleet: closure updates odometer
- Bookings → Kafka events: publishes domain events
services/booking-service/src/main/java/com/appsworks/counter/booking/application/WebBookingService.java - Dispatch → Kafka events: publishes domain events
- Tracking → Kafka events: publishes domain events
- Kafka events → Notifications: drives notifications
- Kafka events → Billing: delivers domain events
services/billing-service/src/main/java/com/appsworks/counter/billing/application/InvoiceService.java - Transactional outbox → Kafka events: relays events
- Tenant management → Backoffice: provides tenant profile
- Shared services library → Backoffice: shared UI and API support