DoCloud Framework architecture

How the framework works and how every app on it is built, drawn from the code as it is today. New developers can follow the short path below; returning developers can start from the question they have.

New to the framework? Start here

Read these in order. The first three explain the system; the last page is a reference when a diagram symbol is unfamiliar.

  1. See the whole system Learn which parts run in the browser, backend and background.
  2. Follow one API request See how a browser call reaches an app controller and returns a response.
  3. Learn the app pattern See where an app's code lives and which files every app must have.
  4. Use the diagram guide when needed Check the meaning of boxes, arrows and standard diagram notation.

What do you want to know?

QuestionPage
How do the parts fit together?System overview
What happens on an API request?An API request · step by step
How does the frontend start?Frontend boot
Who can do what, and how is it checked?Who can do what · Use cases
What runs in the background?Background work
How is an app built? What must every app have?The app pattern
Which tables exist and how do they relate?Data model
Which classes exist and how does an app extend them?Classes
Who uses the system, for what?Use cases
What does each shape mean?Diagram guide
How do I document my own app the same way?App template · Authoring instructions

By diagram type

TypeShowsWhere
FlowchartParts and the flow between themHow the framework works · The app pattern
ER diagramTables, columns and relationshipsData model · an app's tables
Class diagramClasses, methods, extends and usesClasses · an app's classes
Use case diagramActors and what they doUse cases · an app's use cases
Sequence diagramCalls between parts, in orderRequest and sign-in · a request inside an app

How to read a diagram

  • Every flowchart box is one of the Figma components: a card for an app, module, SDK or client, a circle for a data store or an outside service, the orange shape for a function or action. The coloured strip names the kind; the text names the real thing (a file, a class, a table).
  • A solid arrow is the main flow; a dotted arrow is something used along the way. A grey window is a framework install; a light section only groups boxes.
  • ER, class, sequence and use case diagrams use their own standard notation, explained in the Diagram guide.
  • "Where to look" under each diagram names the files to open next.

Changing a diagram

The rules, the checker and the export are in README.md in this folder. In short: draw only what exists, change the diagram in the same commit as the code, and run php docs/architecture/tools/check.php before you commit.