Skip to main content

Overview

:::info Source Sourced from services/catalog-service/SERVICE_OVERVIEW.md in the documentation repo. :::

Companion: DOMAIN_MODEL · API_CONTRACTS · EVENT_SCHEMAS · ../../docs/03-microservices/catalog-service.md

1. Purpose (1-paragraph)

The catalog-service owns the published, immutable view of courses on the Ghasi-edTech platform. It projects Course and CourseVersion aggregates that downstream services (search, marketplace, enrollment, delivery) consume as the single source of truth for "what can be discovered, enrolled in, and played." It is read-mostly, has no editing surface (authoring-service owns drafts), and acts as a domain projection over the content-packaging pipeline. It also owns the tenant-scoped taxonomy tree used for browsing and search facets.

2. Scope Boundaries

In scopeOut of scope
Published Course aggregate (metadata, slug, visibility, status)Course drafts, block authoring → authoring-service
Immutable CourseVersion snapshot (duration, locales, PlayPackage ref)PlayPackage building, offline bundles → content-service
Taxonomy / tag trees (per tenant + global)Full-text search indexing → search-service (subscribes to catalog events)
Visibility rules: private / org / marketplace / publicPricing, SKUs, listings → marketplace-service
Version lifecycle: publisheddeprecatedwithdrawnLearner enrollment, assignment → enrollment-service
Locale availability per versionMedia storage → media-service (resolved via MediaRef)
Read APIs for browse/detail/facetsCertification templates → certification-service

3. Architectural Position

┌────────────────┐ content.play_package.built.v1 ┌─────────────────┐
│ authoring-svc │──────────────────────┐ │ content-service │
└────────────────┘ ▼ └─────────────────┘
authoring.course_draft.published.v1 │
│ │
▼ │
┌─────────────────┐ │
│ catalog-service │◀─────────────────┘
│ (projection) │ content.play_package.built.v1
└────────┬────────┘
│ catalog.course_version.published.v1
┌────────────────────────┼───────────────────┬─────────────┐
▼ ▼ ▼ ▼
search-service marketplace-service enrollment-svc delivery-svc
  • Upstream: authoring-service, content-service (events).
  • Downstream: search-service, marketplace-service, enrollment-service, delivery-service, progress-service (all projection consumers).
  • Peers: media-service (resolved cover image URLs via signed URL API), tenant-service (visibility rules).

4. Key Capabilities

  1. Course registration — creates a Course record on first authoring.course_draft.published.v1.
  2. Version publication — creates an immutable CourseVersion on content.play_package.built.v1.
  3. Version lifecycledeprecate (soft, still playable) and withdraw (hidden from catalog, read-only history).
  4. Metadata management — slug, title, description, cover, taxonomy refs (mutable on the Course, immutable on the Version).
  5. Visibility enforcement — cross-tenant reads gated on visibility in {marketplace, public}.
  6. Taxonomy management — hierarchical tree(s) per tenant + a platform-wide default namespace (ghasi:subjects).
  7. Locale surface — which locales a specific version is playable in.
  8. Read API — paginated, filterable, ETag-cached browse endpoints.

5. Non-Goals

  • No write API for course content (blocks, lessons, assessments).
  • No per-learner state (progress, completion, scores).
  • No pricing, discounts, or commerce logic.
  • No full-text search — emits events for search-service.
  • No AI generation of courses — consumes already-authored and already-packaged artifacts.

6. Slices & Readiness

SliceMilestoneContent
S1M1Course + CourseVersion CRUD projections; minimal API; no taxonomy
S2M2Taxonomy tree, tags, browse facets, search-service integration
S3M3Visibility (marketplace, public) + marketplace-service integration
S4M4Full versioning: deprecate/withdraw, multi-version playback, locale surface
S5M5Multi-tenant taxonomy overlays, AI localization assist (delegated)

Readiness targets: L2 by M1 (single-tenant happy path), L4 by M4 (multi-region, multi-tenant, full lifecycle, offline-aware).

7. Service Vital Stats

AttributeValue
Language / runtimeNode.js 20 LTS + TypeScript 5.x
FrameworkFastify 4.x
DBPostgres 15 (RLS) schema catalog
Event busNATS JetStream, streams CATALOG, consumers on AUTHORING, CONTENT
CacheRedis 7 (read-through; ETag key)
ObservabilityOpenTelemetry SDK, OTLP → collector
Tenancy modelRLS + X-Tenant-Id; soft visibility rules layered above
Data classoperational retention (30 d hot / 13 mo cold)
On-call tierTier 2

8. Consumers (SLO Perspective)

ConsumerRead patternLatency SLOStaleness tolerance
search-serviceEvent-driven projectionn/a≤ 5 s after publish
marketplace-serviceEvent-driven + read-backp95 100 ms≤ 10 s
enrollment-serviceRead at enroll timep95 50 msfresh
delivery-serviceRead at launchp95 50 msfresh
Web clients (browse)ETag + max-age 300 sp95 150 ms5 min

9. Ownership

  • Team: Learning Platform · Content squad.
  • Escalation: platform-oncall → content-oncall.
  • Design reviewers: domain architect (catalog), search architect, marketplace architect.