AR:
not sure exactly what you're after but i'll share my internal code model for writing shared (e.g. HTTP) services (micro- and regular-sized). I will warn you that none of what appears below easily fits into the typical MVC/MVVM/etc patterns most frameworks are built to support. However, i find this works well, hides complexity behind static interfaces, scales well, and is easy to code/maintain.
FWIW, i architect my services as follows:
DATA MODEL
1) i implement a data storage layer that has a single interface. i do this so that i can assure a non-changing interface while i add new data tables, documents, queries, etc. even change storage from relational to NoSQL, etc. w/o ever breaking anyone else's code
OBJECT MODEL
2) i implement an internal object model to represent the domain (DDD-style, if that suits you). this domain model is usually an "object" (task, user, etc.) that accepts messages/actions and args. so the object has a very simple interface, too. BTW - that object MAY access data storage (see #1) above.
RESOURCE MODEL
3) i implement an external HTTP interface (basically resources) that, by the very nature of HTTP, accepts a single message on a port and then processes that request into a response using the internal object model from #2.
REPRESENTATION MODEL
4) finally, the responses from the HTTP interface ALWAYS go through a representor module to convert the internal object tree into a standardized messasge (HTML, Atom, HAL, Siren, Cj, UBER, CSV, etc.). this makes sure that, no matter how the data, object, or resource models change, the service responses will ALWAYS be in a well-known format that the client can deal with.
I cover this in a talk from last year (the pattern above is in the middle of the deck)[1]
Cheers.