Quick Start
Get the full Staccato ecosystem running in about 15 minutes.
1. Clone and Open
git clone git@github.com:csz-digital/staccato-ios.git
cd staccato-ios
open StaccatoCoffee/StaccatoCoffee.xcodeproj2. Create Supabase Project
- Go to supabase.com and sign in
- Click New Project
- Enter project details:
- Name:
staccato-coffee - Database Password: Generate a strong password (save it!)
- Region: Choose closest to your users
- Name:
- Click Create new project and wait for provisioning
3. Get API Keys
- Go to Settings → API in your Supabase dashboard
- Copy these values:
- Project URL →
SUPABASE_URL - anon/public key →
SUPABASE_ANON_KEY
- Project URL →
4. Run Database Schema
- Go to SQL Editor in Supabase dashboard
- Copy the entire contents of
supabase/schema.sql - Paste and click Run
- Then run each migration in order from
supabase/migrations/
The schema creates 14 tables with sample data including menu categories, items, modifiers, and rewards.
5. Enable Realtime
- Go to Database → Replication
- Under “supabase_realtime”, enable these tables:
ordersorder_items
This powers the real-time order queue for staff.
6. Configure Authentication
- Go to Authentication → Providers
- Email is enabled by default
- For Apple Sign-In (optional):
- Enable Apple provider
- Enter your Apple Services ID and Team ID
- Upload your private key (.p8 file)
- For Google OAuth (optional):
- Enable Google provider
- Add OAuth client credentials
7. Configure the iOS App
Edit StaccatoCoffee/StaccatoCoffee/Core/Environment.swift:
enum AppConfig {
static var supabaseURL: String {
ProcessInfo.processInfo.environment["SUPABASE_URL"]
?? "https://YOUR-PROJECT-ID.supabase.co"
}
static var supabaseAnonKey: String {
ProcessInfo.processInfo.environment["SUPABASE_ANON_KEY"]
?? "your-anon-key-here"
}
}8. Add Supabase SDK
In Xcode:
- File → Add Package Dependencies
- Enter:
https://github.com/supabase/supabase-swift - Select version
2.0.0or later - Add to
StaccatoCoffeetarget
9. Set Signing Team
- Select the project in the navigator
- Select the
StaccatoCoffeetarget - Go to Signing & Capabilities tab
- Select your Development Team
10. Build and Run
Press Cmd+R to build and run on a simulator or device.
Test Accounts
After creating a customer account, you can promote users to staff/admin via SQL:
-- Find user
SELECT id, email FROM auth.users;
-- Promote to employee
UPDATE profiles SET role = 'employee' WHERE id = 'user-uuid-here';
-- Or promote to admin
UPDATE profiles SET role = 'admin' WHERE id = 'user-uuid-here';Test the Full Flow
- iOS App: Browse menu, add items to cart, checkout
- Staff View: Order appears in real-time order queue
- Staff View: Claim → Start Making → Mark Ready → Complete
- iOS App: Customer sees order status updates in real-time
Sample Data
The schema includes sample data:
| Category | Items |
|---|---|
| Coffee | Caffe Latte ($4.95), Cappuccino ($4.75), Americano ($3.95), Cold Brew ($4.50) |
| Tea | Green Tea ($3.50), Chai Latte ($4.95) |
| Food | Blueberry Muffin ($3.95), Butter Croissant ($3.50), Avocado Toast ($8.95) |
Modifiers: Milk options (Whole, 2%, Oat, Almond, Coconut), Sizes (Small, Medium, Large), Extras (Extra Shot, Vanilla Syrup, Caramel Syrup, Whipped Cream)
Rewards: Free Cookie (25 stars), Free Coffee (50 stars), Free Drink (100 stars), Free Breakfast (150 stars, Gold), Free Merchandise (400 stars, Platinum)