Work in progress Unison implementation of the RealWorld backend application. This is a REST web application which should eventually adhere to the endpoint specification.
🚧 🚧 WIP - temporarily on hold due to other commitments 🚧 🚧
To ease any confusion upfront: Unison code is content-addressed, which is why the codebase is a database and not human-readable. Types and functions are identified by a hash of their syntax tree. To view this code we must use a tool.
- Clone this repo
git clone git@github.com:dantb/unison-realworld-example-app.git
- Install Unison Codebase Manager. Instructions here.
- Run
ucm
at the root of this repository. Then within UCM,run trunk.main
will start the web application.
NOTE: Soon this application will be on Unison share, so the code will be readable on a public website. You will also be able to pull it locally as a namespace in your own codebase.
Progress is being tracked on this board.
Unison is an alpha language, so the library ecosystem is a work in progress. Thus some of the features required by the RealWorld backend have prerequisites which do not yet exist. I plan to implement some of these.
- Authorization logic currently uses a
JWT
ability with a dummy handler. Implementing RSA and then JWT on top of it is on the project board. - Database interactions are abstracted by the
KeyValueStore
ability. Currently I'm using an in-memory handler for this. There is a redis library which could be used instead. For now I'm prioritising other features, since that may add some overhead by introducing an external dependency.
Current implemented endpoints:
- User registration
POST /users
- User login
POST /users/login
- Fetch user
GET /user