x

Restaurant architecture advice needed

I'm implementing integration for restaurants and looking for advice on architecture. I understand it's pretty complicated and I don't expect any ready solution answer here but even some small thoughts and suggestions would be great to have.

Here are the main entities used in my app (let's call it Restaurant).

* Location. Point of sale for the Restaurant. There are many of them and each Location has many Menus
* Menu. Aggregates different Menu Items that visitors can choose to order
* Dish. A blueprint for a Menu Item. When Dish is added to a Menu it creates a Menu Item in this Menu. The same Dish can be added to multiple Menus with different properties (i.e. different prices, Sizes, or Extras)
* Menu Item. A Menu line Item that available for the visitors. Can have Sizes and Extras. Also, each Menu Item can have its own Tax
* Menu Item Size. Menu Item can have either a single Size (single price) or multiple Sizes (multiple prices)
* Menu Item Extra. Menu Items can have Extras. They are not much different from Sizes technically. They also have quantity and price. The main difference is that Extras are optional. Extras also belong to specific Items, same as Sizes

Here is an example.
Let's say my cafe has two Menus: Morning Menu and Evening Menu.
And a Dish: Coffee Latte
This Dish is added to both Menus and these are the related Menu Items:
- in the Morning Menu: Coffee Latte
- in the Evening Menu: Coffee Latte
And this Coffee Latte Menu Item has these Sizes and Prices:
- in the Morning Menu: Sizes Small/Regular/Large, Prices: 6/8/10
- in the Evening Menu: Sizes Regular/Large, Prices: 10/13
And these Extras:
- in the Morning Menu: Caramel Syrup, Soy Milk
- in the Evening Menu: Caramel Syrup, Soy Milk, Decaf

So here are my thoughts and problems with representing this architecture on Square:
1) Location => Square Location? Seems like no problems here
2) Menu => Square Category? A possible problem here is that Square Category can only be attached to Square Catalog Item (can't be attached to Item Variation)
3) Dish => Square Catalog Item (SCI)? If Dish would be SCI then Menu Items would be its SCVs. But that's not an option because SCVs don't have taxes, only SCIs have them. The other problem here is that there is a limit on 250 SCVs for each SCIs. Our Dishes sometimes has more Menu Items. A possible solution for the taxes might be not to use taxes on the Square side at all. And for the limit to using multiple SCIs for the same Dish in case of > 250 Menu Items. But then it's not clear what to do with Sizes and Extras
4) Menu Item => Square Catalog Variation (SCV) or SquareCatalogItem(SCI)? See the problems above. So it seems like SCI is a proper choice here.
5) Menu Item Size => Square Catalog Variation (SCV)? If Menu Items would be represented by SCIs then SCVs for Sizes seems to work
6) Menu Item Extra => Square Catalog Modifier (SCM)? The problem with SCMs is that they don't have quantity. Our Extras can. A possible solution here might be adding multiple SCMs to represent quantity.

So given the above thoughts, the draft version of Square architecture that i have now is the following:
1) Square Locations represent Restaurant Locations
2) Square Categories represent Restaurant Menus
3) Restaurant Dishes are not represented on the Square side
4) Square Catalog Items (SCI) represent our Restaurant Menus Items. So for the same dish in different Menus there will be separate SCIs that might have different Variations and Taxes
5) Square Catalog Variations represent Restaurant Menu Items Sizes. Multiple Variation if there are Sizes and single Variation if there are no Sizes
6) Square Catalog Modifiers represents Restaurant Menu Item Extras

P.S. I'm not sure which place is more correct for my question: here or on https://developer.squareup.com/forums/ . Please let me know if I should ask there 

 

452 Views
Message 1 of 1
Report
0 REPLIES 0