Files
pos-system/services/catalog-service-net/docs/en

Catalog Service

Polymorphic product management for multi-vertical commerce platform.

Overview

Catalog Service manages products across multiple business verticals (Retail, F&B, Services) with a unified data model using JSONB for type-specific attributes.

Key Features

  • Polymorphic Products - Single product table supporting Physical, Service, and PreparedFood types
  • JSONB Attributes - Dynamic attributes per product type (Weight, Duration, Toppings...)
  • Multi-tenant - Shop-scoped product catalogs
  • Category Management - Hierarchical product categories

Architecture Context

graph LR
    POS["POS / Web"] --> CATALOG["📦 Catalog Service"]
    CATALOG --> MERCHANT["🏪 Merchant Service"]
    ORDER["📝 Order Service"] --> CATALOG
    
    style CATALOG fill:#4a90d9,stroke:#2d5986,color:#fff

Prerequisites

Requirement Version
.NET SDK 10.0.101+
Docker 24.0+
PostgreSQL 15+

Quick Start

cd services/catalog-service-net
cp .env.example .env
dotnet restore
dotnet run --project src/CatalogService.API

Project Structure

catalog-service-net/
├── src/
│   ├── CatalogService.API/          # Controllers, CQRS
│   ├── CatalogService.Domain/       # Aggregates, Entities
│   └── CatalogService.Infrastructure/ # EF Core, Repositories
├── tests/
│   ├── CatalogService.UnitTests/
│   └── CatalogService.FunctionalTests/
└── docs/

API Endpoints

Method Endpoint Description
GET /api/v1/products List products by shop
GET /api/v1/products/{id} Get product details
POST /api/v1/products Create product
PUT /api/v1/products/{id} Update product
DELETE /api/v1/products/{id} Delete product
GET /api/v1/categories List categories
POST /api/v1/categories Create category

Domain Model

Product Types

Type Attributes Example
Physical Weight, Dimensions, SKU T-shirt, Phone
Service Duration, Staff Required Haircut, Massage
PreparedFood Recipe, Toppings, Station Coffee, Pizza

Product Entity (JSONB Attributes)

public class Product : Entity, IAggregateRoot
{
    public Guid ShopId { get; private set; }
    public string Name { get; private set; }
    public decimal Price { get; private set; }
    public ProductType Type { get; private set; }
    public JsonDocument? Attributes { get; private set; } // Type-specific
}

Resources

License

Proprietary - GoodGo Platform