$ show vendurehq/vendure
Vendure is a mature, open-source headless commerce platform built on NestJS, GraphQL, and TypeORM. It provides a complete backend for e-commerce operations including product catalog management, order lifecycle, payment/shipping/tax processing, promotions, and multi-channel support. The monorepo contains a core backend package, two parallel admin UIs (an older Angular-based admin-ui and a newer React-based dashboard), a CLI tool for scaffolding and migrations, and a plugin ecosystem with official plugins for email, asset server, job queues (BullMQ), caching (Redis), telemetry (OpenTelemetry), and AI integration via the MCP (Model Context Protocol) plugin. The architecture is modular with a strategy pattern for extensibility, an event bus for domain events, a job queue system, and a custom fields system. The codebase demonstrates strong engineering practices with extensive test coverage, CI/CD pipelines, and active maintenance. Notable reusable components include a generic finite state machine framework, a runtime-resolved custom fields system, an OAuth 2.1 authorization server, a dynamic form engine, and a tag-based cache invalidation service.
The LLM identified 5 files worth highlighting for reuse:
A generic finite state machine implementation with typed transitions, hooks, and validation. Used for order, payment, fulfillment, and refund state management. Reusable because it's a standalone pattern that can be applied to any domain requiring state transitions.
A runtime-resolved custom fields system using decorators and configuration. Allows adding arbitrary fields to entities without schema changes. The decorator pattern and resolution logic are isolated and could be extracted for other ORM-based projects.
A standalone OAuth 2.1 authorization server implementation with DCR, CIMD, PKCE, and token endpoints. Designed for AI agent authentication. Reusable as a lightweight OAuth server for any application.
A dynamic form engine that renders form inputs based on configuration. Supports custom field types, validation, and localization. The pattern of mapping field types to input components is reusable for any admin UI.
A cache service with tag-based invalidation, supporting in-memory, SQL, and Redis backends. The strategy pattern and tag invalidation logic are cleanly abstracted and reusable for any Node.js application.