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.
- 01callerHTTP request
- 02adapterroutes.rs handlerParse and extract input
- 03applicationNotesServiceAccess check, validation, decisions
- 04persistenceNoteRepositoryStore and load
- 05callerHTTP responseSerialize or map the error
What it demonstrates
- Five files, five responsibilities.
src/note.rsholds the data and ports,src/memory.rsa volatile repository,src/service.rsthe application boundary,src/routes.rsthe only Axum module, andsrc/main.rsthe 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.