Koder Kompass — Universal Organization Management Engine

  • Area: Foundation
  • Path: services/foundation/kompass/engine
  • Kind: Universal multi-tenant organization management engine

Role in the stack

Koder Kompass is the canonical multi-tenant model and the engine behind Koder Mosaic. It treats organization as a type-agnostic concept: a company, nonprofit, school, church, condominium, sports club, cooperative, union, or franchise is just a different configuration of the same core entity. Every SaaS product that needs tenant isolation consumes Kompass — users authenticate via Koder ID, then operate inside one or more organizations.

Distinctive features

  • Terminology Engine — "Department" becomes "Ministry" (church), "Grade" (school), "Unit" (condo), "Division" (military); every label is customizable
  • Org Type Templates — one-click setup for 15+ org types with pre-configured modules, roles, workflows
  • Modular Activation — each org enables only the modules it needs
  • Multi-Org Native — one user belongs to multiple orgs (company + church + condo) with instant switching
  • White-label engine — third parties building their own organization-management products license Kompass as the foundation

Primary couplings

Consumer Relationship
services/foundation/kompass/app Flagship Koder B2C product built on Kompass
services/foundation/id/platform Authenticates users into orgs
data/kdb Stores the org graph, members, permissions, configs
Every multi-tenant SaaS Uses Kompass as its tenant model
Google Workspace OrgUnit/Group sync imports Workspace hierarchy into Kompass orgs

Interfaces

Surface Contract
GET /api/v1/me/bootstrap Authenticated startup payload: user, orgs, memberships, roles, permissions, modules, default org
GET /api/v1/organizations/{id}/modules Active module list for an org
GET /api/v1/organizations/{id}/module-contracts, POST /api/v1/organizations/{id}/modules Module activation contracts with org-type defaults, dependencies, permissions, and audit
GET /api/v1/members, GET /api/v1/units, GET /api/v1/vacancies Operational counts and screens consumed by Mosaic
POST /api/v1/units/{id}/move, POST /api/v1/units/{id}/manager, POST /api/v1/units/{id}/vacancies, POST /api/v1/units/mutations Org chart mutation API: reparent, manager, vacancies, and batched visual-editor changes
POST /api/v1/members/invitations Creates member invitations with expiry and resend support
POST /api/v1/members/import/preview, POST /api/v1/members/import/commit CSV import validation, deduplication, and commit flow
POST /api/v1/members/bulk, GET /api/v1/members/export Bulk lifecycle actions and filtered CSV export
GET/POST /api/v1/members/{id}/notes, GET/POST/DELETE /api/v1/members/{id}/tags Member profile notes and tagging
GET /api/v1/terminology/{orgId} Resolved terminology for org-specific labels

Google Workspace Sync

Kompass can mirror a Google Workspace org chart into its unit tree via the GoogleWorkspaceSyncService (internal/services/google_workspace_sync.go):

  • SyncOrgUnits — creates Kompass units from Google OrgUnits using a service account + Domain-Wide Delegation (RS256 JWT minted with golang-jwt/v5)
  • SyncGroups — creates units from Google Groups and populates member persons
  • Routes: POST /api/v1/google-suite/orgs/{orgId}/sync/orgunits|groups and POST /api/v1/google-suite/sync/users

Status

Active — core orgunitperson APIs functional. Google Workspace sync complete (ticket KOMPASS-045). Current-user bootstrap, member lifecycle/import APIs, org-structure mutation APIs, and module activation contracts are available for Mosaic startup, navigation, directory workflows, settings, and org-chart editing.