chore(build): frontends become one npm workspace; images build from client-services/

Platform-v2 step 2.1 (APPS_PLATFORM D-15):
- root package.json with workspaces (packages/*, waiter_pwa, manager_dashboard)
  and empty @xenia/{ui,i18n,api,access} skeletons (filled in 2.3-2.5)
- one root package-lock.json generated from the two old app locks, so every
  dependency keeps its exact version (a fresh resolve moved the Capacitor and
  Capgo native plugins and broke UI-bundle updates); apps keep nested trees
- waiter/manager Dockerfiles build with context client-services/ (npm ci per
  workspace), root .dockerignore replaces the per-app ones; manager on node 22
- Vite dedupes react/react-dom so source-imported packages share the app's React
- waiter eslint ignores build outputs and the Android project

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-13 16:47:29 +02:00
co-authored by Claude Opus 5.5
parent 3699935347
commit 905c2955b0
21 changed files with 4320 additions and 4199 deletions
-7
View File
@@ -1,7 +0,0 @@
node_modules
dist
.env
# Local-only build outputs — never part of the image build context
android
releases
dist-native
+18 -5
View File
@@ -1,3 +1,5 @@
# Build context: client-services/ (the npm workspace root, APPS_PLATFORM D-15)
# docker build -f waiter_pwa/Dockerfile .
FROM node:22-slim AS builder
# Shown in the UI bundle manifest (plan step 8); the bundle's identity is its content hash
@@ -5,19 +7,30 @@ ARG APP_VERSION=0.0.0
WORKDIR /app
COPY package.json package-lock.json* ./
RUN npm install --legacy-peer-deps
# Manifests first so the install layer is cached until a dependency changes.
# The lockfile covers every workspace, so all their package.json files are needed.
COPY package.json package-lock.json ./
COPY packages/ui/package.json packages/ui/
COPY packages/i18n/package.json packages/i18n/
COPY packages/api/package.json packages/api/
COPY packages/access/package.json packages/access/
COPY waiter_pwa/package.json waiter_pwa/
COPY manager_dashboard/package.json manager_dashboard/
RUN npm ci --workspace waiter_pwa --include-workspace-root
COPY . .
COPY packages/ packages/
COPY waiter_pwa/ waiter_pwa/
WORKDIR /app/waiter_pwa
# Web build (served to browsers) + native UI bundle that phones download from
# this server: dist/downloads/waiter-bundle.json + waiter-bundle-<hash>.zip
RUN npm run build && npx vite build --mode native && APP_VERSION=$APP_VERSION node scripts/pack-bundle.mjs
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
COPY --from=builder /app/waiter_pwa/dist /usr/share/nginx/html
RUN chmod -R 755 /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY waiter_pwa/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
+1 -1
View File
@@ -5,7 +5,7 @@ import reactRefresh from 'eslint-plugin-react-refresh'
import { defineConfig, globalIgnores } from 'eslint/config'
export default defineConfig([
globalIgnores(['dist']),
globalIgnores(['dist', 'dist-native', 'dev-dist', 'android', 'releases']),
{
files: ['**/*.{js,jsx}'],
extends: [
-7796
View File
File diff suppressed because it is too large Load Diff
+5
View File
@@ -14,6 +14,11 @@ export default defineConfig(({ mode }) => {
build: {
outDir: native ? 'dist-native' : 'dist',
},
// npm workspace (D-15): shared packages are imported from source, so make
// sure every import of React resolves to this app's copy.
resolve: {
dedupe: ['react', 'react-dom'],
},
server: {
host: '0.0.0.0',
port: 5173,