Skip to main content

Stella Catalog

Technical Product Specification v1

Document Status: Draft for Review Version: 1.0 Last Updated: March 2026 Previous product name: Astro Catalog (renamed to Stella Catalog)

Spec Precedence: Where this document conflicts with architecture_v3.md, the architecture document is the technical source of truth. This spec retains product scope, business requirements, and domain model authority. Sections marked ⚠️ SUPERSEDED have been replaced by architecture_v3.md and are kept for historical context only.


Executive Summary

Purpose

Stella Catalog is an open-source, AI-first, multi-tenant product information management (PIM) system designed to modernize how businesses manage, discover, and distribute product data. It serves as either a standalone headless catalog service or an "AI Sidecar" that enhances legacy PIM systems like PIMCore and Akeneo with semantic search and AI capabilities.

The canonical runtime is a standalone long-running NestJS process (self-hosted or containerised). A lightweight Vercel + Supabase deployment path is documented below for reference but is superseded by the standalone model defined in architecture_v3.md §15.

Key Benefits

BenefitDescription
AI-Native SearchSemantic search using vector embeddings enables natural language product discovery, going beyond keyword matching
Zero-Migration AI UpgradeActive replication mode syncs with existing PIMs in real-time, adding AI capabilities without risky data migrations
Multi-Tenant SaaS ReadyBuilt-in tenant isolation via PostgreSQL Row-Level Security (RLS) enables secure multi-tenant deployments
Cloud-ReadyDeploy as a standalone NestJS process with any managed PostgreSQL (Supabase, RDS, etc.)
E-commerce ReadyNative validation schemas for Amazon, Shopify, and GS1 prevent syndication errors
Multi-Supplier SupportManage offers from multiple suppliers, automatically match products, and select best offers
Reference Catalog IntegrationEnrich products from industry catalogs (IceCat, Etilize, ETIM) with standardized data
AI Agent CompatibleMCP (Model Context Protocol) tools enable AI agents to search, compare, and quote products

Who Should Use Stella Catalog?

User TypeUse Case
B2B/B2C RetailersCentral product catalog with multi-supplier offer management and dynamic pricing
System IntegratorsAdd AI search to legacy PIMs without replacing existing infrastructure
E-commerce PlatformsHeadless catalog backend with channel syndication validation
AI/LLM DevelopersProduct information backend for conversational commerce and AI agents
DistributorsManage supplier catalogs, match products, and maintain canonical product records
Startups & SMBsSimple containerised deployment with managed Postgres (e.g. Supabase, RDS)

Open Source License

Stella Catalog is released under an open-source license, enabling:

  • Self-hosted deployments with full control
  • Containerised deployment with any managed PostgreSQL
  • Community contributions and extensions
  • Transparent security auditing
  • No vendor lock-in

Table of Contents

  1. Vision & Core Principles
  2. Target Use Cases
  3. Technology Stack
  4. Architecture Overview
  5. Vercel + Supabase Deployment
  6. Multi-Tenancy Model
  7. Core Domain Model
  8. AI & Discovery Layer
  9. Integration & Replication
  10. Multi-Supplier Product Management
  11. Reference Catalog Integration
  12. Catalog Sharing
  13. CPQ & Pricing
  14. Operational Features
  15. Security
  16. API Reference
  17. Requirements Summary
  18. Correctness Properties
  19. Development Environment
  20. Versioning & Lifecycle Management
  21. Role & Permission Matrix
  22. GraphQL Interface (Phase 2 Roadmap)
  23. Embedding Cache Invalidation Strategy
  24. Reference Catalog Prioritization
  25. Enhanced Security Features
  26. Updated Performance Targets
  27. Extended CLI Commands

1. Vision & Core Principles

Vision

Stella Catalog is designed to be the AI-native product information backbone for modern commerce. It bridges the gap between legacy PIM systems and AI-powered discovery, enabling businesses to leverage semantic search, intelligent matching, and AI agent integration without abandoning existing investments. It can be deployed simply on Vercel + Supabase or self-hosted for full control.

Core Design Principles

  1. API-First & Headless – All functionality exposed via well-defined REST APIs
  2. AI-Native – Vector embeddings, semantic search, and MCP tools are first-class citizens
  3. Sidecar-Ready – Designed to enhance existing PIMs via active replication, not replace them
  4. Multi-Tenant by Design – Tenant isolation enforced at the database layer (RLS)
  5. Event-Driven – Real-time ingestion via webhooks and async processing via queues or serverless jobs
  6. Future-Proof – Built for MCP Agents and multimodal interaction
  7. Deployment-Flexible – Optimized for Vercel + Supabase; compatible with self-hosted NestJS + Postgres + Redis

2. Target Use Cases

Primary Use Cases

Use CaseDescription
AI Search SidecarSync data from PIMCore/Akeneo → Serve AI-powered semantic search
Central Product CatalogUnified catalog for B2B/B2C platforms with multi-supplier support
MCP/LLM BackendProduct information backend for AI agents and conversational commerce
Multi-Channel FeederMaster catalog that validates and syncs to Amazon/Shopify/Google
Distributor CatalogManage supplier offers, match products, select best prices
Vercel + Supabase HostedSingle-tenant or multi-tenant catalog running entirely on Vercel + Supabase

Example Deployment Scenarios

Scenario 1: AI Upgrade for Legacy PIM

PIMCore → Stella Bridge (webhook) → Stella Catalog → AI Search API → Frontend

Scenario 2: Multi-Supplier Distributor

Supplier Feeds → Stella Ingest → SupplierOffers → Matching → CanonicalProducts → Sales Channels

Scenario 3: AI Agent Commerce

Customer Query → AI Agent → MCP Tools → Stella Catalog → Product Recommendations

Scenario 4: Containerised Cloud Deployment

Container/VM (NestJS API + Agent Runtime) + Managed Postgres (e.g. Supabase, RDS) → Stella Catalog

3. Technology Stack

Canonical Stack (Self-Hosted)

ComponentTechnology
BackendNestJS (TypeScript strict)
Frontend / AdminNext.js
ORMPrisma
ValidationZod (canonical for DTOs, MCP I/O, tests)
API StyleREST with /v1/ prefix; MCP tools as thin adapters
TestingVitest + fast-check (property-based)
QueuePostgreSQL outbox + LISTEN/NOTIFY (default); BullMQ adapter optional
ObservabilityOpenTelemetry; structured JSON logs

Data Layer

ComponentTechnology
DatabasePostgreSQL 15+
Extensionspgvector, LTREE, uuid-ossp, pgcrypto, pg_trgm
Tenant IsolationRow-Level Security (RLS) – Mandatory
Queue (default)PostgreSQL outbox + LISTEN/NOTIFY
Queue (high-throughput)BullMQ adapter (optional; Redis required)
Object StorageS3-compatible (MinIO for dev; Supabase Storage when using Supabase)

Search & AI

ComponentTechnology
Vector Storagepgvector (colocated with Postgres)
Hybrid SearchVector similarity + fulltext (GIN)
Embedding ModelsConfigurable (OpenAI, Cohere, local)

Authentication

ComponentTechnology
StrategyStrict delegation (no embedded auth)
StandardsOAuth2 / OpenID Connect
Token FormatJWT with required claims: sub, tenant_id, roles
Vercel + SupabaseSupabase Auth (JWT); map tenant via app_metadata or custom claim

Vercel + Supabase Alignment

⚠️ SUPERSEDED — The canonical deployment model is a standalone long-running NestJS process. See architecture_v3.md §15 Deployment Strategy. The table below is retained for historical context only; do not use it for new implementation decisions.

ConcernSelf-Hosted (canonical)Vercel + Supabase (historical)
DatabaseAny PostgreSQLSupabase (Postgres) – pgvector & ltree supported
AuthAny OIDC (e.g. Keycloak)Supabase Auth – JWT with custom claims
API / BackendNestJS standalone processNext.js Route Handlers or NestJS on Vercel serverless
Media StorageS3 / MinIOSupabase Storage (S3-compatible API)
Background JobsPostgreSQL outbox + LISTEN/NOTIFYInngest / Trigger.dev / Vercel Cron
HostingAny VPS / container / k8sVercel (frontend + serverless API)

Compatibility is maintained by:

  • Using Prisma with a single schema that works against any Postgres (including Supabase)
  • Using Zod for all contracts so API shape is independent of runtime
  • Abstracting the job queue behind an interface (@constellation-platform/jobs): PostgreSQL outbox by default, BullMQ adapter for high-throughput
  • Using Supabase Auth JWT when deployed on Supabase; same tenant_id + RLS model applies

4. Architecture Overview

High-Level Diagram

┌─────────────────────────────────────────────────────────────────────────────┐
│ External Systems │
├─────────────────────────────────────────────────────────────────────────────┤
│ Identity / Supabase Auth Legacy PIM E-commerce MCP Agents │
│ (Keycloak / Supabase) (PIMCore/Akeneo) (Amazon/Shopify) │
└────────┬─────────────────┬──────────────────┬─────────────────┬─────────────┘
│ │ │ │
▼ ▼ ▼ ▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ API Layer │
├─────────────────────────────────────────────────────────────────────────────┤
│ REST API Ingest Webhook Channel API MCP Tools │
│ /v1/products /v1/ingest/webhook /v1/channels search/compare │
│ /v1/search /v1/supplier-offers /v1/shares get_context │
│ (NestJS or Next.js Route Handlers when on Vercel) │
└────────┬─────────────────┬──────────────────┬─────────────────┬─────────────┘
│ │ │ │
▼ ▼ ▼ ▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ Service Layer │
├─────────────────────────────────────────────────────────────────────────────┤
│ Auth Guard Product Service Search Service Channel Service │
│ Tenant Svc Taxonomy Service Embedding Svc CPQ Service │
│ Ingest Svc Mapping Service Media Service Reference Catalog Svc │
└────────┬─────────────────┬──────────────────┬─────────────────┬─────────────┘
│ │ │ │
▼ ▼ ▼ ▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ Data Layer │
├─────────────────────────────────────────────────────────────────────────────┤
│ PostgreSQL (Supabase or self-hosted) + pgvector + LTREE │
│ RLS enforced on all tenant-scoped tables │
│ Redis + BullMQ (self-hosted) OR Inngest/Trigger.dev (Vercel) │
│ S3 / Supabase Storage (media, tenant-namespaced) │
└─────────────────────────────────────────────────────────────────────────────┘


┌─────────────────────────────────────────────────────────────────────────────┐
│ Background Processing │
├─────────────────────────────────────────────────────────────────────────────┤
│ Self-hosted: Embedding Worker, Media Worker, Bulk Import, Outbox │
│ Vercel: Inngest/Trigger.dev jobs or Vercel Cron + serverless functions │
└─────────────────────────────────────────────────────────────────────────────┘

Repository Shape (Monorepo)

apps/
├── api/ # NestJS backend (self-hosted) or Next.js API (Vercel)
├── admin/ # Next.js admin UI (deploys to Vercel)
packages/
├── contracts/ # Zod schemas and shared types
├── config/ # Lint, tsconfig, tooling presets
└── sdk/ # Optional: typed API / MCP helpers

5. Vercel + Supabase Deployment

Why Vercel + Supabase

  • Vercel: Hosts the Next.js application (admin UI and, if desired, API routes or serverless functions). No server management, global CDN, and simple Git-based deployments.
  • Supabase: Managed PostgreSQL with pgvector and ltree, built-in Auth (JWT), and Storage. Same RLS and tenant model applies.

Deployment Modes

⚠️ SUPERSEDED — See architecture_v3.md §15 Deployment Strategy. The canonical mode is "Self-Hosted / Containerised" below. The Vercel + Supabase row is retained for historical context only.

ModeFrontendAPIDatabaseAuthStorageWorkers
Self-Hosted / Containerised (canonical)Next.js (any host)NestJS standalone processAny PostgreSQL 16+Any OIDCS3/MinIOPostgreSQL outbox (BullMQ optional)
Vercel + Supabase (historical)Vercel (Next.js)Vercel serverlessSupabase PostgresSupabase AuthSupabase StorageInngest / Trigger.dev

Supabase Compatibility Checklist

  • PostgreSQL: Use Prisma with connection string from Supabase. Enable extensions in Supabase dashboard or via migration: pgvector, ltree, uuid-ossp, pgcrypto, pg_trgm.
  • RLS: Create policies as in the design doc; set app.tenant_id from JWT before queries (e.g. from Supabase Auth custom claim or app_metadata).
  • Auth: Use Supabase Auth; store tenant_id in app_metadata or a custom claim so JWT contains tenant_id for RLS and service logic.
  • Storage: Use Supabase Storage buckets; key media as {tenant_id}/products/{product_id}/... to preserve tenant isolation.
  • Edge Functions (optional): Use for lightweight async work (e.g. webhook processing, small embedding batches) if you prefer not to use Inngest/Trigger.dev.

Vercel Compatibility Checklist

  • Next.js: Build the admin app (and optionally API) as a Next.js app; deploy to Vercel. Use Route Handlers or API routes for REST endpoints if not using a separate NestJS API.
  • Serverless limits: Avoid long-running processes. Use Inngest, Trigger.dev, or Vercel Cron for background jobs; keep embedding and bulk work in small, idempotent jobs.
  • Environment: Store Supabase URL, anon key, service role key (for server-side only), and any embedding API keys in Vercel environment variables.

⚠️ SUPERSEDED — This section described a Vercel serverless deployment path. The canonical runtime is a standalone long-running NestJS process (see architecture_v3.md §15). The Supabase-managed Postgres and Auth components remain viable as infrastructure providers behind the canonical NestJS runtime.

1. Next.js on Vercel (App Router + Route Handlers for /v1/* or a subset). 2. Prisma pointing at Supabase Postgres (same schema as self-hosted). 3. Supabase Auth for login; JWT includes tenant_id (e.g. via app_metadata). 4. Supabase Storage for product media. 5. Inngest or Trigger.dev for embedding jobs, bulk import, and other async work (both work with Vercel serverless).

Canonical stack: NestJS standalone process → Prisma → Any PostgreSQL 16+ (including Supabase-managed) → Any OIDC provider (including Supabase Auth) → S3-compatible storage → PostgreSQL outbox workers.


6. Multi-Tenancy Model

Strategy

  • Shared Database, Shared Schema with tenant_id on all core tables
  • PostgreSQL Row-Level Security (RLS) – Mandatory for all tenant-scoped tables
  • All queries automatically scoped by tenant_id via RLS policies

Intentional exception to common platform standard. The Common_Technology_Platform_v1.md recommends schema-per-module separation within a single PostgreSQL instance. Stella intentionally uses a single shared schema because:

  1. Cross-module joins — product search spans products, taxonomy, offers, and suppliers in a single query; schema separation would force either cross-schema joins (losing RLS coherence) or data duplication.
  2. RLS coherence — all tenant-scoped policies reference the same app.tenant_id session variable; a unified schema keeps the RLS surface auditable in one place.
  3. Compensating boundaries — module isolation is enforced at the code level (import-table rules, no cross-module ORM relations, CI linter for boundary violations) rather than at the schema level. See architecture_v3.md §4 for repo topology and module isolation rules.

Why RLS?

RLS ensures that even if application code misses a WHERE tenant_id = ? clause, the database prevents data leakage between tenants. This works the same on Supabase or self-hosted Postgres.

Media Isolation

Media assets are namespaced by tenant in object storage (S3 or Supabase Storage):

media/{tenant_id}/products/{product_id}/image_001.jpg

Tenant Configuration

Each tenant can configure:

  • JSON schemas for product validation
  • Promoted attributes for faceted search
  • Re-ranking rules for search results
  • Embedding model preferences
  • Rate limit overrides (within platform maximums)

7. Core Domain Model

Product

The central entity representing a catalog item:

FieldTypeDescription
idUUIDStella-generated unique identifier
tenant_idUUIDOwning tenant (RLS enforced)
external_idstringReference to source system ID
external_sourcestringSource system identifier (e.g., "pimcore_prod")
external_updated_attimestampSource system timestamp for conflict resolution
titlestringProduct title
descriptiontextProduct description
statusenumdraft, active, archived
attributesJSONBFlexible attribute storage
category_pathLTREECategory hierarchy path
media_referencesJSONBLinks to media assets
created_attimestampCreation timestamp
updated_attimestampLast update timestamp

Product Relationships

TypeCardinalityDescription
VariantsParent → ChildrenSize/color variations
AccessoriesMany-to-ManyCompatible products
ReplacementsOne-to-ManySuccessor products
BundlesOne-to-ManyKit components

Category Taxonomy

Categories use PostgreSQL LTREE for efficient hierarchical queries:

Electronics.Audio.Headphones.Wireless

Benefits:

  • Efficient subtree queries ("find all products under Audio")
  • Category paths included in embeddings for semantic precision
  • Move operations propagate to all descendants
  • Supported on Supabase Postgres (enable ltree extension)

8. AI & Discovery Layer

Embedding Generation

  1. Product text content is hashed (SHA-256)
  2. If hash differs from stored content_hash, generate new embedding
  3. Category paths are flattened and included in embedding text
  4. Embeddings stored in pgvector with model version tracking

Hybrid Search Pipeline

Query → Faceted Filters (GIN) → Vector Search (pgvector) → Re-Ranking → Results

Re-Ranking Rules

Tenants can configure business logic re-ranking:

  • Boost specific fields (brand, category)
  • Penalize out-of-stock items
  • Apply recency boost
  • Custom scorer DSL

MCP Tools

AI agents interact via Model Context Protocol:

ToolDescription
search_productsSemantic search with natural language
compare_productsStructured attribute comparison
get_product_contextReference price and availability
generate_quoteCPQ pricing for AI agents

9. Integration & Replication

Active Replication (Sidecar Mode)

Stella can sync with legacy PIMs in real-time without requiring migration:

PIMCore → object.postUpdate → Stella Bridge → /v1/ingest/webhook → Stella Catalog

Conflict Resolution

  • Incoming payloads include external_updated_at timestamp
  • If payload is older than current data → discard
  • If payload is newer → upsert and trigger embedding generation (via queue or serverless job)

Schema Mapping

  • Tenants define JSON schemas for webhook validation
  • Transformation rules map legacy formats to Stella attributes
  • Example: PIMCore Object Bricks → Faceted Attributes

Channel Syndication

  • Define channel schemas (Amazon, Shopify, GS1)
  • Validate products before syndication
  • Prevent downstream errors (missing ASIN, invalid GTIN)

10. Multi-Supplier Product Management

Overview

For distributors and retailers sourcing from multiple suppliers, Stella provides a three-tier model:

SupplierOffer (atomic) → OfferGroupMembership → CanonicalProduct (unified)

SupplierOffer

Atomic record from each supplier:

  • supplier_id, supplier_sku
  • price, currency, availability
  • ean, mpn, manufacturer
  • Product attributes

CanonicalProduct

Unified product grouping multiple supplier offers:

  • Computed fields: offer_count, lowest_price
  • Lifecycle: active, merged, split, archived
  • Enrichment from reference catalogs

OfferGroupMembership

Links offers to canonicals with review workflow:

  • confidence_score (0.0 - 1.0)
  • match_type (ean_exact, mpn_exact, name_similarity)
  • status (suggested, confirmed, rejected, superseded)

Matching Workflow

  1. Auto-match: EAN exact match (0.95 confidence) → auto-confirm eligible
  2. Suggest: MPN + manufacturer match (0.85) → suggest confirm
  3. Review: Name similarity only → manual review required

Offer Selection Policies

When displaying a canonical product, select the "winning" offer:

  • cheapest – Lowest price
  • preferred_supplier – Configured supplier priority
  • highest_availability – Best stock level

11. Reference Catalog Integration

Overview

Stella integrates with industry-standard reference catalogs for product enrichment and matching:

CatalogTypeLicense
IceCatProduct DataCommercial
EtilizeProduct DataCommercial
AmazonProduct DataAPI Terms
ETIMClassificationOpen/Commercial
UNSPSCClassificationOpen
eClassClassificationCommercial

System-Level Catalogs

Reference catalogs are system-level (not tenant-owned):

  • Shared across all tenants
  • Read-only for tenants
  • Updated via sync jobs (scheduled or triggered)

License Enforcement

Commercial catalogs require per-tenant licenses:

  • License validation before data access
  • Usage tracking for metered licenses
  • Expiration and revocation support

Enrichment Workflow

  1. Match SupplierOffer to ReferenceProduct (EAN, MPN, ASIN)
  2. Pull descriptions, images, specifications
  3. Apply to CanonicalProduct
  4. Track enrichment source for attribution

12. Catalog Sharing

Overview

Catalog owners can share their catalog with controlled permissions:

Share TypeDescription
UserInvite specific users via email
PublicGenerate shareable link (token-based)
API KeyProgrammatic access for integrations

Permissions

PermissionCapability
viewBrowse products
searchUse search functionality
exportDownload catalog data

Scope Options

  • All: Entire catalog
  • Categories: Specific LTREE paths
  • Filter: Custom product filter

Security Features

  • Unique cryptographic share tokens
  • Expiration dates
  • Instant revocation
  • Rate limiting
  • Field exclusion (hide cost, supplier_id)
  • Access metrics tracking

13. CPQ & Pricing

Pricing Rules

Dynamic pricing with priority-based rule evaluation:

Rule TypeDescription
PercentageDiscount/markup by percentage
FixedFixed amount adjustment
Fixed PriceOverride to specific price
TieredQuantity break pricing

Rule Conditions

  • Customer segment
  • Quantity thresholds
  • Product category
  • Custom fields

Evaluation Modes

  • CUMULATIVE: Stack multiple rules
  • TERMINAL: Stop at first match

Sales Channels

Configure channel-specific pricing and product visibility:

  • Product filters (categories, suppliers, price range)
  • Channel-specific pricing rules
  • Offer selection policies

Competitive Pricing

  • Integrate competitor price data
  • Track price position (above/below market)
  • Historical trend analysis
  • Alert on significant changes

14. Operational Features

Health Endpoints

EndpointPurpose
GET /v1/healthLiveness probe (static OK)
GET /v1/readyReadiness probe (checks DB, optional queue/storage)

Observability

  • Tracing: OpenTelemetry with NewRelic/Datadog/Jaeger support
  • Metrics: Request latency, queue depth (when applicable), connection pool
  • Logging: Structured JSON with correlation IDs

Background Processing

  • Default: PostgreSQL outbox + LISTEN/NOTIFY — exponential backoff retry, dead letter queue, no Redis dependency
  • High-throughput adapter: BullMQ (Redis) available via @constellation-platform/jobs config flag; swap per-module without architecture change
  • All jobs must be idempotent regardless of queue backend

CLI Commands

stella-cli init # Initialize database and RBAC
stella-cli queue worker embeddings # Start embedding worker (self-hosted)
stella-cli queue status embeddings # Check queue status
stella-cli db migrate # Apply migrations (Prisma)
stella-cli search reindex # Rebuild embeddings
stella-cli tenant create # Create new tenant
stella-cli tenant list # List all tenants
stella-cli validate-product # Validate product against channel

Performance Targets

OperationTarget (p95)
Search query< 500ms
Product creation< 200ms
Bulk import1000 products/min

15. Security

Authentication

  • JWT tokens from external OAuth2/OIDC (e.g. Supabase Auth when on Supabase)
  • Required claims: sub, tenant_id, roles
  • Role-based access control on endpoints

Data Protection

  • RLS enforces tenant isolation at database level (Supabase and self-hosted)
  • AES-256 encryption for sensitive data at rest
  • API key rotation with configurable expiration
  • Parameterized queries (no SQL injection)

Input Validation

  • Zod schemas for all API inputs
  • Content-Type header validation
  • Sanitized error messages

Audit Trail

  • All mapping decisions logged
  • Canonical merge/split operations tracked
  • Authentication failures logged with source IP

16. API Reference

Core Endpoints

MethodEndpointDescription
POST/v1/productsCreate product
GET/v1/productsList products
GET/v1/products/:idGet product
PUT/v1/products/:idUpdate product
DELETE/v1/products/:idDelete product
POST/v1/searchHybrid search
GET/v1/products/:id/similarSimilar products

Ingest Endpoints

MethodEndpointDescription
POST/v1/ingest/webhookReceive product updates

Multi-Supplier Endpoints

MethodEndpointDescription
POST/v1/supplier-offersCreate offer
GET/v1/supplier-offersList offers
POST/v1/supplier-offers/bulkBulk upsert
GET/v1/supplier-offers/unmatchedUnmatched offers
POST/v1/canonical-productsCreate canonical
GET/v1/canonical-products/:id/offersGet linked offers
POST/v1/canonical-products/mergeMerge canonicals

Reference Catalog Endpoints

MethodEndpointDescription
GET/v1/reference-catalogsList catalogs
GET/v1/reference-catalogs/:id/productsSearch reference products
POST/v1/admin/licensesGrant license
DELETE/v1/admin/licenses/:idRevoke license

Sharing Endpoints

MethodEndpointDescription
POST/v1/sharesCreate share
GET/v1/sharesList shares
DELETE/v1/shares/:idRevoke share
GET/v1/public/catalogs/:shareTokenAccess shared catalog

17. Requirements Summary

Stella Catalog implements 30 requirements covering:

CategoryRequirements
Core Product Management1–4
Integration & Replication5–7
Security & Auth8, 23, 30
Media & Background9, 11
MCP & AI10
Tenant Management12
Operations13, 20, 24, 25
CPQ & Pricing14–16
Product Matching17–18
CLI19
Performance & Retention21–22
Catalog Sharing26
Reference Catalogs27
Versioning & Lifecycle28–29

See the full requirements document (.kiro/specs/stella-catalog/requirements.md) for detailed acceptance criteria.


18. Correctness Properties

Stella Catalog defines 60 correctness properties validated using property-based testing (fast-check) with minimum 100 iterations per property. Key properties include tenant isolation, LTREE round-trip, embedding dirty checking, webhook conflict resolution, mapping confidence, share token uniqueness, reference catalog isolation, license enforcement, version integrity, lifecycle event delivery, and role permission enforcement. See the full design document for the complete list.


19. Development Environment

Local Development (Self-Hosted)

# docker-compose.dev.yml
version: '3.8'

services:
postgres:
image: pgvector/pgvector:pg16
environment:
POSTGRES_DB: stella_catalog
POSTGRES_USER: stella
POSTGRES_PASSWORD: development
ports:
- '5432:5432'

redis:
image: redis:7-alpine
ports:
- '6379:6379'

minio:
image: minio/minio
command: server /data --console-address ":9001"
ports:
- '9000:9000'
- '9001:9001'

keycloak:
image: quay.io/keycloak/keycloak:23.0
command: start-dev --import-realm
ports:
- '8080:8080'

Local Development (Vercel + Supabase)

  • Use Supabase local (optional) or a hosted Supabase project for dev.
  • Run Next.js locally with npm run dev; point Prisma to your Supabase Postgres URL.
  • Use Inngest Dev Server or Trigger.dev dev for local job testing.

Development Commands

# Start services (self-hosted)
docker-compose -f docker-compose.dev.yml up -d

# Install dependencies
npm install

# Initialize database
npm run cli init

# Run migrations (Prisma)
npm run cli db migrate # or: npx prisma migrate dev

# Start development server
npm run start:dev # NestJS OR npm run dev (Next.js)

# Run tests
npm test
npm run test:pbt

20. Versioning & Lifecycle Management

Canonical Product Versioning

  • Version history for canonical product attributes
  • Draft editing and publish workflow
  • Version comparison and rollback

Product Lifecycle Triggers

Webhook events: product.created, product.updated, product.status_changed, canonical.merged, canonical.split, offer.matched, offer.unmatched. Delivery can be implemented via outbox or serverless (e.g. Inngest) when on Vercel.


21. Role & Permission Matrix

Platform roles: super_admin, platform_support. Tenant roles: tenant_admin, catalog_manager, viewer. Permissions align with the matrix in the original requirements spec (manage tenants, reference catalogs, licenses, tenant settings, pricing, products, canonicals, mapping, shares, view, search, export). JWT must include sub, tenant_id, roles, and scope (platform vs tenant).


22. GraphQL Interface (Phase 2 Roadmap)

Planned: optional GraphQL interface alongside REST (product/search queries, mutations, subscriptions). Schema preview and federation are as in the original spec.


23. Embedding Cache Invalidation Strategy

Invalidation triggers: product content change, category rename/move, taxonomy restructure, embedding model upgrade. Flow: identify affected products → queue jobs (BullMQ or Inngest/Trigger.dev) → regenerate and store embeddings. Configuration (batch size, delay, priority) as in the original spec.


24. Reference Catalog Prioritization

Enrichment precedence: tenant-configured primary → commercial (IceCat, Etilize) → Amazon → classification (ETIM, UNSPSC). Conflict resolution by field type (descriptions, images, specifications, classifications) as in the original spec.


25. Enhanced Security Features

Sensitive data masking, public share link security (time-bound tokens, optional IP allowlist, access logging, rate limiting, revocation) as in the original spec.


26. Updated Performance Targets

OperationInitial Target (p95)Stretch Target (p95)
Search query< 800ms< 500ms
Product creation< 200ms< 100ms
Bulk import1000 products/min2000 products/min
Embedding generation< 2s per product< 1s per product

27. Extended CLI Commands

Same as original: tenant create/list/suspend, reference-catalog import, validate-product, bulk-import, bulk-match, diagnose. CLI name: stella-cli (or npm run cli).


Appendix: Document History

VersionDateChanges
v6 (Stella)Jan 2026Multi-supplier, Reference catalogs, Catalog sharing, CPQ, correctness properties, CLI, Observability
v1 (Stella)Mar 2026Renamed to Stella Catalog; standalone stack (NestJS, Next.js, Prisma, Zod, BullMQ); Vercel + Supabase deployment path; compatibility preserved for simple hosting

Feedback

This specification is open for review. Please provide feedback on:

  1. Requirements completeness – Are there missing use cases?
  2. Vercel + Supabase fit – Does the compatibility model cover your deployment needs?
  3. Technical feasibility – Are the proposed solutions practical?
  4. API design – Are the endpoints intuitive and RESTful?
  5. Security model – Are there gaps in the security approach?

Submit feedback via GitHub issues or pull requests.