$ show nashtech-garage/yas
YAS (Yet Another Shop) is a production-grade, open-source e-commerce platform implemented as a microservices architecture using Java Spring Boot for the backend and Next.js for the frontend (both storefront and admin backoffice). The system is decomposed into ~15 independent microservices (product, cart, order, customer, inventory, payment, promotion, rating, tax, location, media, search, webhook, recommendation, and sample data) that communicate via REST with resilience4j circuit breakers/retries and event-driven patterns using Kafka and Debezium CDC for cross-service data synchronization (e.g., product changes propagate to Elasticsearch for search and PgVector for recommendation). Authentication and authorization are handled via Keycloak with OAuth2/JWT. The architecture includes BFF (Backend For Frontend) gateways using Spring Cloud Gateway and two Next.js frontends. Infrastructure is fully containerized with Docker Compose and Kubernetes Helm charts, with observability via OpenTelemetry, Grafana, Loki, and Tempo. The codebase includes comprehensive unit/integration tests, UI automation tests (Selenium/Cucumber), and CI/CD pipelines per service. While the repository is primarily an application, it incorporates data engineering patterns (CDC, vector embeddings) for the recommendation and search features, giving it a slight hybrid data character. Overall, the code demonstrates solid engineering practices, a well-defined microservice boundary, and several reusable components, though some duplication across services and boilerplate configs exist.
The LLM identified 4 files worth highlighting for reuse:
A generic CSV exporter that uses custom annotations (@CsvColumn, @CsvName) on model fields to automatically generate CSV content from any list of objects. It handles header extraction, field order, and includes a queuing mechanism for building rows. This is a self-contained utility that can be extracted and reused in any Java project requiring CSV export without external dependencies beyond standard libraries.
An abstract base class for consuming Kafka CDC messages with built-in retry support via custom @RetryableTopic annotation. It provides typed deserialization of CDC events (Operation, ProductCdcMessage) and a process method for handling create/update/delete operations. Demonstrates a robust pattern for change data capture consumption that can be reused across services requiring event-driven synchronization (e.g., search indexing, cache invalidation).
A reusable React input component that wraps react-bootstrap's Form.Control with integrated error display, label, and optional prepended/append text. It supports both controlled and uncontrolled modes (with react-hook-form register) and handles various input types (text, number, email, etc.). This component is isolated, depends only on react-bootstrap and react-hook-form, and can be extracted and used in any React-based admin or form-heavy application.
A global exception handler (@ControllerAdvice) that maps various custom exceptions (NotFoundException, BadRequestException, DuplicatedException, etc.) to standardized ErrorVm responses with appropriate HTTP status codes and localized messages. It demonstrates a clean pattern for centralized REST error handling that is easily extractable and reusable across any Spring Boot microservice.