Skip to content
FlowScript templates

Offline fieldwork synchronisation

Distinguish local drafts from canonical records and resolve conflicts before publication. Typed FlowScript for software architecture. Keywords: C4, container, system context, architecture.

Template previewFlowScript
Illustrative Offline fieldwork synchronisationC4 — container view · Architecture working groupField researcher[user]SYSTEM BOUNDARYEDGECOREDATALocal capture client[Container: Browser or edge client]EDGESync coordinator[Container: Stateless service]COREConflict detector[Container: Background worker]COREResolution queue[Container: Durable worker]COREDataset publisher[Container: Application service]COREDevice draft store[Datastore: postgres]DATACanonical record store[Datastore: object-store]DATAField researcher → Local capture client

What this template contains

Source
52 lines

Make it your own.

// Distinguish local drafts from canonical records and resolve conflicts before publication.
// Synthetic worked example: all entities, schedules and measurements are illustrative.
// Every string below is EXAMPLE text from a fictional model: replace it.
// Replace assumptions and inputs before applying this model to actual work.

system platform {
  title: "Illustrative Offline fieldwork synchronisation"
  owner: "Architecture working group"
}

actor user {
  title: "Field researcher"
  kind: "user"
  depends: [s0]
}

service s0 {
  title: "Local capture client"
  runtime: "Browser or edge client"
  tier: "edge"
  depends: [d0]
}

service s1 {
  title: "Sync coordinator"
  runtime: "Stateless service"
  tier: "core"
  depends: [s0, d1]
}

service s2 {
  title: "Conflict detector"
  runtime: "Background worker"
  tier: "core"
  depends: [s1]
}

service s3 {
  title: "Resolution queue"
  runtime: "Durable worker"
  tier: "core"
  depends: [s2, d1]
}

service s4 {
  title: "Dataset publisher"
  runtime: "Application service"
  tier: "core"
  depends: [s3, d1]
}

datastore d0 {
  title: "Device draft store"
  kind: "postgres"
}

datastore d1 {
  title: "Canonical record store"
  kind: "object-store"
}

view architecture: c4_container(platform)