DEV Community

Daksh Ranjan Srivastava
Daksh Ranjan Srivastava

Posted on

System chosen — Online Food Delivery System.

Below are a simple Level 0 (context) and a Level 1 (decomposed) DFD (Data Flow Diagram). I picked an online food-delivery system since it’s real, common, and ties to your earlier food/nutrition project.

Legend

External Entity = [ENTITY]

Process = (P#) Name

Data Store = =DATA=

Data Flow shown with --> or <--

Level 0 DFD (Context diagram)

Single high-level process showing how external entities interact with the system.

  [Customer] ---> (P0) Online Food Delivery System ---> [Restaurant]
       |                  |         ^    |                 ^
       |                  |         |    |                 |
       |                  v         |    v                 |
       |               =ORDERS=     | =MENU_DB=            |
       |                  ^         |    ^                 |
       |                  |         v    |                 |
       +--> [Payment Gateway] <---- (P0) <--- [Delivery Partner]
Enter fullscreen mode Exit fullscreen mode

Text explanation (Level 0)

Customer places orders and makes payments.

Restaurant receives orders and confirms.

Delivery Partner receives dispatch information to deliver food.

Payment Gateway handles payments.

System stores orders and menu data.

**Level 1 DFD (Decomposition of P0 into main sub-processes)**
    [Customer]
       |
       | (1) Search menu / place order
       v
    (P1) Browse & Order -------------------------------> =MENU_DB=
       | order details / payment request
       |                                         ^
       |                                         |
       v                                         |
    (P2) Payment Processing --(payment auth/request)-> [Payment Gateway]
       | payment status (success/fail)
       v
    =ORDERS= <---- (order + payment status) ---- (P3) Restaurant Order Mgmt
       ^                                             |
       | order acceptance / prep status              |
       |                                             v
    (P4) Dispatch & Delivery <---- dispatch info ---- [Delivery Partner]
       | delivery status updates
       v
    [Customer] <--- notifications (ETA, delivered) --- (Notifications)


Enter fullscreen mode Exit fullscreen mode

Elements (Level 1)

(P1) Browse & Order

Inputs: customer search, menu from =MENU_DB=

Outputs: order request to =ORDERS=, payment request to (P2)

(P2) Payment Processing

Interacts with [Payment Gateway] for authorization; writes payment status to =ORDERS=

(P3) Restaurant Order Management

Reads order from =ORDERS=, updates prep status, sends order acceptance/reject

(P4) Dispatch & Delivery

Assigns delivery partner (reads partner availability), sends dispatch details, updates delivery status in =ORDERS=

Notifications (cross-cutting process)

Sends SMS/push: order confirmation, ETA, delivery complete

Data Stores

=MENU_DB= — stores restaurants’ menus, item prices, availability

=ORDERS= — stores order records, status, payment info, customer address

(optional) =USER_DB= — stores customer profiles, addresses, payment tokens

Short notes on DFD best-practices used

Level 0 = single process showing all external actors.

Level 1 = breaks the big process into 4–5 logical sub-processes with clear flows to data stores and external systems.

Avoid crossing lines where possible; group related flows (order → payment → restaurant → delivery).

Keep data stores passive — only processes read/write them.

Top comments (0)