Layout rules

generated from midad spec --json at build time; not edited by hand

The layout the tool enforces. midad new writes it, and midad check refuses a project that breaks a rule.

pathwhat it holds
manifestmidad.toml
entrymain.md
codelib/
handlersroutes/
third partyvendor/

Rules

  • a file that mounts a route: block lives in routes/ or is the entry (E0402)
  • a file under routes/ mounts a route, or a route in the entry names one of its handlers (E0403)
  • one module: per file, unique across the project (E0404)

Project layout explains what each rule is for.

On this page