Skip to content
stacksjsPublic

About

Smakelo - local food marketplace demo: discovery + reviews, ordering + live courier delivery, and table-QR dine-in. Built on Stacks.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

647 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tipami

Discover places near you, share a good find, and try ordering from demo kitchens.

Tipami is a local food marketplace: business discovery and reviews, ordering with real courier delivery and live tracking, and table-QR ordering for dine-in. Restaurants, coffee shops, and farms.

Important

This is a demonstration. The businesses listed are real places in Los Angeles and Santa Monica, but the partner merchants, menus, reviews, orders and couriers are invented, card payments use Stripe test mode when configured, and no order placed here reaches anybody. Nothing on this site can be bought.

What it does

Discover. Browse and search real local businesses by cuisine, distance, rating and whether they are open right now, as a list or on a map.

Order. Partner merchants have full menus with modifier groups, so an order line records what was actually chosen. Delivery, pickup, or scheduled for later.

Track. Couriers stream GPS from their phones; the customer watches the courier move along the route with a live ETA.

Dine in. A QR code on the table opens the menu, opens a tab, takes orders round by round, and splits the check.

Sell. Merchants manage their menu, hours, orders and tables from the partner portal, and are paid out through Stripe Connect.

The public storefront is tipami.org.

Running it

bun install --frozen-lockfile
cp .env.example .env
./buddy key:generate
./buddy migrate
./buddy seed:demo
./buddy dev

Requires Bun >= 1.3.0 and SQLite >= 3.47.2.

Choose an invented account on the Account page to try the kitchen or courier flows. Use ./buddy dev --dashboard for the Stacks dashboard and its Marketplace section. An administrator can open the hosted Marketplace dashboard. For local dashboard access, use ./buddy user:add <email> --role admin to create an administrator. The published demo operator can use Marketplace screens on the storefront.

For delivery offer expiry, run the queue worker in a second terminal.

QUEUE_DRIVER=database ./buddy queue:work --queue delivery-offers

To exercise card checkout, configure STRIPE_SECRET_KEY and STRIPE_PUBLISHABLE_KEY from the same Stripe sandbox. For the hosted demo, set both secrets on the GitHub production environment. The demo can record orders without those keys.

For sandbox merchant onboarding, enable TIPAMI_STRIPE_CONNECT_ENABLED=true after Stripe approves the platform to collect fees and cover losses in that sandbox. The hosted demo reads the flag from the GitHub production environment variables. Partner team owners open Stripe setup from Manage. Operators can check readiness in the Marketplace listing editor.

After Stripe enables marketplace charges for the sandbox, register the platform webhook at https://tipami.org/api/payment/order-webhook for payment_intent.succeeded, payment_intent.canceled, and charge.updated. Store its signing secret as STRIPE_ORDER_WEBHOOK_SECRET in the GitHub environment. New pickup and delivery orders for linked merchants use destination card payments when both sandbox Connect and the order webhook are configured. A Stripe balance transfer is recorded after the charge, transfer, and fee agree. Cancelling a paid order also verifies the transfer and fee reversals.

For optional social sign-in, set a complete provider secret group on the same GitHub environment. Deploy derives the callbacks from the storefront domain.

Provider Environment secrets Registered callback
Google GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET https://tipami.org/auth/google/callback
Apple APPLE_CLIENT_ID, APPLE_TEAM_ID, APPLE_KEY_ID, APPLE_PRIVATE_KEY https://tipami.org/auth/apple/callback

Supply Apple's Sign in with Apple .p8 key contents as APPLE_PRIVATE_KEY. The GitHub deployment verifies which providers the account advertises and checks each configured provider's redirect before reporting success.

Mobile app

The iOS and Android Craft shells render native STX screens. Customers use the same Tipami API as the web to browse, save places and order from demo kitchens. Account links to the published terms and privacy policy and opens the courier console for courier accounts. The native apps keep sign-in tokens in the device's secure store.

Run bun run build:mobile-assets after editing the offline STX template, locale strings, or Tipami SVG. The generated fallback and app icon are bundled by ./buddy build:ios and ./buddy build:android. Set APP_URL when building against a local or staging server. If an earlier build generated a TipamiCourier.xcodeproj, regenerate the renamed iOS project in a clean build output directory. Android push uses the Firebase file set in ANDROID_GOOGLE_SERVICES_FILE.

Built on

Stacks, with ts-maps for the maps and ts-qr-codes for the QR codes.

Data

Directory listings come from regional OpenStreetMap snapshots and a curated seed informed by OpenStreetMap and Foursquare Open Source Places. The planned Foursquare cross-check is tracked in issue #18. Map tiles are served by OpenStreetMap. Checkout confirms delivery points against the Los Angeles County Countywide Address Management System, the Ventura County rooftop extract of the USDOT National Address Database, and Geobasis NRW Gebäudereferenzen. Partner menus, reviews, orders, and couriers are invented.

Ventura County address index

The storefront and farm shares read the same local rooftop index. The Build Ventura address index workflow builds it from the published USDOT release and checks two municipal rooftops and a parcel record. To refresh the index, verify the workflow artifact against its SHA256SUMS and replace app/Data/ventura-addresses.sqlite3 with the verified SQLite file. Its dataset table records the source release and row counts.

Private road routing

When OSRM is configured, buyer tracking draws the road route to the current stop. Configure separate, loopback-only OSRM engines prepared with the car and bicycle profiles for each market. Set the following origins as GitHub production environment variables for deployment, or in .env for local QA:

Market Car and motor scooter Bicycle
Los Angeles TIPAMI_OSRM_LA_CAR_URL TIPAMI_OSRM_LA_BIKE_URL
Nordrhein-Westfalen TIPAMI_OSRM_NRW_CAR_URL TIPAMI_OSRM_NRW_BIKE_URL

Use an origin such as http://127.0.0.1:15080. Give each engine region-specific OpenStreetMap data and keep access logs disabled on these private listeners. Tipami sends only the confirmed GPS fix and active stop coordinates.

Couriers choose bicycle or motor vehicle during invitation acceptance and can edit their choice in the courier console. Dispatch records the type on each assignment. Buyer tracking uses the saved type to select a routing profile. When an assignment has no saved type or its engine is unavailable, the buyer can still see the map and order status. Provisioning and hosted market checks are tracked in issue #65.

Build a fresh graph set off the production server using the Build road graphs GitHub workflow. Choose the same published Geofabrik archive date (YYMMDD) for Southern California and Nordrhein-Westfalen.

gh workflow run road-graphs.yml -f snapshot=261128

Each job checks the source extract's published checksum, builds one market and profile, and verifies public sample routes through an OSRM container bound to loopback. Successful jobs publish seven-day artifacts containing the runtime graph, source and engine manifest, attribution, and an archive checksum. After downloading an artifact, verify it with sha256sum --check *.tar.zst.sha256 from the artifact directory. Use the manifest's engine image and MLD algorithm when serving the graph.

Demo order history

An empty marketplace gets 600 invented orders through the same checkout pricing as the storefront. Of those, 576 are completed orders across 36 days, including 384 Los Angeles deliveries with courier positions recorded along OpenStreetMap car and bicycle routes. The other 24 leave working kitchen and courier examples available. Release startup keeps existing marketplace orders and never adds this history to an initialized database.

To refresh the route data, run the Build demo history routes workflow with a successful Build road graphs run ID. It verifies each archive, checks the engine and profile, and queries OSRM bound to loopback. Replace database/data/demo-history-car.json and database/data/demo-history-bike.json together from the resulting artifacts. Both stored fixtures record the source snapshot date. The seed itself runs with the checked-in data and requires no network connection. The route geometry uses OpenStreetMap data under ODbL.

Import directory updates

Fetch a regional review file, then preview selected provider IDs against the database for the marketplace you are operating.

./buddy import:places --region los-angeles --output /tmp/places.json
./buddy import:places:review /tmp/places.json
./buddy import:places:review /tmp/places.json --only node/416766635,node/439817143
./buddy import:places:review /tmp/places.json --only node/416766635,node/439817143 --apply "$reviewed_revision"

Set reviewed_revision to the revision from the preview for that exact selection. The preview shows address, coordinate, and hours changes before applying. A changed snapshot or database requires a new review. Claimed, hidden, merged, partner, and hand-curated listings remain under curation. Updates retain the original listing URL and buyer saves. New directory entries are discoverable and do not take orders.

Documentation

Full documentation for Tipami lives in docs/, covering local setup, marketplace features, web/mobile/desktop Craft apps, merchant and courier portals, operations and safety guards, roles and permissions, the HTTP API, CLI commands, deployment, and automated browser user stories (docs/stories/).

./buddy dev:docs          # preview the documentation site locally
./buddy build:docs        # build the static documentation site to dist/docs
./buddy docs:links:check  # verify internal documentation links
./buddy docs:stories      # record end-to-end user story videos and screenshots

License

MIT

About

Smakelo - local food marketplace demo: discovery + reviews, ordering + live courier delivery, and table-QR dine-in. Built on Stacks.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages