System Architecture
Overview
Trekker is a multitenant, micro service system designed to support multiple organizations or clients.
It is made up of multiple docker container as micro service component that are deployed in logical layers within the architecture.
The logical architecture are both isolated and shared components to ensure scalability, security, and efficient resource utilization. It consists of three major layers:
- Ansible Trekker Client : client/tenant specific services (share nothing)
- Ansible Trekker Infra : general component used by all client (share everything)
- Ansible Platform : pre-requisite for all server and ad-hoc component on as needed basis
High-Level Architecture

1. Ansible Trekker Client (Share Nothing)
This layer consists of independent services and data stores that operate in isolation for each tenant. These services ensure data security and allow custom configurations for each client.
-
Components:
- Contact Tracing: Tracks interactions for health or security purposes.
- SnapManhour: Manages project man-hours and timesheets, written in Go.
- CouchDB: Tenant-specific NoSQL database for document storage.
- Trekker Application: The primary client-facing application.
- Mariadb Schema: Main storage of raw GPS data from Trekker application.
- Keycloak Realm: Isolates system users, which can include attributes like roles, credentials, and permissions
-
Key Characteristics:
- Isolation: Each tenant operates independently with its own data and services.
- Customization: Tailored configurations for each client.
- Subdomain Access: Each tenant is automatically provided with a unique subdomain for access. For example, a client "MLNG7" would have the subdomain:
https://mlng7.app.trekker.my.
2. Ansible Trekker Infra (Share Everything)
This layer provides shared infrastructure services that are used by all tenants. It is designed to maximize resource efficiency while maintaining logical isolation.
-
Components:
- Snapheadcount: Shared headcount management service written in Go.
- Georest: Provides location-based data services, including APIs for positions and geofences, implemented in Go.
- Cloud Config: Centralized configuration management service.
- Trekker WebUI: Shared user interface for managing Trekker services, developed in Go.
- Keycloak: Identity and access management system for authentication and authorization.
- NATS MQ/Streaming: High-performance message queue and streaming system for inter-service communication.
- MariaDB: A shared database service that supports multiple tenants, possibly configured for master-master replication.
- TrekkerTree: A hierarchical data management service for structuring resources and relationships.
-
Key Characteristics:
- Efficiency: Resources are shared across tenants to reduce costs.
- Scalability: Can handle increasing numbers of tenants without significant resource overhead.
3. Ansible Platform (Ad-hoc)
This layer provides foundational tools and services that support the entire system. These are not tenant-specific but are essential for the operation and monitoring of the platform.
-
Components:
- Docker: Containerization platform for deploying and managing services.
- Traefik: Reverse proxy and load balancer for routing tenant and service-specific traffic.
- Grafana + Prometheus: Monitoring and visualization tools for observing system performance and generating alerts.
-
Key Characteristics:
- Monitoring: Ensures system reliability through proactive monitoring and alerting.
- Deployment Flexibility: Enables rapid deployment of new services or scaling of existing ones.
Technology Stack
Backend
- Go: Services like WebUI, Snapheadcount, and Georest.
- MariaDB: Relational database.
- CouchDB: NoSQL document database for tenant-specific storage.
- NATS MQ: High-performance messaging system.
- Python: Scripts for running various server services such as Cron scheduling, backup procedures etc.
Frontend
- Flutter Web: Used for building modern, responsive web interfaces.
Infrastructure
- Ansible: Configuration management and deployment.
- Docker: Containerization.
- Traefik: Load balancing and reverse proxy.
- Prometheus + Grafana: Monitoring and analytics.
Conclusion
Trekker’s architecture is a robust multitenant system that balances isolation, shared resources, and scalability. By leveraging modular components, shared services, and modern deployment practices, Trekker ensures high performance, security, and flexibility for its tenants.