endpoint
Implementing an endpoint
An endpoint is assembled, not invented
Nearly everything a route does — parsing ?page, rejecting a blank title, shaping a 404, adding a
next link — is already decided by a toolkit module. What is left to write is the part that is genuinely about this resource: the entity, the port,
the use case, the mapping.
So the work is not "write an endpoint". It is: settle the contract, find out which decided problems this endpoint has, load those skills, and then write the small remainder. An endpoint that took three hours usually spent them re-deciding something.
Load the ktor-toolkit:architecture skill first if you have not this session. Every file below lands in a specific module, and getting that wrong is
the expensive kind of mistake.
Step 1 — Settle the contract
Ask only what changes the code. Most of it is inferable from the request; ask about what is not.