FlexCatalog
Multi-tenant product catalog API on .NET 10 and MongoDB with event-fed search.
~/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.
~/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.