Public
Firewood Cafe menu with SquareMenu ordering flow
1 Like
1 BranchVal Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data โ all from the browser, and deployed in milliseconds.
A modern, AI-powered menu management system for Firewood Cafe with real-time updates and PIN-protected editing.
- Beautiful responsive menu with categories: Breakfast, Burgers, Lunch, Drinks
- Tap any dish to see full details, ingredients, and multilingual descriptions
- AI-generated descriptions in English, Tagalog, and Chinese
- Smooth cart management with checkout flow
- Buzzer system for order pickup
- Live data: Always displays the latest menu from blob storage
- PIN Security: Enter last 4 digits of phone number to unlock
- Real-time editing: Edit dish names, descriptions, prices
- Hide/show dishes: Toggle visibility without deleting
- Add new dishes: Quick button to add menu items
- Delete dishes: Remove items with confirmation
- Instant save: Changes go live immediately in blob storage
- Smart generation: Type a few words about a new dish (e.g., "spicy chicken curry with rice")
- AI handles everything: Claude generates:
- Professional dish name
- Appetizing 1-2 sentence description
- Relevant emoji
- Ingredient list
- Menu tags (Spicy, Vegetarian, etc.)
- One-click add: Add generated dishes directly to any category
index.html- Customer-facing menu (loads data from API)edit.tsx- PIN-protected editor with AI integrationapi.ts- Backend API with three endpoints:GET /api/menu- Fetch current menuPOST /api/menu- Save menu (PIN required)POST /api/generate-dish- AI dish generation
- Blob Storage: Menu data persists in Val Town blob storage (key:
firewood_cafe_menu_data) - Fallback: Default menu loads if no blob data exists
- No reload needed: Changes save to blob and appear instantly on customer menu
CLAUDE_API_KEY - Anthropic API key for AI dish generation
MENU_EDIT_PIN - 4-digit PIN for menu editor (default: 3456)
- Get your Claude API key from https://console.anthropic.com
- Update the env vars in Val Town dashboard:
CLAUDE_API_KEY: Your actual keyMENU_EDIT_PIN: Last 4 digits of Tara's phone number
Visit the main menu and:
- Browse categories (swipe left to scroll)
- Tap dish names to learn more
- Tap ingredients to see details
- Add items to cart
- Proceed to checkout (buzzer number on completion)
- Click the ๐ง Edit link in the menu header
- Enter your 4-digit PIN
- Edit existing dishes or use AI Assist to create new ones
- Click ๐พ Save when done
- Changes go live immediately โจ
- In the editor, type a description (e.g., "crispy tofu spring rolls with sweet chilli")
- Click Generate Dish
- Review the AI output
- Click Add to Menu and select a category
- Saved instantly!
The default menu structure is in api.ts. Edit the getDefaultMenu() function to change it.
Both menus use the same color scheme:
- Gold:
#D4841B(primary) - Dark brown:
#1a1410(background) - See CSS variables in HTML for full customization
Currently supports: Breakfast, Burgers, Lunch, Drinks To add more, update:
api.ts-getDefaultMenu()structureindex.html- Category buttons and sectionsedit.tsx- Rendering logic
- Tara edits menu โ PIN verified โ Changes sent to
/api/menu(POST) - API saves to blob โ Menu persists
- Customers load menu โ
/api/menu(GET) fetches latest blob data - No page reload needed โ Changes visible immediately
- Tara types prompt โ Sent to
/api/generate-dish - Claude processes โ Returns structured dish data (JSON)
- Preview shown โ Tara confirms and selects category
- Saved instantly โ Added to menu in blob
- PIN Security: Use your phone's last 4 digits so only you remember it
- Bulk edits: Edit all dishes at once; save them all together
- AI prompts: Be specific for better results (ingredients work great!)
- Testing: Use PIN
3456for testing (change it in env vars)
- Menu: https://jgwynne7_4bf3679b--426557d24b8611f18c41ee650bb23af1.web.val.run
- Editor: https://jgwynne7_4bf3679b--a91085684c2811f188dfee650bb23af1.web.val.run
- API: https://jgwynne7_4bf3679b--6c4c727c4c2811f1b8d4ee650bb23af1.web.val.run/api/menu
Built with โค๏ธ for Firewood Cafe