Cookbook
Solve one problem at a time.
Each recipe takes one change from the files it touches to a passing spec. Every recipe says how far it has been tested.
Create a resource
A small CRUD feature, from model and changeset to a passing request spec.
Submit a rendered form
Post exactly the fields a view renders, so a spec catches a field its action’s contract refuses.
Read and write JSON
Answer the generated actions as JSON, bind JSON input, and check an update’s version with If-Match.
Upload and keep a file
Go from a request-scoped temporary file to a complete persistence recipe.
Mount a third-party component
Wrap a headless JavaScript library in a Caramel island: assets, lifecycle, history and tests.
Run a background job
Enqueue a typed job in the business transaction, drain it in a spec, and run workers without HTTP.
Receive a signed webhook
Use raw-body ingress and provider authentication before contract binding.
Sign users in with revocable sessions
Keep a random token in the signed cookie and its digest, expiry and revocation in PostgreSQL.
No matching recipes. Try “JSON”, “file”, or “job”.
Built from a new application and run end to end by one of Caramel’s checks, which names it.
Written against 0.16.0 with the release’s own commands, not yet run end to end.
Part of the path is missing from Caramel today. The recipe says which part.
The shape every recipe follows is in the documentation standards.