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:
- Creating, modifying, and deleting menus
- Creating, modifying, and deleting menu items
- A live preview of the menu as it is being created
- Ability to send a push notification when a menu has been created
- Probably a lot more...
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!
- Go 1.24+ with CGo (could probably work with earlier versions)
- Yarn
- Vite
- Sveltekit
- Install the node requirements
yarn install
- Build the frontend
yarn run build
- Build the backend
cd backend/ && go build
- Run the server binary
./backend serve
(on Linux/MacOS).\backend.exe serve
(on Windows)
- Done! The server runs by default on port
9031
The 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.db
src/
contains the Svelte frontend, which is compiled to a static site inbuild/
, and served by the Go backend
By 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 --help
or ./backend serve --help
) can give information about more options available to the user
public_key
is the VAPID public key used for push notifications. This andprivate_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