7 Commits

Author SHA1 Message Date
a569c30771 Improve README (finally) 2026-02-01 15:45:11 +01:00
449a4a7d75 Add unit and integration tests
I won't be lying, Claude Code was extremely helpful to write those
tests, although it had a lot of issues with properly using in-memory
SQLite (db and integration tests) and with parsing responses
(integration test).
2026-02-01 06:00:12 +01:00
b78b8cca41 Refactor: split into multiple files
Given the size of the assignment, having everything in the same file was
OK. However, splitting into different files is a good option for better
maintainance once this API grows, and now is a good time to do it before
it gets more complicated.
2026-02-01 03:06:00 +01:00
1f62fe6f66 Add API documentation using OpenAPI and SwaggerUI 2026-02-01 02:32:39 +01:00
eded366570 Persist items to the database
The database that was chosen here is SQLite, because it's dead simple to
setup and more than enough for this project.

Please note that I took some liberty with the assignment. I chose to use
a numeric field for the `id` column of an item. This leverages automatic
creation and incrementation of the id by SQLite itself.
2026-01-31 13:42:57 +01:00
da6f8b4519 Add input validation
Input validation uses Malli coercion. Sadly enough, email is validated
with a regexp.
2026-01-31 13:39:34 +01:00
c278633c66 Initial commit
This initial version is purposely extremily limited:
* `GET /ahoy` endpoint, just to check the server is alive
* `GET /items` endpoint, always returns the same item
* `POST items` endpoint, checks and print request payload, no
  persistance
* calling any other route defaults to a 404
2026-01-31 13:37:16 +01:00