DocumentationHigh-level design

High-level design

Map the web client, API, database, queue, and notification worker.


High-level design shows the application’s runtime components and how they communicate. The To-Do App uses a web client, gateway, Tasks API, Postgres, and a reminder delivery system.

System preview

High-level design
Public edge
Application
Data
Web clientClient / Frontend
API gatewayAPI gateway
Tasks APIService
PostgresDatabase
Reminder queueQueue
Notification workerService
Push / email providerExternal system

Tasks API owns a Low-level design. The dashed Application frame is its network boundary; the service card and the zone are separate artifacts.

Components and network zones

Three network zones are drawn as dashed frames. Each zone records its trust kind and groups the components inside it.

  • Public edge contains Web client.
  • Application contains API gateway, Tasks API, Reminder queue, and Notification worker.
  • Data contains Postgres.
  • Push / email provider sits outside every zone. It is external.

Communication follows these routes:

Web client → API gateway → Tasks API → Postgres

Tasks API → Reminder queue → Notification worker → Push / email provider

The components have these responsibilities:

  • Web client is the React app, and it talks only to the gateway. The tech node React single-page app links to it.
  • API gateway terminates HTTPS and forwards task calls to the Tasks API.
  • Tasks API owns lists, tasks, and the decision to enqueue a reminder. It is the one component with a low-level design. Node.js API links to it.
  • Postgres stores users, lists, tasks, and reminders. The decision Postgres over local-only storage links to it.
  • Reminder queue carries due reminders from the API to the worker. Notification worker reads the queue, calls the provider, and records that the reminder was sent. Push reminders via a queue links to both, and to the provider.
  • Push / email provider is outside the trust boundary. Push and email both leave through it. The process step of the same name links here.

This example includes a Low-level design for Tasks API only. You can add one for the notification worker when its internal design needs documenting.

Node types

The ten component types cover these roles:

  • Entry — client / frontend, API gateway, load balancer.
  • Runtime — service, queue, cache.
  • State — database, object storage.
  • External dependencies — external system.
  • Boundary — network zone, drawn as a frame around components. Zones have no outgoing runtime connections.

This project uses the client, the gateway, two services, the database, the queue, the external provider, and three zones. Cache, load balancer, and object storage are in the gallery because the layer can hold them. If you add a task-list cache later, represent it as a separate component connected to Tasks API.

High-level design node types
  • ServiceTasks APIA runtime service.
  • DatabasePostgresA database the system owns.
  • API gatewayAPI gatewayThe front door for API traffic.
  • QueueReminder queueA queue between producers and consumers.
  • CacheTask list cacheA cache in front of a slower store.
  • Load balancerEdge load balancerSpreads traffic across entry points.
  • External systemPush / email providerA system outside the trust boundary.
  • Client / FrontendWeb clientThe app a person actually opens.
  • Object storageTask export bucketBlob storage for files and exports.
  • Network zonePublic edgeA trust boundary that groups components.

Design rules

  • Each component can have one Low-level design. Components without one remain valid parts of the High-level design.
  • A zone’s trust kind is public, application, or data. External systems stay outside zones. Set the kind as well as a descriptive name.
  • Record communication between components here. Low-level design can identify the modules involved in that communication.
  • Moving a component, or changing its zone, width, or height, does not turn a published node back into a draft. The same is true of a position change, a process pool, and a data-model namespace. A content edit does.

Next

Continue to Low-level design to document the modules inside Tasks API.