This is a personal side-project to have a faster, simpler way to write a shopping list for the specific use-case of planning ahead about 2 weeks, in which we go to one shop once, and to another twice. Since we have a list of common recipes, it’s also annoying to have to re-enter all of those ingredients every time we want to make this recipe.
This readme is written in orgmode, and is therefore best viewed in emacs with the org package enabled (it’s enabled by default).
When you see code like this
that starts with a $
, that means it refers to a shell command. As an example, ~$ echo “Hello World”~ refers to running the command ~echo “Hello World”~ on the command line. A POSIX-compliant shell is assumed.
This project is set up using IHP.
- Install nix
- Install direnv and hook it into your shell
- You can install direnv using nix:
$ nix-env -iA nixpkgs.direnv
- You can install direnv using nix:
- Start the development server using
$ ./start
. Your browser should openlocalhost:8080
andlocalhost:8081
. The first is the actual web-app, the second are the browser-based development tools provided by IHP. This might take a while the first time.
If there are any issues setting up this environment, refer to the IHP Guide (Troubleshooting), or get help in the IHP Slack.
package GroupData <<Rectangle>> {
entity Ingredient {
{static} id
name
}
entity Recipe {
{static} id
name
}
entity EatingPlan {
{static} id
name
}
entity ShoppingList {
{static} id
name
}
}
entity User {
{static} id
email
password_hash
}
entity Invitation {
{static} id
{abstract} user_id
{abstract} group_id
{abstract} by_user_id
}
entity Group {
{static} id
name
}
User }o--o{ Group : member
User ||--o{ Invitation : creates
User ||--o{ Invitation : invites_to
Group ||--o{ Invitation : invites_into
Ingredient }o--o{ Recipe : used_in
EatingPlan }o--o{ Recipe : planned_in
ShoppingList }o--o{ EatingPlan : for
ShoppingList }o--o{ Ingredient : additionally_contains
package GroupData <<Rectangle>> {
entity Ingredient {
{static} id
name
}
entity Recipe {
{static} id
name
}
entity EatingPlan {
{static} id
name
}
entity ShoppingList {
{static} id
name
}
entity Shop {
{static} id
name
}
}
entity User {
{static} id
email
password_hash
}
entity Invitation {
{static} id
{abstract} user_id
{abstract} group_id
{abstract} by_user_id
}
entity Group {
{static} id
name
}
User }o--o{ Group : member
User ||--o{ Invitation : creates
User ||--o{ Invitation : invites_to
Group ||--o{ Invitation : invites_into
Ingredient }o--o{ Shop : sells (in amount)
ShoppingList }o--|| Shop : for
Ingredient }o--o{ Recipe : used_in
EatingPlan }o--o{ Recipe : planned_in
ShoppingList }o--o{ EatingPlan : for
ShoppingList }o--o{ Ingredient : additionally_contains