eCoffee
A coffee-franchise supply-chain platform spanning online orders, in-store sales, delivery, and inventory.

What I worked on
Full-stack contributor · Team project
- 01
Identity & sessions
Contributed to Warehouse, Inventory, Supplier, and Franchise services within an existing 13-service system.
- 02
Delivery contracts
Designed NestJS APIs and four Prisma schemas, and built related React interfaces.
- 03
Event reliability
Implemented gRPC service communication and Kafka event workflows; used Jest, Docker, and GitLab CI/CD.
Overview
eCoffee serves customers and the teams behind a coffee franchise in one product. Customers browse menus, place and pay for orders, and use loyalty benefits; staff handle counter sales and fulfillment; managers run store inventory and suppliers; admins oversee policy and chain-wide reporting.
The challenge
Online orders, counter sales, last-mile delivery, and warehouse transfers involve different roles and inventory pools. The system needs clear role and store boundaries while keeping order and stock changes traceable.
Engineering approach
Use gRPC for synchronous service contracts
Why this choice
Delivery assignment and tracking need a direct service response; protobuf contracts keep request and response shapes explicit.
Trade-off
Callers depend on service availability and compatible contracts, so timeouts and version discipline matter.
Pair an outbox with at-least-once Kafka delivery
Why this choice
The order record and outbox event share a local transaction; an outbox/inbox flow tolerates duplicate Kafka delivery without a distributed transaction.
Trade-off
Delivery can repeat, so consumers need deduplication and idempotent effects; the design favors recovery over exactly-once claims.
Keep operational data owned by each service
Why this choice
Order, Delivery, Warehouse, and Inventory own independent records; cross-service references travel as IDs and events, not cross-database foreign keys.
Trade-off
Ownership limits accidental coupling but makes workflows and compensations explicit across service boundaries.
Product capabilities
System overview
A public REST edge routes into bounded services. Internal gRPC handles synchronous calls; Kafka carries asynchronous events.
Customer, staff & POS apps
Kong API Gateway
Order · Inventory · Delivery
Transactional outbox → Kafka → inbox
Order DB + outbox
Outbox relay
Kafka topics
Consumer inbox
Outbox/inbox and cross-service adoption are documented as partial or unverified; this is not an exactly-once claim.
This diagram reflects the supplied architecture documents. They describe a target service catalog and mark several cross-service behaviors as partially implemented or unverified.
Evidence & validation
Design considerations
eCoffee is a multi-role system: customer features and store operations depend on the same order and inventory state. Mapping each workflow by actor and scope helps clarify the boundaries between the franchise, its branches, and the warehouse.
