karlomikus / bar-assistant

Bar assistant is a all-in-one solution for managing your home bar
https://barassistant.app
MIT License
525 stars 22 forks source link

Add a Menu #248

Closed mikeseese closed 7 months ago

mikeseese commented 9 months ago

I want to have a public endpoint (e.g. /menu) that shows a subset of cocktails I can make. This differs from the shelf (which shows all cocktails I can make) and favorites (which shows some of my bar's specialties that I can't always make).

karlomikus commented 9 months ago

I've been thinking about the best way to make a collection of cocktails public and this seems like a really good idea. Thanks!

mikeseese commented 9 months ago

I've started looking at creating a PR for this and I noticed that Collections belong to a BarMembership instead of a Bar, but I really envision this feature would be a singleton for a Bar. I think being able to make a collection public is a great addition, but I don't think that really addresses this feature. Making a collection public would mean that I'd have to create a dedicated "Menu" collection to make it so the link would never change, and it wouldn't really make sense to add the "set a collection's contents to this collection" feature.

I was looking at adding a bar_menus table that has bar_id and cocktail_id columns instead; which feels like a redundancy, but I believe it adds a unique value prop.

karlomikus commented 9 months ago

I'm not sure if bars should have multiple menus, and then have only 1 menu active at a single time.

So having, menus, menu_cocktails tables.

mikeseese commented 9 months ago

Agreed that bars should only have one menu. I originally had menu_cocktails but wasn't sure if you preferred to have a bar prefix since the menu is associated with the bar.

mikeseese commented 9 months ago

Oh, I see what you mean. Having two tables works; I figured it could be just one table, but having 2 will be useful and prevent columns I was adding to bars

mikeseese commented 7 months ago

Thanks for implementing this @karlomikus! Sorry I didn't take this over the finish line