feat(webapp): restaurant bundle skeleton

Standalone customer-facing bundle for the LNbits 'restaurant'
extension, modeled on the market bundle. v1 ships single-venue
(URL-driven via /r/:slug) with REST-only order placement; festival
aggregator and NIP-17 transport are tracked as
aiolabs/restaurant#8 and #9 respectively.

Skeleton this commit lands:

  vite.restaurant.config.ts  — port 5186, dist-restaurant/, green
                                theme color, PWA manifest, alias
                                @/app.config -> restaurant-app/.
  restaurant.html             — entry; title 'Restaurant — Order'.
  src/restaurant-app/
    main.ts                   — startApp + PWA SW registration.
    app.ts                    — module registration glue
                                (baseModule + restaurantModule).
    app.config.ts             — modules.restaurant config block.
                                Reserves a features:{} slot for
                                tier-gated UI (aiolabs/restaurant#2).
    App.vue                   — AppShell with Browse / Cart /
                                Orders bottom-nav tabs.
  src/modules/restaurant/
    index.ts                  — ModulePlugin shell with the future-
                                roadmap context inlined as
                                top-of-file comment (#1..#9).
    views/HomePage.vue        — placeholder; commit 4 replaces it
                                with real discovery + redirect.
  src/core/di-container.ts    — RESTAURANT_API +
                                RESTAURANT_NOSTR_SYNC tokens
                                reserved (consumers land in 3 / 8).
  package.json                — dev:restaurant, build:restaurant,
                                preview:restaurant scripts and
                                append to dev:all + build:demo.

Verified:
  - vue-tsc -b passes (whole webapp, all bundles).
  - vite build --config vite.restaurant.config.ts builds clean
    against VITE_LNBITS_BASE_URL=http://localhost:5001
    VITE_RESTAURANT_DEFAULT_SLUG=big-jays-bustaurant.
  - vite dev server boots on :5186 and serves the entry.

Companion branch: extension repo aiolabs/restaurant on branch
feat/restaurant-by-slug already provides
GET /restaurants/by-slug/{slug} that the webapp will consume in
commit 3.
This commit is contained in:
Padreug 2026-05-11 09:42:21 +02:00
commit 41fbad3d90
10 changed files with 526 additions and 2 deletions

View file

@ -30,8 +30,11 @@
"dev:forum": "vite --host --config vite.forum.config.ts",
"build:forum": "vue-tsc -b && vite build --config vite.forum.config.ts",
"preview:forum": "vite preview --host --config vite.forum.config.ts",
"dev:all": "concurrently -n hub,libra,sortir,wallet,chat,forum,market,tasks -c blue,magenta,cyan,yellow,green,blue,red,gray \"npm:dev\" \"npm:dev:libra\" \"npm:dev:activities\" \"npm:dev:wallet\" \"npm:dev:chat\" \"npm:dev:forum\" \"npm:dev:market\" \"npm:dev:tasks\"",
"build:demo": "npm run build && VITE_BASE_PATH=/sortir/ npm run build:activities && VITE_BASE_PATH=/libra/ npm run build:libra && VITE_BASE_PATH=/wallet/ npm run build:wallet && VITE_BASE_PATH=/chat/ npm run build:chat && VITE_BASE_PATH=/forum/ npm run build:forum && VITE_BASE_PATH=/market/ npm run build:market && VITE_BASE_PATH=/tasks/ npm run build:tasks",
"dev:restaurant": "vite --host --config vite.restaurant.config.ts",
"build:restaurant": "vue-tsc -b && vite build --config vite.restaurant.config.ts",
"preview:restaurant": "vite preview --host --config vite.restaurant.config.ts",
"dev:all": "concurrently -n hub,libra,sortir,wallet,chat,forum,market,tasks,restaurant -c blue,magenta,cyan,yellow,green,blue,red,gray,green \"npm:dev\" \"npm:dev:libra\" \"npm:dev:activities\" \"npm:dev:wallet\" \"npm:dev:chat\" \"npm:dev:forum\" \"npm:dev:market\" \"npm:dev:tasks\" \"npm:dev:restaurant\"",
"build:demo": "npm run build && VITE_BASE_PATH=/sortir/ npm run build:activities && VITE_BASE_PATH=/libra/ npm run build:libra && VITE_BASE_PATH=/wallet/ npm run build:wallet && VITE_BASE_PATH=/chat/ npm run build:chat && VITE_BASE_PATH=/forum/ npm run build:forum && VITE_BASE_PATH=/market/ npm run build:market && VITE_BASE_PATH=/tasks/ npm run build:tasks && VITE_BASE_PATH=/restaurant/ npm run build:restaurant",
"electron:dev": "concurrently \"vite --host\" \"electron-forge start\"",
"electron:build": "vue-tsc -b && vite build && electron-builder",
"electron:package": "electron-builder",