I'll pick Online Food Delivery (nice balance of actors & flows). Below are a simple Level 0 (Context) and a more detailed Level 1 DFD. I’ll give a clear ASCII-style diagram for each plus a short explanation of processes, data stores, external entities, and major data flows so you can redraw it in draw.io / Lucidchart / Visio easily.
Level 0 — Context diagram
+-----------+ (place order, view menu) +-----------------------------+
| Customer | -----------------------------------> | Online Food Delivery System |
+-----------+ +-----------------------------+
^ | | ^ ^ ^ ^ ^
| | (order status, confirmation, invoice) | | | | | |
| +<-------------------------------------------+ | | | | |
| | | | | |
| | | | | |
| | | | | |
+-----------+ (accept/reject order, menu data) | | | | |
|Restaurant | <---------------------------------------+ | | | |
+-----------+ | | | |
^ | (delivery assignment, pickup confirmation) | | | |
| +<-------------------------------------------------+ | | |
| | | |
+----------------+ (payment auth / refund) | | |
| Payment Gateway | <---------------------------------------+ | |
+----------------+ | |
^ | (delivery details, tracking) | |
| +--------------------------------------------------------+ |
| |
+------------------+ (pickup/deliver info) |
| Delivery Partner | <----------------------------------------------+
+------------------+
Entities
Customer — places orders, views status.
Restaurant — receives orders, confirms, prepares food.
Delivery Partner — receives pickup/delivery tasks and updates status.
Payment Gateway — processes payments and returns success/failure.
System (single process at Level 0): Online Food Delivery System — receives inputs and returns outputs to the external entities.
Level 1 — Decomposed processes
Break the system into 4 main processes:
+---------------------+
Customer | 1.0 Order & User |<----- User signs up / logs in
(UI/API) -> Management |
+----+---+---+-------+
| | |
(menu req) --->| | |---> (store order) ---> D1 Orders DB
| | |
| +------------> D2 User DB
|
| (order placed)
v
+---------------------+
| 2.0 Restaurant |<--- Sends menu, receives order
| Management |
+----+---+---+-------+
| |
(accept) ------+ +---- (update menu) --> D3 Menu DB
|
v
+---------------------+
| 3.0 Delivery |<--- Assigns delivery partner
| Assignment & |
| Tracking |
+----+---+---+-------+
| |
(assign) ------+ +-----> D4 Delivery DB (status, location)
|
v
+---------------------+
| 4.0 Payment |<--- Calls Payment Gateway
| Processing |
+----+---+---+-------+
| |
(auth req) ----+ +----> D5 Payments DB (txn records)
|
v
(send confirmation to Customer)
Formal list of components
Processes
1.0 Order & User Management
Actions: user authentication, display menu, take order, validate inputs
Inputs: customer requests, menu data
Outputs: order to Restaurant process; order records to Orders DB; user data to User DB
2.0 Restaurant Management
Actions: send/receive menu changes, accept/reject orders, update preparation status
Inputs: order details
Outputs: order acceptance/rejection, preparation status to Delivery & Customer
3.0 Delivery Assignment & Tracking
Actions: find nearest available delivery partner, assign, track location, update delivery status
Inputs: ready-for-pickup notification from Restaurant, delivery partner availability
Outputs: assignment to delivery partner, live tracking to Customer, delivery updates to Orders DB
4.0 Payment Processing
Actions: compute total (taxes, fees), call Payment Gateway, capture/refund
Inputs: payment details from Customer
Outputs: payment confirmation to Customer & Orders DB, refund if needed
Data Stores
D1 Orders DB — order records, status history.
D2 User DB — profiles, addresses, preferences.
D3 Menu DB — menus, prices, availability.
D4 Delivery DB — delivery partner statuses, routes, tracking logs.
D5 Payments DB — transaction logs, receipts, refunds.
External Entities
Customer — frontend web/mobile app or API client.
Restaurant — restaurant management system / vendor portal.
Delivery Partner — mobile app for couriers (accept/complete jobs).
Payment Gateway — external payment processor.
Important data flows (examples)
Customer → 1.0: Place Order (items, address, payment method)
1.0 → 2.0: Order Details
2.0 → 1.0: Order Confirmation / ETA
2.0 → 3.0: Ready for Pickup (order id, pickup location)
3.0 → Delivery Partner: Dispatch (order id, pickup, dropoff, contact)
Delivery Partner → 3.0 → Customer: Live Location / Delivery Status
1.0 → 4.0 → Payment Gateway: Payment Authorization / Capture
Payment Gateway → 4.0: Auth Response (success/fail)
Quick notes (how to present / draw)
Use circles/rounded boxes for processes, open rectangles for data stores, and squares for external entities. Use labelled arrows for data flows.
Number processes (1.0, 2.0...) so it’s easy to reference.
For assignment in Level 1, show direct flows between processes (e.g., 2.0 → 3.0) and to/from data stores.
If required in an assignment, include security flows (e.g., encrypted payment data, tokenized card data) or error flows (payment failed → roll back → notify customer).
Top comments (0)