FlexCatalog
Multi-tenant product catalog API on .NET 10 and MongoDB with event-fed search.
GitHub repo (opens in a new tab) ↗
- License:
- MIT
- CI security:
- CodeQL, gitleaks
~/problem
Catalogs with very different product types do not fit one fixed relational schema, and multiple tenants must never see each other's data.
An ASP.NET Core API for catalogs where each product category has a different attribute shape, with structural tenant isolation and faceted search through a MongoDB aggregation pipeline. Two independent NATS consumers build an inventory read model in MongoDB and a Meilisearch full-text index.
~/highlights
- Tenant isolation, schema and indexing, auth and faceted search each have an architecture decision record.
- Search pipeline construction is internal and unit-tested as plain BsonDocument building, so no database is needed to check its shape.
- Separate InventoryProjector and SearchIndexer services consume NATS domain events from a shared Contracts project.
- Integration tests use Testcontainers with real MongoDB, NATS and Meilisearch; unit tests need no external service.
- Three fixed bugs are documented: hosted-service lifetimes, early configuration capture, and JWT claim remapping.
- Dockerfiles for the API and both worker services, and a screenshot captured from the built API against MongoDB 7.
~/decisions
From the repo's own decision log, not summarized from memory.
Durable consumers added without touching the publish path
Subscribers switched to NATS JetStream durable consumers while the publisher kept using plain core NATS, completely unchanged — a config-level upgrade on top of the same publish/subscribe code rather than a rewrite, which is exactly the upgrade path the original event-streaming decision had already set up for.
~/screenshots
Real captures committed in the repo, not mockups.

Real API output captured in CI, not a UI screenshot
~/architecture
- FlexCatalog.Api → MongoDB, NATS
- Minimal API with JWT auth, tenant context, product CRUD and faceted search.
- MongoDB
- Tenant-scoped product and inventory collections.
- NATS → InventoryProjector, SearchIndexer
- Domain event stream.
- InventoryProjector → MongoDB
- Independent consumer that builds the inventory read model.
- SearchIndexer → Meilisearch
- Independent consumer that maps events to search documents.
- Meilisearch
- Full-text search index.
~/stack
- .NET 10
- ASP.NET Core
- MongoDB
- NATS
- Meilisearch
- JWT
- Testcontainers
- Docker
~/status
Complete skill demo with seeded demo tenants. MIT. The README does not state a release tag.