Loading repository data…
Loading repository data…
emikes97 / repository
This repo will host everything that is meant to be showcased for portfolio purposes.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
A production-style e-commerce backend simulation designed as a portfolio project to practice architecture, concurrency/async workflows.
Customer, Cart, CartItem, Wishlist, Order, OrderItem, Transaction,PaymentMethod, CustomerAddress, EmailSent, Auditing, Category, Product, ProductCategory.201 with tokenStatus=PENDING; async listener fetches provider token and updates to ACTIVE/FAILED after commit.CITEXT, enums for order_status, token_status, auditing status, JSONB where useful.Key patterns
DomainLookupService).Primary Domain
Customer ⇄ Cart — 1:1Customer ⇄ CustomerAddress — 1:N (exactly one is_default = true)Customer ⇄ CustomerPaymentMethod — 1:N (async tokenization lifecycle)Customer ⇄ Order — 1:NCustomer ⇄ Wishlist — 1:NWishlist ⇄ WishlistItem — 1:NWishlistItem ⇄ Product — N:1Cart ⇄ CartItem — 1:NCartItem ⇄ Product — N:1Order ⇄ OrderItem — 1:NOrderItem ⇄ Product — N:1Product ⇄ Category — M:N via ProductCategoryOrder ⇄ Transaction — 1:N (payments/refunds per order)Comms / Observability
EmailSent ⇄ Customer — N:1EmailSent ⇄ Order — N:1 (nullable)EmailSent ⇄ Transaction — N:1 (nullable)AuditLog (centralized auditing of domain events; references target via ids + type)POST /customers with registration data.CustomerController → CustomerService creates the new customer in DB.emails_sent with status = QUEUED, type = ACCOUNT_CREATED.EmailEventRequest is published.EmailClaimService picks the queued email asynchronously.EmailComposer) and marked SENT (or FAILED if sending fails).POST /customers/{id}/payment-methods.CustomerPaymentMethodController → CustomerPaymentMethodService inserts record with token_status = PENDING.201 Created and tokenStatus: PENDING.PaymentMethodCreatedEvent is published.service/async/external) calls the mock provider.token_status = ACTIVE + provider token (on success), ORtoken_status = FAILED (on error).POST /carts/{cid}/items.CartService persists CartItem entries linked to Cart.POST /orders to create order from cart.OrderService persists Order and OrderItem entities.POST /orders/{id}/pay to simulate payment.TransactionService inserts a Transaction record with status = SUCCESSFUL or FAILED.CentralAudit logs the payment in the auditing table.EmailEventRequest is queued in emails_sent (e.g., ORDER_CONFIRMATION, PAYMENT_CONFIRMATION).SENT.POST /customers/{id}/wishlist to create a wishlist (idempotent).WishlistService ensures the wishlist exists for that customer.POST /wishlist/{id}/items with a product ID.WishlistService adds a WishlistItem row linked to the product.GET /wishlist/{id}/items.WishlistService fetches all items, joins with Product, and returns product details.emails_sent with status = QUEUED.EmailEventRequest ensures async worker wakes up.EmailClaimService locks rows (status → SENDING).EmailComposer builds message from templates.SENT on success, ORFAILED on error (optional retries in roadmap).Portfolio_Eshop/
└── core/
└── src/main/java/commerce/eshop/core/
├── config/ # App configs (executors, async, branding, etc.)
│ ├── AsyncConfig.java
│ ├── AsyncExecutorConfig.java
│ ├── BackgroundConfig.java
│ ├── BrandConfig.java
│ ├── Conf.java
│ └── RestTemplateConfig.java
│
├── model/ # Entities (DB schema mirror)
│ └── entity/
│ ├── Auditing.java
│ ├── Cart.java
│ ├── CartItem.java
│ ├── Category.java
│ ├── Customer.java
│ ├── CustomerAddress.java
│ ├── CustomerPaymentMethod.java
│ ├── EmailsSent.java
│ ├── Order.java
│ ├── OrderItem.java
│ ├── Product.java
│ ├── ProductCategory.java
│ ├── Transaction.java
│ ├── Wishlist.java
│ └── WishlistItem.java
│
├── repository/ # Spring Data JPA repos (+ impls)
│ ├── AuditingRepo.java
│ ├── CartItemRepo.java
│ ├── CartRepo.java
│ ├── CategoryRepo.java
│ ├── CustomerAddrRepo.java
│ ├── CustomerPaymentMethodRepo.java
│ ├── CustomerRepo.java
│ ├── EmailsSentRepo.java
│ ├── OrderItemRepo.java
│ ├── OrderRepo.java
│ ├── ProductCategoryRepo.java
│ ├── ProductRepo.java
│ ├── TransactionRepo.java
│ ├── WishlistItemRepo.java
│ ├── WishlistRepo.java
│ └── Impl/
│ └── DbLockRepository.java
│
├── application/ # Application layer (use-cases, orchestration, infra)
│ ├── async/
│ │ ├── external/ # External provider clients (payment/email)
│ │ │ ├── contracts/
│ │ │ │ ├── EmailSender.java
│ │ │ │ └── PaymentProviderClient.java
│ │ │ └── impl/
│ │ │ ├── MockEmailSender.java
│ │ │ ├── PaymentProviderClientImpl.java
│ │ │ └── (other mock/provider impls)
│ │ ├── internal/ # Internal async tasks
│ │ │ └── EmailOutboxProcessor.java
│ │ └── schedule/ # Scheduled jobs, retries, pollers
│ │ └── PaymentStatusPoller.java
│ │
│ ├── email/ # Email composition + claim service
│ │ ├── constants/
│ │ ├── enums/
│ │ ├── properties/
│ │ └── templating/
│ │ ├── EmailClaimService.java
│ │ └── EmailComposer.java
│ │
│ ├── events/ # Domain/application events
│ │ ├── auditing_events/
│ │ │ └── EmailEventRequest.java
│ │ ├── customer/
│ │ │ ├── CustomerRegisteredEvent.java
│ │ │ ├── CustomerUpdatedInfoEvent.java
│ │ │ └── CustomerSuccessfulOrFailedUpdatePasswordEvent.java
│ │ ├── email/
│ │ │ └── EmailSentOrFailedEvent.java
│ │ ├── order/
│ │ │ ├── PlacedOrderEvent.java
│ │ │ └── CancelledOrderEvent.java
│ │ └── payments/
│ │ ├── PaymentExecutionRequestEvent.java
│ │ ├── PaymentMethodCreatedEvent.java
│ │ └── PaymentSucceededOrFailed.java
│ │
│ ├── infrastructure/ # Cross-cutting infra (audit, lookup, client impls)
│ │ ├── audit/
│ │ │ └── CentralAudit.java
│ │ ├── domain/
│ │ │ └── DomainLookupService.java
│ │ └── impl/
│ │ ├── EmailSenderOutboxAdapter.java
│ │ ├── PaymentProviderOutboxAdapter.java
│ │ └── (other infra adapter impls)
│ │
│ ├── cart/
│ │ ├── commands/
│ │ │ ├── AddToCart.java
│ │ │ ├── ClearCart.java
│ │ │ └── RemoveFromCart.java
│ │ ├── factory/
│ │ │ └── CartItemFactory.java
│ │ ├── queries/
│ │ │ └── CartQueries.java
│ │ ├── validation/
│ │ │ └── AuditedCartValidation.java
│ │ └── writer/
│ │ └── CartWriter.java
│ │
│ ├── category/
│ │ ├── commands/
│ │ │ ├── AddCategory.java
│ │ │ └── RemoveCategory.java
│ │ ├── factory/
│ │ │ └── CategoryFactory.java
│ │ ├── queries/
│ │ │ └── CategoryQueries.java
│ │ ├── validation/
│ │ │ └── AuditedCategoryValidation.java
│ │ └── writer/
│ │ └── CategoryWriter.java
│ │
│ ├── customer/
│ │ ├── commands/
│ │ │ ├── CustomerRegistration.java
│ │ │ ├── CustomerServiceActions.java
│ │ ├── factory/
│ │ │ └── CustomerFactory.java
│ │ ├── queries/
│ │ │ └── CustomerQueries.java
│ │ ├── validation/
│ │ │ └── AuditedCustomerValidation.java
│ │ ├── writer/
│ │ │ └── CustomerWriter.java
│ │ └── addons/ # Addresses, payment methods, wishlist, etc.
│ │ ├── address/
│ │ │ ├── commands/
│ │ │ ├── factory/
│ │ │ ├── queries/
│ │ │ ├── validation/
│ │ │ └── writer/
│ │ ├── payments/
│ │ │ ├── commands/
│ │ │ ├── factory/
│ │