Platform Architecture
External integration referenceThis page describes the technical architecture of the Altafid platform. It is intended for integration architects and developers who need to understand service boundaries, data flows, and where API requests are handled.
Overview
The Altafid platform is a multi-service system built on a microservices architecture. Client applications and third-party integrations reach the platform through an API Gateway, which routes requests to the appropriate backend service. The two primary services are the Core API (entity management, authentication, configuration) and the Analytics service (event ingestion and time-series queries).
https://api.altafid.dev.altafid.net.
System diagram
Service responsibilities
API Gateway
The gateway is the single entry point for all external traffic. It handles:
- TLS termination and request routing to backend services
- JWT token validation (tokens issued by the Core API)
- Rate limiting and traffic shaping
- Forwarding tenant and user identity headers to downstream services
Core API Service
The Core API is the primary application service. It manages all business entities and the workflows around them:
- Identity and access: authentication, MFA, session management, staff provisioning
- Entity management: contacts, organisations, households, notes, portfolio linkage
- Configuration: tenant settings, branding, domains, pipeline stages, segments, sources
- Data operations: tabular exports (CSV / XLSX), saved view management
- File storage: attachment upload coordination via presigned S3 URLs
- Event publishing: writes analytics events to an outbox table for delivery to the Analytics service
Technology: Java 21 · Spring Boot · PostgreSQL · Redis
Analytics Service
The Analytics service is a dedicated data service focused on event ingestion and querying. It is separate from the Core API to avoid coupling real-time request handling to analytical query load.
- Event ingestion: accepts structured events from the Core API and from direct API callers
- Query execution: runs aggregate queries with time bucketing, filtering, and grouping
- Data storage: events are stored in a dedicated PostgreSQL database with scheduled hourly rollups for efficient querying
Technology: Java · Spring Boot · PostgreSQL
Data Layer
| System | Purpose |
|---|---|
| PostgreSQL (Core) | Primary transactional database — all entity records, configuration, and audit data |
| PostgreSQL (Analytics) | Event store and rollup tables for analytical queries |
| Redis | MFA token cache, session invalidation, distributed locking for export jobs |
| S3 Object Storage | Note attachments, tenant branding assets (logo, favicon) |
Common data flows
Creating a contact
Querying analytics
Authentication flow
See Authentication for full details on token lifetimes, the refresh flow, and MFA setup.
Event flow: Core to Analytics
The Core API publishes events to the Analytics service using a reliable outbox pattern, ensuring no events are lost even if the Analytics service is temporarily unavailable.
Events can also be sent directly to the Analytics service via the event ingestion API if you are instrumenting your own integration.
Integration points for third parties
As a third-party integrator, you interact with the platform through these surfaces:
| Surface | Base path | Documentation |
|---|---|---|
| Authentication | /api/auth, /api/mfa | Authentication |
| Contacts | /api/contacts, /api/v2/contacts | Contacts |
| Organisations | /api/organisations, /api/v2/organisations | Organisations |
| Households | /api/households, /api/v2/households | Households |
| Notes | /api/notes | Notes |
| Staff management | /api/tenant-staff | Staff |
| Saved Views | /api/v1/views | Saved Views |
| Tenant admin | /api/tenants | Tenants |
| Exports | /api/exports | Exports |
| Analytics queries | /api/analytics/query | Analytics |
| Analytics event ingest | /api/analytics/events | Analytics — Events |
| Configuration lookups | /api/core/platformconfigs/v1/contacts/stages, /api/core/geo/v1/countries, etc. | Dynamic configuration |