Docs·f32086f3·Updated Dec 4, 2026·105 ADRs

Services

10 microservices compose the Karmyq platform.

Auth Service

:3001
criticalproduction

Foundation service - no dependencies on other services. Sprint 132 PR A (ADR-099): auth.user_tags is the matching skill source, with nullable skill_slug referencing auth.skill_vocabulary. Legacy /users/:userId/skills routes removed; Sprint 133 PR A (ADR-100): opt-out active co-member skill visibility and exact community discovery; auth.user_skills dropped. Sprint 133 PR B (ADR-100): auth.skill_endorsements (one row per endorser+tag, revision job ids); DELETE /auth/profile/tags/:tagId publishes one skill_endorsement_changed per cascaded active vouch after commit. Events ride the dedicated karmyq-skill-endorsement-social-graph queue (BUG-060).

27 APIs0 deps3 infra

Community Service

:3002
criticalproduction

Sprint 47: Group Communities — community_type field, activities + activity_participants tables, activities API endpoints, activity_joined event Sprint 132 BUG-061: POST /communities/:communityId/members is admin-only (invited_by = JWT caller); PUT/DELETE /communities/:id and norm create/approve/delete authorize the JWT caller, ignoring body ids.

48 APIs1 deps3 infra

Request Service

:3003
criticalproduction

Server-driven UI: Schema API provides dynamic form definitions. Admin API enables zero-code request type creation. Sprint 43: feed_events table logs impressions/outcomes for weight tuning (ADR-048). match_completed uses karmyq-completion-dispatch with stable jobs fanned out to three service-specific completion queues; the legacy karmyq-events handlers were removed in Sprint 134 PR L. Sprint 134 PR L (BUG-068): the dead POST and GET /matches/:matchId/feedback routes are retired, so request-service no longer publishes interaction_feedback_submitted. Sprint 132 BUG-061: DELETE /requests/:id and POST/PUT/DELETE /offers authorize the JWT caller, ignoring body user_id/offerer_id. Sprint 133 PR V (BUG-065/BUG-064): GET /requests lists only what GET /requests/:id would open (one requestReadableSql boundary), community reads check live membership, and standing offers are readable by the offerer and live community members only, with a foreign offer answering 404 like a missing one. Sprint 134 PR L2 removes the dead FeedComposer and health-average reads; the live social-karma feed uses quality weight w clamped to [0,1], default 0, with strength=(1-w)*(2*activity+density)/3+w*quality. Activity retains min(100,matches*2); density contribution is capped at 100. At w=0, density 12 with 50+ matches returns 100 / Thriving and 25 matches with density 0.5 returns 50 / Growing. Per-community persistence and a quality signal source belong to a separate planned PR. Sprint 139 (BUG-097): GET /offers hides a flagged or elapsed offer only when it is active and the caller is not its offerer (AND (o.status <> 'active' OR o.offerer_id = $2 OR unexpired), inside the unchanged readable boundary), so owners see their own expired offers and matched/withdrawn history keeps expired rows; list items gain expires_at and expired (additive). Holds still refuse an expired offer. Sprint 139 (BUG-082): successful SQL queries log at debug only. No endpoint, schema or event change.

70 APIs3 deps3 infra

Reputation Service

:3004
criticalproduction

Sprint 126 (ADR-096): the match_completed payload is UNCHANGED, but reputation's projection of it is now atomic, idempotent, and timestamp-preserving. One transaction per match under pg_advisory_xact_lock; all writes ON CONFLICT DO NOTHING against uq_karma_match_projection / uq_activity_match_projection, so redelivering a job re-writes nothing. Karma is awarded in at most 3 shared request communities, selected from history STRICTLY BEFORE (completed_at, match_id). Rows carry the stored matches.completed_at, never NOW(). The payload is treated as a message, not a record: participants and status are re-read from the database under the lock and a disagreeing payload is rejected. Badges, provider metrics and trust evolution remain subscriber-owned and live-only — the historical backfill (npm run backfill:standing, dry-run by default) never replays them. Sprint 128 (PR C): the backfill PREVIEW derives its trust inputs from the projected post-apply karma rows rather than the replayed match list, so analyzeStandingBackfill scoreBuckets and providerEligibility match what updateTrustScore then stores. Breadth is global, so a membership with no local history but activity elsewhere scores 1, not 0; a member with no history anywhere still scores 0, and 1 is not a floor. providerEligibility counts provider-profile/community pairs keyed provider_id|community_id, and its 1/20/40/60 floors remain fixed what-if scenarios rather than the community configured provider_min_personal_trust_score. No formula, floor, filter, endpoint, schema or event change. Sprint 131 D9: the effective-params cache client is ioredis 6 (nested in this workspace; bull stays on ioredis 5), RESP3 with RESP2 fallback, v5 retry backoff pinned so Redis-outage fallback timing is unchanged. match_completed uses karmyq-completion-reputation (the legacy karmyq-events handler was removed in Sprint 134 PR L); standing policy is unchanged. Sprint 134 PR L (ADR-101 amendment, BUG-068): interaction_feedback_submitted and its trust_scores-averaging handler are retired, so reputation-service is no longer an EVENT_CONSUMERS entry and starts no karmyq-events-reputation queue. Sprint 134 PR L2 drops requests.interaction_feedback and seven retired average/count columns; cron/cache/fallback share one metrics reader. Private feedback.feedback stays live. Both nightly loops isolate community failures. Density is numeric(20,4); snapshot growth and cached trend percentage are numeric(20,2), retaining scales and allowing all-time density and growth beyond the legacy limits. Sprint 134 BUG-077/BUG-079: the badge insert supplies reputation.badges.name (NOT NULL); the provider completion-rate update and the badge check each isolate their own failure, so only the karma projection fails a match_completed job; user trust evolution coerces NUMERIC strings before nudging. No endpoint, schema, event or queue change. Sprint 139 (BUG-080): provider completion_rate = completed / (completed + cancelled) over the responder's matches (0 with no terminal outcome; ongoing and legacy 'accepted' ignored), shared by the match_completed refresh, the fail-fast manual backfill and a new provider phase of the existing 03:30 job (refreshAllProviderTrustScores, per-profile isolation), so a cancellation is reflected by the next successful nightly run. Sprint 139 (BUG-081): trust-config, effective-params and trust-evolution return numeric weights/priors (NULL user override = inherit stays NULL), and effective-params cache hits are normalized on read. Sprint 139 (BUG-082): successful SQL queries log at debug only. No endpoint, schema, event, queue or dependency change.

24 APIs1 deps3 infra

Notification Service

:3005
importantproduction

Subscribes to platform events. directed_request_created uses only karmyq-directed-notifications; live lookup requires open/unexpired asks; terminal jobs are acknowledged without a new invitation. Idempotent per user/request inserts and outbox delivery acknowledgement prevent duplicates/lost intent. ADR-099 accepts notification-service updating only delivered_at in request-service-owned inventory.borrow_notification_outbox. match_completed uses karmyq-completion-notification; per-user/match transaction locks prevent duplicate completion notifications on partial recipient retries.

5 APIs1 deps3 infra

Messaging Service

:3006
criticalproduction
7 APIs2 deps2 infra

Cleanup Service

:3008
importantproduction

CANDIDATE FOR REPLACEMENT: Could be replaced with pg_cron scheduled jobs. Scheduled jobs: dibs expiry (5m), match reminders (15m), mark-expired (hourly), hard-delete (2am), reputation decay (3am — NO-OP since Sprint 126/ADR-096: it overwrote reputation.trust_scores.score with a pre-ADR-037 karma/10 formula and would have wiped the standing backfill nightly; trust scores are owned by reputation-service), memoryRetentionJob (3:30am, Sprint 90/ADR-069 — anonymizes completed-exchange free-text to '[forgotten]' sentinels + cascade-forgets messages, hard-deletes expired/unmatched requests; karma_records left untouched; per-community retention windows via request_communities → retention_config), trust edge sweep (4:30am), activity log cleanup (weekly), decay report (weekly). Sprint 90 RETIRED requestTtlSweepJob (it hard-deleted completed+rated exchanges at 30d, destroying aggregates before the anonymize window — superseded by memoryRetentionJob). Governed by requests.retention_config.

1 APIs0 deps2 infra

Geocoding Service

:3009
optionalproduction

Sprint 109 / ADR-080: retained as shared PostgreSQL geocoding cache and external Nominatim policy boundary. Frontend consumes via apps/frontend/src/lib/geocoding.ts.

4 APIs0 deps1 infra

Social Graph Service

:3010
criticalproduction

Trust-first design foundation. Sprint 27: match_completed → social_graph.connections. Sprint 65: match_completed → social_graph.trust_edges. Sprint 67: ego-network rewrite — GET /trust/graph (aggregate) + GET /trust/graph/:communityId (community ego-network). Sprint 68: intrinsic Ebbinghaus decay via trust_edges_live view + decay config endpoints. Sprint 90: visible decay (ADR-070) — graph edges carry decayTier; new /trust/me/memory + /trust/relationships/fading endpoints; classifyDecayTier lives in @karmyq/shared. Governance endpoints are in community-service. match_completed uses karmyq-completion-social-graph (the legacy karmyq-events handler was removed in Sprint 134 PR L); graph counters remain at-least-once effects. Sprint 133 PR B (ADR-100): skill_endorsement_changed { endorser_id, endorsee_id } on the dedicated karmyq-skill-endorsement-social-graph queue (sole consumer) reconciles trust_edges.endorsement_count per community (distinct endorsers 0..2, never increment). Both edge writers (reconcile and upsertTrustEdge) hold a per-pair pg_advisory_xact_lock and compute raw_weight in place. Operator backfill: node dist/scripts/reconcileEndorsementEdges.js [--apply].

21 APIs2 deps3 infra

Simulation Service

:
optionaldevelopment

Development/demo tool only - not deployed to production. Sprint 117: owns the curated demo reset (deterministic protected-core baseline via a guarded transactional reset) plus the ambient synthetic population. Trust/karma history is fixture-only replay locked to production math; live match_completed behaviour is unchanged. Operator CLIs reset:demo/verify:demo/rotate:demo-stories are dry-run/read-only by default. Sprint 142: governance_nomination_voters is reset with nominations/ratifications; nomination and ratification action weights remain zero.

0 APIs1 deps0 infra