Notes JSON API

The example the tutorials build from zero: a notes API you can read end to end in one sitting. It is a teaching example, not a production application.

  1. 01callerHTTP request
  2. 02adapterroutes.rs handlerParse and extract input
  3. 03applicationNotesServiceAccess check, validation, decisions
  4. 04persistenceNoteRepositoryStore and load
  5. 05callerHTTP responseSerialize or map the error

What it demonstrates

  • Five files, five responsibilities. src/note.rs holds the data and ports, src/memory.rs a volatile repository, src/service.rs the application boundary, src/routes.rs the only Axum module, and src/main.rs the composition root.
  • A real capability in miniature. The same shape the starter scales up — minus the database, so everything is observable in one process.

Read it in steps

The tutorials build this application from an empty directory: define the domain, accept input, add the adapter, then test it.