This is rather rough, and the schema is still likely to change -- a lot! Initial schema definition, along with generated jooq classes for type safe querying. Added basic write for a user. Demonstrates the issues around different facets of data for the same entity. For instance, because api_keys have to be a unique per user, they have to be in a separate table, SRP -- things that change together stay together, hence if a record with an api key changes without the api key changing you can't enforce the uniqueness constraint. Partial read user/get user by api key.