Skip to content
Academy
0/15

Routes

On this page

Build with Milpa · Unit 2 of 4

Create a capability and a route

The generator cuts repetitive work, but the contract stays explicit: name, provided capabilities, dependencies and flavor.

Beginner to intermediate35 min

By the end, you'll be able to

  • Generate a plugin with a contract
  • Inspect the resulting route

Understand

The generator cuts repetitive work, but the contract stays explicit: name, provided capabilities, dependencies and flavor.

After writing, inspect. A file being present doesn't prove the host registered the plugin or the route correctly.

See

Explore the atlas of boundaries

Locate the new piece on the map before turning it into code.

Do

Run the practice in your checkout and keep the output as evidence.

terminal
$php bin/coa make:plugin Catalog --provides=catalog
$php bin/coa make:controller CatalogPlugin CatalogController --path=/catalog
$php bin/coa inspect:routes

Verify

Show that you can apply the unit. Progress only advances once you pass the assessment.

Criteria assessed

  • The plugin declares catalog in provides.
  • The /catalog route appears in inspect:routes.

Graded assessment

Solve the 3 scenarios. This unit requires 3 of 3 correct answers.

0 attempts
Question 1 of 3Catalog will be a composition unit and other plugins will depend on its catalog capability. Which first step makes that contract explicit when generating the piece?
Question 2 of 3The generator created CatalogController and the expected files for /catalog. Which evidence completes the check that the host recognized the route?
Question 3 of 3CatalogPlugin can't work without the storage capability, contributed by StoragePlugin. How is that relationship represented so it can be validated before traffic?

Grading validates answers in this browser; it doesn't certify identity.

Primary sources

Content verified: 2026-07-10