Skip to content

baotoq/micro-commerce

Repository files navigation

MicroCommerce

A showcase e-commerce platform demonstrating modern .NET microservices architecture with best practices.

Important

Since 2026, zero lines of code have been written by a human.

Before 2026, I wrote code like a normal person. Then Claude Code happened.

Now I mass-type y to approve tool permissions while Claude Code does all the actual work.

My contributions (2026–present):

  • Mass-typing y
  • Mass-typing y faster
  • Mass-typing y with increasing confidence

Job title: Senior LGTM Engineer | Chief y Officer

If it works — I mass-typed y really well. If it doesn't — I probably typed n once by accident.

Project Tests Sonar
Backend Test Result Quality Gate Status Lines of Code

Inspired by Microsoft eShop, this pet project showcases the latest .NET stack with a focus on:

  • Modular Monolith → Microservices — Start simple, extract when needed
  • DDD & CQRS — Clean domain-driven architecture with MediatR
  • Event-Driven — MassTransit with transactional outbox for reliable messaging
  • Cloud-Native — .NET Aspire orchestration, Kubernetes-ready

Quick Start

# Run with .NET Aspire (starts all services + infrastructure)
dotnet run --project src/MicroCommerce.AppHost

# Open Aspire dashboard at https://localhost:17225
# Frontend at http://localhost:3000
# API at http://localhost:5000

Requirements: .NET 10 SDK, Docker Desktop

Architecture

┌─────────────────────────────────────────────────────────────┐
│                        Next.js Frontend                      │
└─────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────┐
│                      API Gateway (YARP)                      │
└─────────────────────────────────────────────────────────────┘
                              │
       ┌──────────────────────┼──────────────────────┐
       ▼                      ▼                      ▼
┌─────────────┐     ┌─────────────┐     ┌─────────────────────┐
│   Catalog   │     │    Cart     │     │      Ordering       │
│   Module    │     │   Module    │     │       Module        │
└─────────────┘     └─────────────┘     └─────────────────────┘
       │                  │                       │
       └──────────────────┼───────────────────────┘
                          ▼
            ┌─────────────────────────┐
            │    Azure Service Bus    │
            │   (Domain Events)       │
            └─────────────────────────┘

Modules

Module Responsibility Key Features
Catalog Products & categories CRUD, search, filtering
Cart Shopping cart Guest carts, persistence, merge on login
Ordering Checkout & orders Saga-based checkout, order history
Inventory Stock management Reservations, real-time updates

Tech Stack

Backend

  • .NET 10 with ASP.NET Core Minimal APIs
  • .NET Aspire 13.1.0 — Cloud-native orchestration
  • MediatR — CQRS with pipeline behaviors
  • MassTransit 9.0 — Messaging with transactional outbox
  • EF Core 10 — PostgreSQL with schema-per-module
  • FluentValidation — Request validation

Frontend

  • Next.js 16 with React 19
  • shadcn/ui — Component library
  • NextAuth.js v5 — Authentication

Infrastructure

  • PostgreSQL — Primary database
  • Azure Service Bus — Message broker (emulator for dev)
  • Keycloak — Identity provider
  • Kubernetes — Container orchestration
  • FluxCD — GitOps deployment

Project Structure

src/
├── MicroCommerce.AppHost/           # Aspire orchestrator
├── MicroCommerce.ApiService/        # Backend API
│   ├── Features/                    # Domain modules
│   │   ├── Catalog/
│   │   ├── Cart/
│   │   ├── Ordering/
│   │   └── Inventory/
│   └── Common/                      # Shared infrastructure
├── MicroCommerce.Web/               # Next.js frontend
├── MicroCommerce.ServiceDefaults/   # Shared Aspire config
└── BuildingBlocks/                  # DDD primitives

Development

Prerequisites

Commands

# Run full stack
dotnet run --project src/MicroCommerce.AppHost

# Build
dotnet build src/

# Run tests
dotnet test src/

# EF migrations
dotnet ef migrations add <Name> --context CatalogDbContext \
  --output-dir Features/Catalog/Infrastructure/Migrations

Claude Code

This project uses the GSD (Get Shit Done) workflow for planning and execution. See CLAUDE.md for project-specific guidance.

# Check project progress
/gsd:progress

# Plan next phase
/gsd:plan-phase <number>

# Execute plans
/gsd:execute-phase <number>

CI/CD

  • GitHub Actions — Build, test, code quality
  • SonarCloud — Static analysis
  • FluxCD — GitOps deployment to Kubernetes

Star History

Star History Chart

License

MIT

Releases

No releases published

Packages

 
 
 

Contributors 3

  •  
  •  
  •  

Languages