This project started as a fun idea: what if I could share what I'm making for dinner with friends/family in a way that's amusingly professional-looking, and work on some of my full-stack skills at the same time?
Sorrel is a self-hosted PWA application that can be easily installed on iOS or Android, and provides a web interface to edit and configure "menus". It provides both a way for clients to install the app on their own, given just an "invitation code" to avoid having to remember a username+password, and an authenticated backend for an administrator to create menus item-by-item, and share them via push notifications.
Features include:
[!WARNING] Please note that this project is built for my own use, and therefore may contain implicit steps for it to work. I have tried to document as many of these as I can, but these will most likely be incomplete. If you find a missing dependency, feel free to open an issue/PR, and/or if you find something that would be generally useful for the functionality of the app, please contribute!
yarn installyarn run buildcd backend/ && go build./backend serve (on Linux/MacOS).\backend.exe serve (on Windows)9031The project tree is separated into the frontend and backend:
backend/
src/
backend/ contains the Go backend, which handles incoming http requests and persists them to an embedded SQLite database, recipes.dbsrc/ contains the Svelte frontend, which is compiled to a static site in build/, and served by the Go backendBy default, sorrel places its config file sorrel-config.json alongside the binary. If no config file is found, a new one is created.
[!TIP] When running the CLI (
./backend) the built-in help text (ex:./backend --helpor./backend serve --help) can give information about more options available to the user
sorrel-config.jsonpublic_key is the VAPID public key used for push notifications. This and private_key are automatically filled when a default config is created (when the app cannot find a pre-existing config file).private_key is the corresponding VAPID private key for push notifications. Automatically filled by the default config.keycloak_hostname (if using the default keycloak auth handler) is the url of the keycloak instance (ex: https://keycloak.my-domain.com)keycloak_realm_name (if using the default keycloak auth handler) is the keycloak realm name that the application has been configured to use