Getting started — EC platform
The full drill-down: system → service → domain → usecase → resource.
View the source on GitHub · Open in the app
Source
Section titled “Source”@import "default.krs.style"
system ECPlatform { label "EC Platform"
user Customer [human] { label "Customer" description "End users who purchase products" } user Seller [human] { label "Seller" description "Shop owners who list products for sale" } user Admin [human] { label "Admin" description "Staff who operate the platform" }
client MobileApp [mobile] { label "Mobile App" description "Official iOS / Android app" capability notification }
service ECommerce { label "EC Site" description "Browsing, purchasing, and listing products"
domain Catalog { label "Product Catalog" usecase SearchProducts { label "Search products" resource ECommerceDB.ProductTable { operations read } resource SearchIndex [external] { label "Search index" operations read } } usecase RegisterProduct { label "Register a product" resource ECommerceDB.ProductTable { operations create, update } resource MediaStorage.ProductImages { operations create } }
// Express domain-to-domain dependencies as edges inside a domain block. // Drill down into the service to see the dependency arrows. Catalog --> Order "Feed order stats into rankings" } domain Order { label "Orders" usecase PlaceOrder { label "Place an order" resource ECommerceDB.OrderTable { operations create } resource OrderEvents.OrderPlaced { operations create } resource InventoryAPI [external] { label "Inventory API" operations read, update } resource PaymentAPI [external] { label "Payment API" operations create } } usecase ShowOrderHistory { label "View order history" resource ECommerceDB.OrderTable { operations read } }
Order -> Catalog "Look up product details" Order -> Member "Look up member info" } domain Member { label "Members" usecase Register { label "Sign up as a member" resource ECommerceDB.MemberTable { operations create } } usecase EditProfile { label "Edit profile" resource ECommerceDB.MemberTable { operations read, update } } } } service Payment [external] { label "Payment" description "Credit card and e-money payment processing" } service Inventory [external] { label "Inventory" description "Centralized inventory management" } service Notification { label "Notification" description "Email and push notification delivery" }
// Infra layer: shared database / queue / storage that services depend on, // declared as first-class nodes directly under system. database ECommerceDB { label "EC Site DB" table ProductTable { label "Product table" } table OrderTable { label "Order table" } table MemberTable { label "Member table" } } queue OrderEvents { label "Order events" queue OrderPlaced { label "Order placed" } } storage MediaStorage { label "Media storage" bucket ProductImages { label "Product images" } }
Customer -> MobileApp "Open the app" MobileApp -> ECommerce "Call the API" Seller -> ECommerce "List a product" Admin -> ECommerce "Administer the platform" ECommerce -> Payment "Process payments" ECommerce -> Inventory "Check inventory" ECommerce --> Notification "Send order confirmation"}
deploy Production { label "Production environment" oci ecommerceApp { label "ecommerce-app" runtime "Kubernetes (GKE)" realizes ECommerce } oci notificationWorker { label "notification-worker" runtime "Cloud Run" realizes Notification }}
organization ECOrg { label "EC development org" team platform { label "Platform team" owns ECommerce
team commerce { label "Commerce team" owns Catalog owns Order
owns Member owns Notification member alice { label "Alice" github "alice-dev" } } team "member-team" { label "Member team" member bob { label "Bob" description "Owner of the member platform" } } } team notification { label "Notification team" member carol { label "Carol" slack "@carol" } }}
// Legend: swatch supplies a literal color, ref pulls the color from// .krs.style for the given [tag] / type / #id. Omit the scope to show// on system / deploy / org views.legend "Legend" { ref [external] "External system" ref [human] "Human user" ref database "Shared database" ref queue "Message queue"}© 2026 Hiroki Kondo · Licensed under Apache-2.0