Architecture

graph LR
    api[notes-api: REST] -->|CreateNote, Notes| module[notes-module]
    report[notes-report: CLI] -->|CreateNote, Notes| module
    module --> store[MemoryNotes store]

Reading the wiring

  • notes-module holds the model (Note), the input shape (CreateNote with its Validate rules), the service (NotesService), and the two ports other code talks through.
  • apps/api is one adapter: it maps HTTP to the Notes port and uses the framework's REST host for routing, extractors, and problem responses.
  • apps/report is another adapter: a binary that calls the same service with no web server at all.

Because the ports are neutral, swapping MemoryNotes for a database-backed store would not touch either caller.