Kompass

Koder Kompass — Universal Organization Management Engine

  • *rea:*Foundation
  • *ath:*services/foundation/kompass/engine
  • *ind:*Universal multi-tenant organization management engine

Role in the stack

Koder Kompass is the canonical multitenant model and the engine behind Koder Mosaic. It treats organization as a typeagnostic 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

  • *erminology Engine*— "Department" becomes "Ministry" (church), "Grade" (school), "Unit" (condo), "Division" (military); every label is customizable
  • *rg Type Templates*— oneclick setup for 15+ org types with preconfigured modules, roles, workflows
  • *odular Activation*— each org enables only the modules it needs
  • *ulti-Org Native*— one user belongs to multiple orgs (company + church + condo) with instant switching
  • *hitelabel engine*— third parties building their own organizationmanagement 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 + DomainWide Delegation (RS256 JWT minted with golangjwt/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 KOMPASS045). Currentuser bootstrap, member lifecycle/import APIs, orgstructure mutation APIs, and module activation contracts are available for Mosaic startup, navigation, directory workflows, settings, and orgchart editing.

Source: ../home/koder/dev/koder/meta/docs/stack/modules/kompass.md