diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e82f230..db26928 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,7 @@ jobs: strategy: fail-fast: false matrix: - app: [tictactogether, stocksync, orderup, cowrite, outagenet, yardgate] + app: [tictactogether, stocksync, orderup, cowrite, outagenet, yardgate, eventfloor] steps: - uses: actions/checkout@v7 - uses: pnpm/action-setup@v6 @@ -87,6 +87,8 @@ jobs: scheme: OutageNet - app: yardgate scheme: YardGate + - app: eventfloor + scheme: EventFloor steps: - uses: actions/checkout@v7 - uses: pnpm/action-setup@v6 diff --git a/README.md b/README.md index 0f31ba4..a24c27c 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ accounts or server, and shows a different way to keep shared state in sync. | Cowrite | [`apps/cowrite`](./apps/cowrite) | Shared plain-text document with live cursors, built on the SDK's replicated documents (`DataStore`) in an MLS group. | | OutageNet | [`apps/outagenet`](./apps/outagenet) | Public-sector style outage coordination: status + handoff accept over Bluetooth, mock HQ sync with idempotent ingest. | | YardGate | [`apps/yardgate`](./apps/yardgate) | Logistics yard check-in: MeshServices discover + invoke, gate officer approve/deny, optional relay hop. | +| Event Floor | [`apps/eventfloor`](./apps/eventfloor) | Live events: Flow A staff MLS dispatch + Flow B gate admission ledger and mock platform sync (`scanId` dedupe). | Each app's README explains how to run it, how its sync works and what its tests cover. @@ -77,7 +78,11 @@ pnpm --filter @offline-app-examples/stocksync ios -- --device pnpm --filter @offline-app-examples/stocksync android ``` -Replace `stocksync` with `tictactogether`, `orderup`, `cowrite`, `outagenet`, or `yardgate` for the other apps. +Replace `stocksync` with `tictactogether`, `orderup`, `cowrite`, `outagenet`, `yardgate`, or `eventfloor` for the other apps. + +### Event Floor + +Record `demo-staff.gif` and `demo-gate.gif` in [`apps/eventfloor`](./apps/eventfloor) and embed here when catalogue-ready (see app README). For iOS you can also open the app's `ios/*.xcworkspace` in Xcode, choose your team under Signing & Capabilities, and run on each phone. Debug builds load JavaScript from Metro; install a Release build to use an app away from your computer. diff --git a/apps/eventfloor/.eslintrc.js b/apps/eventfloor/.eslintrc.js new file mode 100644 index 0000000..187894b --- /dev/null +++ b/apps/eventfloor/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + root: true, + extends: '@react-native', +}; diff --git a/apps/eventfloor/.gitignore b/apps/eventfloor/.gitignore new file mode 100644 index 0000000..7846bf0 --- /dev/null +++ b/apps/eventfloor/.gitignore @@ -0,0 +1,16 @@ +node_modules/ +.expo/ +dist/ +build/ +ios/Pods/ +ios/build/ +android/app/build/ +android/build/ +android/.gradle/ +**/.cxx/ +android/local.properties +*.jsbundle +.DS_Store +.env* +!.env.example +ios/.xcode.env.local diff --git a/apps/eventfloor/.prettierrc.json b/apps/eventfloor/.prettierrc.json new file mode 100644 index 0000000..0594d04 --- /dev/null +++ b/apps/eventfloor/.prettierrc.json @@ -0,0 +1 @@ +{"singleQuote":true,"trailingComma":"all","bracketSpacing":true} diff --git a/apps/eventfloor/App.tsx b/apps/eventfloor/App.tsx new file mode 100644 index 0000000..0b62082 --- /dev/null +++ b/apps/eventfloor/App.tsx @@ -0,0 +1,297 @@ +import '@offline-app-examples/ui/global.css'; +import { Button, Text } from '@offline-app-examples/ui'; +import React, { useState } from 'react'; +import { Pressable, StatusBar, TextInput, View } from 'react-native'; +import { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context'; +import { GateFlow, type GateRole } from './src/flows/GateFlow'; +import { StaffFlow, type StaffRole } from './src/flows/StaffFlow'; +import { signInStaff, STAFF_ROSTER, type StaffSession } from './src/domain/staff'; +import { DEMO_EVENT } from './src/domain/tickets'; +import { EventHero } from './src/ui/illustrations'; + +type Flow = 'home' | 'staff' | 'gate'; +type StaffSetup = { role: StaffRole; session: StaffSession | null; label: string }; +type GateSetup = { role: GateRole; gateName: string }; + +export default function App() { + const [flow, setFlow] = useState('home'); + const [staffSetup, setStaffSetup] = useState(null); + const [gateSetup, setGateSetup] = useState(null); + + if (flow === 'staff' && staffSetup) { + return ( + + + { + setFlow('home'); + setStaffSetup(null); + }} + /> + + ); + } + + if (flow === 'gate' && gateSetup) { + return ( + + + { + setFlow('home'); + setGateSetup(null); + }} + /> + + ); + } + + return ( + + + { + setStaffSetup(setup); + setFlow('staff'); + }} + onGate={(setup) => { + setGateSetup(setup); + setFlow('gate'); + }} + /> + + ); +} + +function HomeLobby({ + onStaff, + onGate, +}: { + onStaff: (setup: StaffSetup) => void; + onGate: (setup: GateSetup) => void; +}) { + const [mode, setMode] = useState<'pick' | 'staff' | 'gate'>('pick'); + + if (mode === 'staff') { + return setMode('pick')} onStart={onStaff} />; + } + if (mode === 'gate') { + return setMode('pick')} onStart={onGate} />; + } + + return ( + + + Event Floor + + {DEMO_EVENT.name} — offline-capable staff dispatch and gate admission over Bluetooth mesh + (SDK 0.27). + + + + + setMode('staff')} + className="border-foreground mb-3 rounded-xl border-2 px-4 py-4" + > + Flow A — Staff dispatch + + MLS staff group, crowd relay, demo staff sign-in + + + setMode('gate')} + className="border-foreground rounded-xl border-2 px-4 py-4" + > + Flow B — Gate sync + + Shared admission ledger + mock platform ingest with scanId dedupe + + + + + ); +} + +function StaffLobby({ + onBack, + onStart, +}: { + onBack: () => void; + onStart: (setup: StaffSetup) => void; +}) { + const [role, setRole] = useState('sender'); + const [staffId, setStaffId] = useState(STAFF_ROSTER[0].staffId); + const [pin, setPin] = useState(''); + const [relayName, setRelayName] = useState('Crowd relay'); + const [error, setError] = useState(''); + + return ( + + + + Staff channel + setRole(id as StaffRole)} + /> + {role === 'relay' ? ( + <> + + Relay label + + + + ) : ( + + )} + {error ? {error} : null} + + + + ); +} + +function GateLobby({ + onBack, + onStart, +}: { + onBack: () => void; + onStart: (setup: GateSetup) => void; +}) { + const [role, setRole] = useState('host'); + const [gateName, setGateName] = useState('North gate'); + + return ( + + + + Admissions + setRole(id as GateRole)} + /> + + Gate name + + + + + + ); +} + +function StaffSignIn({ + staffId, + onStaffId, + pin, + onPin, +}: { + staffId: string; + onStaffId: (id: string) => void; + pin: string; + onPin: (p: string) => void; +}) { + return ( + + + Demo staff sign-in (OfflineID stand-in) + + {STAFF_ROSTER.map((s) => ( + onStaffId(s.staffId)} + className={`rounded-lg border-2 px-3 py-2 ${staffId === s.staffId ? 'border-foreground bg-muted' : 'border-muted'}`} + > + {s.displayName} + PIN {s.pin} + + ))} + + + ); +} + +function RolePick({ + options, + selected, + onSelect, +}: { + options: { id: string; title: string; hint: string }[]; + selected: string; + onSelect: (id: string) => void; +}) { + return ( + + {options.map((o) => ( + onSelect(o.id)} + className={`rounded-xl border-2 px-4 py-3 ${selected === o.id ? 'border-foreground bg-muted' : 'border-muted'}`} + > + {o.title} + {o.hint} + + ))} + + ); +} diff --git a/apps/eventfloor/Gemfile b/apps/eventfloor/Gemfile new file mode 100644 index 0000000..0263838 --- /dev/null +++ b/apps/eventfloor/Gemfile @@ -0,0 +1,17 @@ +source 'https://rubygems.org' + +# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version +ruby ">= 2.6.10" + +# Exclude problematic versions of cocoapods and activesupport that causes build failures. +gem 'cocoapods', '~> 1.16.0' +gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0' +gem 'xcodeproj', '>= 1.25.0', '< 1.28.0' +gem 'concurrent-ruby', '< 1.3.4' + +# Ruby 3.4.0 has removed some libraries from the standard library. +gem 'bigdecimal' +gem 'logger' +gem 'benchmark' +gem 'mutex_m' +gem 'nkf' diff --git a/apps/eventfloor/Gemfile.lock b/apps/eventfloor/Gemfile.lock new file mode 100644 index 0000000..0df39b4 --- /dev/null +++ b/apps/eventfloor/Gemfile.lock @@ -0,0 +1,200 @@ +GEM + remote: https://rubygems.org/ + specs: + CFPropertyList (3.0.8) + activesupport (7.2.4) + base64 + benchmark (>= 0.3) + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5, < 3) + drb + i18n (>= 1.6, < 2) + logger (>= 1.4.2) + minitest (>= 5.1, < 6) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + addressable (2.9.0) + public_suffix (>= 2.0.2, < 8.0) + algoliasearch (1.27.5) + httpclient (~> 2.8, >= 2.8.3) + json (>= 1.5.1) + atomos (0.1.3) + base64 (0.3.0) + benchmark (0.5.0) + bigdecimal (4.1.3) + claide (1.1.0) + cocoapods (1.16.2) + addressable (~> 2.8) + claide (>= 1.0.2, < 2.0) + cocoapods-core (= 1.16.2) + cocoapods-deintegrate (>= 1.0.3, < 2.0) + cocoapods-downloader (>= 2.1, < 3.0) + cocoapods-plugins (>= 1.0.0, < 2.0) + cocoapods-search (>= 1.0.0, < 2.0) + cocoapods-trunk (>= 1.6.0, < 2.0) + cocoapods-try (>= 1.1.0, < 2.0) + colored2 (~> 3.1) + escape (~> 0.0.4) + fourflusher (>= 2.3.0, < 3.0) + gh_inspector (~> 1.0) + molinillo (~> 0.8.0) + nap (~> 1.0) + ruby-macho (>= 2.3.0, < 3.0) + xcodeproj (>= 1.27.0, < 2.0) + cocoapods-core (1.16.2) + activesupport (>= 5.0, < 8) + addressable (~> 2.8) + algoliasearch (~> 1.0) + concurrent-ruby (~> 1.1) + fuzzy_match (~> 2.0.4) + nap (~> 1.0) + netrc (~> 0.11) + public_suffix (~> 4.0) + typhoeus (~> 1.0) + cocoapods-deintegrate (1.0.5) + cocoapods-downloader (2.1) + cocoapods-plugins (1.0.0) + nap + cocoapods-search (1.0.1) + cocoapods-trunk (1.6.0) + nap (>= 0.8, < 2.0) + netrc (~> 0.11) + cocoapods-try (1.2.0) + colored2 (3.1.2) + concurrent-ruby (1.3.3) + connection_pool (2.5.5) + drb (2.2.3) + escape (0.0.4) + ethon (0.18.0) + ffi (>= 1.15.0) + logger + ffi (1.17.4) + ffi (1.17.4-aarch64-linux-gnu) + ffi (1.17.4-aarch64-linux-musl) + ffi (1.17.4-arm-linux-gnu) + ffi (1.17.4-arm-linux-musl) + ffi (1.17.4-arm64-darwin) + ffi (1.17.4-x86-linux-gnu) + ffi (1.17.4-x86-linux-musl) + ffi (1.17.4-x86_64-darwin) + ffi (1.17.4-x86_64-linux-gnu) + ffi (1.17.4-x86_64-linux-musl) + fourflusher (2.3.1) + fuzzy_match (2.0.4) + gh_inspector (1.1.3) + httpclient (2.9.0) + mutex_m + i18n (1.15.2) + concurrent-ruby (~> 1.0) + json (3.0.2) + logger (1.7.0) + minitest (5.27.0) + molinillo (0.8.0) + mutex_m (0.3.0) + nanaimo (0.4.0) + nap (1.1.0) + netrc (0.11.0) + nkf (0.3.0) + public_suffix (4.0.7) + rexml (3.4.4) + ruby-macho (2.5.1) + securerandom (0.4.1) + typhoeus (1.6.0) + ethon (>= 0.18.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + xcodeproj (1.27.0) + CFPropertyList (>= 2.3.3, < 4.0) + atomos (~> 0.1.3) + claide (>= 1.0.2, < 2.0) + colored2 (~> 3.1) + nanaimo (~> 0.4.0) + rexml (>= 3.3.6, < 4.0) + +PLATFORMS + aarch64-linux-gnu + aarch64-linux-musl + arm-linux-gnu + arm-linux-musl + arm64-darwin + ruby + x86-linux-gnu + x86-linux-musl + x86_64-darwin + x86_64-linux-gnu + x86_64-linux-musl + +DEPENDENCIES + activesupport (>= 6.1.7.5, != 7.1.0) + benchmark + bigdecimal + cocoapods (~> 1.16.0) + concurrent-ruby (< 1.3.4) + logger + mutex_m + nkf + xcodeproj (>= 1.25.0, < 1.28.0) + +CHECKSUMS + CFPropertyList (3.0.8) sha256=2c99d0d980536d3d7ab252f7bd59ac8be50fbdd1ff487c98c949bb66bb114261 + activesupport (7.2.4) sha256=b97027b31e111675dba67b86edcd589acc25a0dddf8eecacca18d33a703a0788 + addressable (2.9.0) sha256=7fdf6ac3660f7f4e867a0838be3f6cf722ace541dd97767fa42bc6cfa980c7af + algoliasearch (1.27.5) sha256=26c1cddf3c2ec4bd60c148389e42702c98fdac862881dc6b07a4c0b89ffec853 + atomos (0.1.3) sha256=7d43b22f2454a36bace5532d30785b06de3711399cb1c6bf932573eda536789f + base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b + benchmark (0.5.0) sha256=465df122341aedcb81a2a24b4d3bd19b6c67c1530713fd533f3ff034e419236c + bigdecimal (4.1.3) sha256=61ebe1e5e559bdc3cc6f2c0ee7f427321fc838f59611c294356eb04d6e21cf66 + claide (1.1.0) sha256=6d3c5c089dde904d96aa30e73306d0d4bd444b1accb9b3125ce14a3c0183f82e + cocoapods (1.16.2) sha256=0ff1c860f32df3db8b16df09b58da1a6bb2a12fe55f6d5e8be994a74fadd1e5e + cocoapods-core (1.16.2) sha256=4bb1b5c420691e60cf36fa227dec6bc48c096c34c97bb7aa512ea7f3246fc12b + cocoapods-deintegrate (1.0.5) sha256=517c2a448ef563afe99b6e7668704c27f5de9e02715a88ee9de6974dc1b3f6a2 + cocoapods-downloader (2.1) sha256=bb6ebe1b3966dc4055de54f7a28b773485ac724fdf575d9bee2212d235e7b6d1 + cocoapods-plugins (1.0.0) sha256=725d17ce90b52f862e73476623fd91441b4430b742d8a071000831efb440ca9a + cocoapods-search (1.0.1) sha256=1b133b0e6719ed439bd840e84a1828cca46425ab73a11eff5e096c3b2df05589 + cocoapods-trunk (1.6.0) sha256=5f5bda8c172afead48fa2d43a718cf534b1313c367ba1194cebdeb9bfee9ed31 + cocoapods-try (1.2.0) sha256=145b946c6e7747ed0301d975165157951153d27469e6b2763c83e25c84b9defe + colored2 (3.1.2) sha256=b13c2bd7eeae2cf7356a62501d398e72fde78780bd26aec6a979578293c28b4a + concurrent-ruby (1.3.3) sha256=4f9cd28965c4dcf83ffd3ea7304f9323277be8525819cb18a3b61edcb56a7c6a + connection_pool (2.5.5) sha256=e54ff92855753df1fd7c59fa04a398833355f27dd14c074f8c83a05f72a716ad + drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373 + escape (0.0.4) sha256=e49f44ae2b4f47c6a3abd544ae77fe4157802794e32f19b8e773cbc4dcec4169 + ethon (0.18.0) sha256=b598afc9f30448cb068b850714b7d6948e941476095d04f90a4ac65b8d6efcb2 + ffi (1.17.4) sha256=bcd1642e06f0d16fc9e09ac6d49c3a7298b9789bcb58127302f934e437d60acf + ffi (1.17.4-aarch64-linux-gnu) sha256=b208f06f91ffd8f5e1193da3cae3d2ccfc27fc36fba577baf698d26d91c080df + ffi (1.17.4-aarch64-linux-musl) sha256=9286b7a615f2676245283aef0a0a3b475ae3aae2bb5448baace630bb77b91f39 + ffi (1.17.4-arm-linux-gnu) sha256=d6dbddf7cb77bf955411af5f187a65b8cd378cb003c15c05697f5feee1cb1564 + ffi (1.17.4-arm-linux-musl) sha256=9d4838ded0465bef6e2426935f6bcc93134b6616785a84ffd2a3d82bc3cf6f95 + ffi (1.17.4-arm64-darwin) sha256=19071aaf1419251b0a46852abf960e77330a3b334d13a4ab51d58b31a937001b + ffi (1.17.4-x86-linux-gnu) sha256=38e150df5f4ca555e25beca4090823ae09657bceded154e3c52f8631c1ed72cf + ffi (1.17.4-x86-linux-musl) sha256=fbeec0fc7c795bcf86f623bb18d31ea1820f7bd580e1703a3d3740d527437809 + ffi (1.17.4-x86_64-darwin) sha256=aa70390523cf3235096cf64962b709b4cfbd5c082a2cb2ae714eb0fe2ccda496 + ffi (1.17.4-x86_64-linux-gnu) sha256=9d3db14c2eae074b382fa9c083fe95aec6e0a1451da249eab096c34002bc752d + ffi (1.17.4-x86_64-linux-musl) sha256=3fdf9888483de005f8ef8d1cf2d3b20d86626af206cbf780f6a6a12439a9c49e + fourflusher (2.3.1) sha256=1b3de61c7c791b6a4e64f31e3719eb25203d151746bb519a0292bff1065ccaa9 + fuzzy_match (2.0.4) sha256=b5de4f95816589c5b5c3ad13770c0af539b75131c158135b3f3bbba75d0cfca5 + gh_inspector (1.1.3) sha256=04cca7171b87164e053aa43147971d3b7f500fcb58177698886b48a9fc4a1939 + httpclient (2.9.0) sha256=4b645958e494b2f86c2f8a2f304c959baa273a310e77a2931ddb986d83e498c8 + i18n (1.15.2) sha256=00f9eb62412fe593b2a65a97daa75300d37abb8f7202ec748e94b6d46a9dd1b5 + json (3.0.2) sha256=8e6d7e7b11384c21230430cef90b71f14849a34a1f4452796670f7c981bd19df + logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203 + minitest (5.27.0) sha256=2d3b17f8a36fe7801c1adcffdbc38233b938eb0b4966e97a6739055a45fa77d5 + molinillo (0.8.0) sha256=efbff2716324e2a30bccd3eba1ff3a735f4d5d53ffddbc6a2f32c0ca9433045d + mutex_m (0.3.0) sha256=cfcb04ac16b69c4813777022fdceda24e9f798e48092a2b817eb4c0a782b0751 + nanaimo (0.4.0) sha256=faf069551bab17f15169c1f74a1c73c220657e71b6e900919897a10d991d0723 + nap (1.1.0) sha256=949691660f9d041d75be611bb2a8d2fd559c467537deac241f4097d9b5eea576 + netrc (0.11.0) sha256=de1ce33da8c99ab1d97871726cba75151113f117146becbe45aa85cb3dabee3f + nkf (0.3.0) sha256=357a8dbeba38b727b75930f665146546076a394a1c243faf634ff176e3588895 + public_suffix (4.0.7) sha256=8be161e2421f8d45b0098c042c06486789731ea93dc3a896d30554ee38b573b8 + rexml (3.4.4) sha256=19e0a2c3425dfbf2d4fc1189747bdb2f849b6c5e74180401b15734bc97b5d142 + ruby-macho (2.5.1) sha256=9075e52e0f9270b552a90b24fcc6219ad149b0d15eae1bc364ecd0ac8984f5c9 + securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1 + typhoeus (1.6.0) sha256=bacc41c23e379547e29801dc235cd1699b70b955a1ba3d32b2b877aa844c331d + tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b + xcodeproj (1.27.0) sha256=8cc7a73b4505c227deab044dce118ede787041c702bc47636856a2e566f854d3 + +RUBY VERSION + ruby 4.0.3 + +BUNDLED WITH + 4.0.10 diff --git a/apps/eventfloor/README.md b/apps/eventfloor/README.md new file mode 100644 index 0000000..b5bf1f3 --- /dev/null +++ b/apps/eventfloor/README.md @@ -0,0 +1,71 @@ +# Event Floor + +Live-events demo app with **two flows** in one binary: **staff dispatch** when cell is saturated, and **gate admission sync** when scanners cannot reach the cloud. Everything runs over **Bluetooth mesh** (Mesh SDK 0.27) — no Wi‑Fi Direct payload, no accounts. + +Built on `@offline-app-examples/mesh` (rooms, MLS group mode, mesh relay) and `@offline-app-examples/ui`. + +## Flow A — Staff dispatch + +- **Staff sender** hosts an MLS **group** room and broadcasts encrypted staff alerts (demo roster + PIN stand in for OfflineID sign-in). +- **Staff receiver** joins the group and acks alerts. +- **Crowd relay** runs mesh relay only — forwards traffic, UI shows neighbor count, **no staff payload**. + +**Phones:** 3 recommended (sender, relay, receiver). Works with 2 in direct BLE range (skip relay). + +## Flow B — Gate sync + +- **Lead scanner** hosts the admission ledger (host-authoritative snapshots). +- **Gate scanners** propose scans; ledger dedupes **ticket ids** so a second gate shows **already used**. +- **Sync to platform (mock)** ingests by **`scanId`** with visible **dupes dropped** (same pattern as OutageNet HQ). + +**Phones:** 2 minimum (lead + scanner); optional third as **gate relay**. + +## Demo scripts (~5 min each) + +### Staff (Flow A) + +1. **A:** Flow A → Staff sender → Security Lead → PIN `1001` → Start. +2. **B:** Crowd relay → Start (between A and C if needed). +3. **C:** Staff receiver → Medical Lead → PIN `2002` → Start (joins sender). +4. **A:** Send “Medic needed — guest assist” for Section B. +5. **C:** Alert appears → **Ack**. Relay strip shows neighbors only. + +### Gate (Flow B) + +1. **A:** Flow B → Lead scanner → “North gate” → Start. +2. **B:** Gate scanner → “South gate” → Start (joins lead). +3. **A:** Tap **T-1001** → admitted on ledger. +4. **B:** Tap **T-1001** → **already used**. +5. **A:** **Sync to platform** → tap again → **dupes dropped** increments. + +## Run + +```sh +pnpm install +cd apps/eventfloor +bundle install +cd ios && bundle exec pod install && cd ../.. +pnpm --filter @offline-app-examples/eventfloor dev +``` + +Second terminal: `cd apps/eventfloor && npx react-native run-ios --interactive` (or Android). + +Use **physical phones** with Bluetooth on. Debug builds need Metro. + +## Reset + +Clear app data or reinstall. Seeded tickets and staff PINs are fixed in `src/domain/`. + +## Catalogue GIFs + +Add `demo-staff.gif` and `demo-gate.gif` in this folder after recording on devices (root README embeds them). + +## Tests + +```sh +pnpm --filter @offline-app-examples/eventfloor test +``` + +## Licensing + +Example app code: [MIT-0](../../LICENSE). `@offline-protocol/mesh-sdk` is [AGPL-3.0-only or commercial](https://www.offlineprotocol.com/docs/operations/licensing). diff --git a/apps/eventfloor/__tests__/admission.test.ts b/apps/eventfloor/__tests__/admission.test.ts new file mode 100644 index 0000000..70819c0 --- /dev/null +++ b/apps/eventfloor/__tests__/admission.test.ts @@ -0,0 +1,56 @@ +import { describe, expect, it } from '@jest/globals'; +import { + admissionByTicket, + buildScanProposal, + emptyHost, + hostReducer, + parseGateMessage, + snapshotOf, +} from '../src/domain/admission'; +import { ingestToPlatform } from '../src/domain/platform'; + +describe('admission ledger', () => { + it('dedupes ticket ids on host', () => { + const proposal = buildScanProposal({ + ticketId: 'T-1001', + eventId: 'evt', + gateId: 'g1', + gateName: 'North', + deviceId: 'd1', + now: 1, + }); + if ('error' in proposal) throw new Error('expected record'); + let host = hostReducer(emptyHost(), { type: 'propose', record: proposal.record }); + host = hostReducer(host, { type: 'propose', record: { ...proposal.record, scanId: 'scan-2' } }); + expect(host.admissions).toHaveLength(1); + }); + + it('round-trips gate messages', () => { + const host = hostReducer(emptyHost(), { + type: 'propose', + record: { + scanId: 's1', + ticketId: 'T-1001', + eventId: 'evt', + gateId: 'g', + gateName: 'N', + deviceId: 'd', + scannedAt: 1, + holder: 'A', + section: 'A', + }, + }); + const snap = snapshotOf(host); + expect(parseGateMessage(snap)?.type).toBe('snapshot'); + expect(admissionByTicket(host.admissions, 'T-1001')?.scanId).toBe('s1'); + }); +}); + +describe('platform ingest', () => { + it('drops duplicate scanIds', () => { + const first = ingestToPlatform(new Set(), ['s1', 's2']); + const second = ingestToPlatform(first.next, ['s2', 's3']); + expect(second.result.duplicatesDropped).toBe(1); + expect(second.result.accepted).toEqual(['s3']); + }); +}); diff --git a/apps/eventfloor/__tests__/staff.test.ts b/apps/eventfloor/__tests__/staff.test.ts new file mode 100644 index 0000000..13462a7 --- /dev/null +++ b/apps/eventfloor/__tests__/staff.test.ts @@ -0,0 +1,27 @@ +import { describe, expect, it } from '@jest/globals'; +import { parseStaffMessage, signInStaff, STAFF_ROSTER } from '../src/domain/staff'; + +describe('staff roster', () => { + it('signs in with demo PIN', () => { + const profile = STAFF_ROSTER[0]; + expect(signInStaff(profile.staffId, profile.pin)?.displayName).toBe(profile.displayName); + expect(signInStaff(profile.staffId, '0000')).toBeNull(); + }); + + it('parses staff alerts from roster members only', () => { + const alert = { + type: 'staff_alert' as const, + alertId: 'a1', + body: 'Medic', + section: 'Section B', + senderStaffId: STAFF_ROSTER[0].staffId, + senderName: 'Sec', + senderUnit: 'Security', + createdAt: 1, + }; + expect(parseStaffMessage(alert)).toEqual(alert); + expect( + parseStaffMessage({ ...alert, senderStaffId: 'unknown' }), + ).toBeNull(); + }); +}); diff --git a/apps/eventfloor/android/app/build.gradle b/apps/eventfloor/android/app/build.gradle new file mode 100644 index 0000000..8688cc4 --- /dev/null +++ b/apps/eventfloor/android/app/build.gradle @@ -0,0 +1,121 @@ +apply plugin: "com.android.application" +apply plugin: "org.jetbrains.kotlin.android" +apply plugin: "com.facebook.react" + +/** + * This is the configuration block to customize your React Native Android app. + * By default you don't need to apply any configuration, just uncomment the lines you need. + */ +react { + /* Folders */ + // The root of your project, i.e. where "package.json" lives. Default is '../..' + // root = file("../../") + // The folder where the react-native NPM package is. Default is ../../node_modules/react-native + // reactNativeDir = file("../../node_modules/react-native") + // The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen + // codegenDir = file("../../node_modules/@react-native/codegen") + // The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js + // cliFile = file("../../node_modules/react-native/cli.js") + + /* Variants */ + // The list of variants to that are debuggable. For those we're going to + // skip the bundling of the JS bundle and the assets. Default is "debug", "debugOptimized". + // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants. + // debuggableVariants = ["liteDebug", "liteDebugOptimized", "prodDebug", "prodDebugOptimized"] + + /* Bundling */ + // A list containing the node command and its flags. Default is just 'node'. + // nodeExecutableAndArgs = ["node"] + // + // The command to run when bundling. By default is 'bundle' + // bundleCommand = "ram-bundle" + // + // The path to the CLI configuration file. Default is empty. + // bundleConfig = file(../rn-cli.config.js) + // + // The name of the generated asset file containing your JS bundle + // bundleAssetName = "MyApplication.android.bundle" + // + // The entry file for bundle generation. Default is 'index.android.js' or 'index.js' + // entryFile = file("../js/MyApplication.android.js") + // + // A list of extra flags to pass to the 'bundle' commands. + // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle + // extraPackagerArgs = [] + + /* Hermes Commands */ + // The hermes compiler command to run. By default it is 'hermesc' + // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc" + // + // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" + // hermesFlags = ["-O", "-output-source-map"] + + /* Autolinking */ + autolinkLibrariesWithApp() +} + +/** + * Set this to true to Run Proguard on Release builds to minify the Java bytecode. + */ +def enableProguardInReleaseBuilds = false + +/** + * The preferred build flavor of JavaScriptCore (JSC) + * + * For example, to use the international variant, you can use: + * `def jscFlavor = io.github.react-native-community:jsc-android-intl:2026004.+` + * + * The international variant includes ICU i18n library and necessary data + * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that + * give correct results when using with locales other than en-US. Note that + * this variant is about 6MiB larger per architecture than default. + */ +def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+' + +android { + ndkVersion rootProject.ext.ndkVersion + buildToolsVersion rootProject.ext.buildToolsVersion + compileSdk rootProject.ext.compileSdkVersion + + namespace "com.offlineappexamples.eventfloor" + // Shared fonts (Space Grotesk, DM Serif Display) from the ui package. + sourceSets.main.res.srcDirs += "../../../../packages/ui/fonts" + defaultConfig { + applicationId "com.offlineappexamples.eventfloor" + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion + versionCode 1 + versionName "1.0" + } + signingConfigs { + debug { + storeFile file('debug.keystore') + storePassword 'android' + keyAlias 'androiddebugkey' + keyPassword 'android' + } + } + buildTypes { + debug { + signingConfig signingConfigs.debug + } + release { + // Caution! In production, you need to generate your own keystore file. + // see https://reactnative.dev/docs/signed-apk-android. + signingConfig signingConfigs.debug + minifyEnabled enableProguardInReleaseBuilds + proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" + } + } +} + +dependencies { + // The version of react-native is set by the React Native Gradle Plugin + implementation("com.facebook.react:react-android") + + if (hermesEnabled.toBoolean()) { + implementation("com.facebook.react:hermes-android") + } else { + implementation jscFlavor + } +} diff --git a/apps/eventfloor/android/app/debug.keystore b/apps/eventfloor/android/app/debug.keystore new file mode 100644 index 0000000..364e105 Binary files /dev/null and b/apps/eventfloor/android/app/debug.keystore differ diff --git a/apps/eventfloor/android/app/proguard-rules.pro b/apps/eventfloor/android/app/proguard-rules.pro new file mode 100644 index 0000000..11b0257 --- /dev/null +++ b/apps/eventfloor/android/app/proguard-rules.pro @@ -0,0 +1,10 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: diff --git a/apps/eventfloor/android/app/src/main/AndroidManifest.xml b/apps/eventfloor/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..d6e17c4 --- /dev/null +++ b/apps/eventfloor/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/eventfloor/android/app/src/main/java/com/offlineappexamples/orderup/MainActivity.kt b/apps/eventfloor/android/app/src/main/java/com/offlineappexamples/orderup/MainActivity.kt new file mode 100644 index 0000000..3a20417 --- /dev/null +++ b/apps/eventfloor/android/app/src/main/java/com/offlineappexamples/orderup/MainActivity.kt @@ -0,0 +1,22 @@ +package com.offlineappexamples.eventfloor + +import com.facebook.react.ReactActivity +import com.facebook.react.ReactActivityDelegate +import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled +import com.facebook.react.defaults.DefaultReactActivityDelegate + +class MainActivity : ReactActivity() { + + /** + * Returns the name of the main component registered from JavaScript. This is used to schedule + * rendering of the component. + */ + override fun getMainComponentName(): String = "EventFloor" + + /** + * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate] + * which allows you to enable New Architecture with a single boolean flags [fabricEnabled] + */ + override fun createReactActivityDelegate(): ReactActivityDelegate = + DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled) +} diff --git a/apps/eventfloor/android/app/src/main/java/com/offlineappexamples/orderup/MainApplication.kt b/apps/eventfloor/android/app/src/main/java/com/offlineappexamples/orderup/MainApplication.kt new file mode 100644 index 0000000..2a8c380 --- /dev/null +++ b/apps/eventfloor/android/app/src/main/java/com/offlineappexamples/orderup/MainApplication.kt @@ -0,0 +1,31 @@ +package com.offlineappexamples.eventfloor + +import android.app.Application +import com.facebook.react.PackageList +import com.facebook.react.ReactApplication +import com.facebook.react.ReactHost +import com.facebook.react.common.assets.ReactFontManager +import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative +import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost + +class MainApplication : Application(), ReactApplication { + + override val reactHost: ReactHost by lazy { + getDefaultReactHost( + context = applicationContext, + packageList = + PackageList(this).packages.apply { + // Packages that cannot be autolinked yet can be added manually here, for example: + // add(MyReactNativePackage()) + }, + ) + } + + override fun onCreate() { + super.onCreate() + loadReactNative(this) + // Registered as families so fontWeight picks the right file (see packages/ui/fonts). + ReactFontManager.getInstance().addCustomFont(this, "Space Grotesk", R.font.space_grotesk) + ReactFontManager.getInstance().addCustomFont(this, "DM Serif Display", R.font.dm_serif_display) + } +} diff --git a/apps/eventfloor/android/app/src/main/res/drawable/rn_edit_text_material.xml b/apps/eventfloor/android/app/src/main/res/drawable/rn_edit_text_material.xml new file mode 100644 index 0000000..5c25e72 --- /dev/null +++ b/apps/eventfloor/android/app/src/main/res/drawable/rn_edit_text_material.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + diff --git a/apps/eventfloor/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/apps/eventfloor/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..be43858 --- /dev/null +++ b/apps/eventfloor/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/apps/eventfloor/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/apps/eventfloor/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..be43858 --- /dev/null +++ b/apps/eventfloor/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/apps/eventfloor/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/apps/eventfloor/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..ed5c3f7 Binary files /dev/null and b/apps/eventfloor/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/apps/eventfloor/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/apps/eventfloor/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..e2a2cbc Binary files /dev/null and b/apps/eventfloor/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/apps/eventfloor/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/apps/eventfloor/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000..aa967d0 Binary files /dev/null and b/apps/eventfloor/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/apps/eventfloor/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/apps/eventfloor/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..f2c0b25 Binary files /dev/null and b/apps/eventfloor/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/apps/eventfloor/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/apps/eventfloor/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..cee98cd Binary files /dev/null and b/apps/eventfloor/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/apps/eventfloor/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/apps/eventfloor/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000..4b763b1 Binary files /dev/null and b/apps/eventfloor/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/apps/eventfloor/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/apps/eventfloor/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..56c5703 Binary files /dev/null and b/apps/eventfloor/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/apps/eventfloor/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/apps/eventfloor/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..faf495d Binary files /dev/null and b/apps/eventfloor/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/apps/eventfloor/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/apps/eventfloor/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000..4dfc166 Binary files /dev/null and b/apps/eventfloor/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/apps/eventfloor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/apps/eventfloor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..6b5b623 Binary files /dev/null and b/apps/eventfloor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/apps/eventfloor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/apps/eventfloor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..f88d6fc Binary files /dev/null and b/apps/eventfloor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/apps/eventfloor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/apps/eventfloor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..b22e56b Binary files /dev/null and b/apps/eventfloor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/apps/eventfloor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/apps/eventfloor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..1bfa6f4 Binary files /dev/null and b/apps/eventfloor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/apps/eventfloor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/apps/eventfloor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..958474f Binary files /dev/null and b/apps/eventfloor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/apps/eventfloor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/apps/eventfloor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..b6ab593 Binary files /dev/null and b/apps/eventfloor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/apps/eventfloor/android/app/src/main/res/values/ic_launcher_background.xml b/apps/eventfloor/android/app/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 0000000..c342fa2 --- /dev/null +++ b/apps/eventfloor/android/app/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + #FF385C + diff --git a/apps/eventfloor/android/app/src/main/res/values/strings.xml b/apps/eventfloor/android/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..c6ba8d8 --- /dev/null +++ b/apps/eventfloor/android/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + EventFloor + diff --git a/apps/eventfloor/android/app/src/main/res/values/styles.xml b/apps/eventfloor/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..7ba83a2 --- /dev/null +++ b/apps/eventfloor/android/app/src/main/res/values/styles.xml @@ -0,0 +1,9 @@ + + + + + + diff --git a/apps/eventfloor/android/build.gradle b/apps/eventfloor/android/build.gradle new file mode 100644 index 0000000..dad99b0 --- /dev/null +++ b/apps/eventfloor/android/build.gradle @@ -0,0 +1,21 @@ +buildscript { + ext { + buildToolsVersion = "36.0.0" + minSdkVersion = 24 + compileSdkVersion = 36 + targetSdkVersion = 36 + ndkVersion = "27.1.12297006" + kotlinVersion = "2.1.20" + } + repositories { + google() + mavenCentral() + } + dependencies { + classpath("com.android.tools.build:gradle") + classpath("com.facebook.react:react-native-gradle-plugin") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") + } +} + +apply plugin: "com.facebook.react.rootproject" diff --git a/apps/eventfloor/android/gradle.properties b/apps/eventfloor/android/gradle.properties new file mode 100644 index 0000000..9afe615 --- /dev/null +++ b/apps/eventfloor/android/gradle.properties @@ -0,0 +1,44 @@ +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m +org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m + +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true + +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true + +# Use this property to specify which architecture you want to build. +# You can also override it from the CLI using +# ./gradlew -PreactNativeArchitectures=x86_64 +reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 + +# Use this property to enable support to the new architecture. +# This will allow you to use TurboModules and the Fabric render in +# your application. You should enable this flag either if you want +# to write custom TurboModules/Fabric components OR use libraries that +# are providing them. +newArchEnabled=true + +# Use this property to enable or disable the Hermes JS engine. +# If set to false, you will be using JSC instead. +hermesEnabled=true + +# Use this property to enable edge-to-edge display support. +# This allows your app to draw behind system bars for an immersive UI. +# Note: Only works with ReactActivity and should not be used with custom Activity. +edgeToEdgeEnabled=false diff --git a/apps/eventfloor/android/gradle/wrapper/gradle-wrapper.jar b/apps/eventfloor/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..61285a6 Binary files /dev/null and b/apps/eventfloor/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/apps/eventfloor/android/gradle/wrapper/gradle-wrapper.properties b/apps/eventfloor/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..37f78a6 --- /dev/null +++ b/apps/eventfloor/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/apps/eventfloor/android/gradlew b/apps/eventfloor/android/gradlew new file mode 100755 index 0000000..adff685 --- /dev/null +++ b/apps/eventfloor/android/gradlew @@ -0,0 +1,248 @@ +#!/bin/sh + +# +# Copyright © 2015 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/apps/eventfloor/android/gradlew.bat b/apps/eventfloor/android/gradlew.bat new file mode 100644 index 0000000..39baf4d --- /dev/null +++ b/apps/eventfloor/android/gradlew.bat @@ -0,0 +1,98 @@ +@REM Copyright (c) Meta Platforms, Inc. and affiliates. +@REM +@REM This source code is licensed under the MIT license found in the +@REM LICENSE file in the root directory of this source tree. + +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/apps/eventfloor/android/settings.gradle b/apps/eventfloor/android/settings.gradle new file mode 100644 index 0000000..5525610 --- /dev/null +++ b/apps/eventfloor/android/settings.gradle @@ -0,0 +1,6 @@ +pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") } +plugins { id("com.facebook.react.settings") } +extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() } +rootProject.name = 'EventFloor' +include ':app' +includeBuild('../node_modules/@react-native/gradle-plugin') diff --git a/apps/eventfloor/app.json b/apps/eventfloor/app.json new file mode 100644 index 0000000..179fea8 --- /dev/null +++ b/apps/eventfloor/app.json @@ -0,0 +1,4 @@ +{ + "name": "EventFloor", + "displayName": "EventFloor" +} diff --git a/apps/eventfloor/babel.config.js b/apps/eventfloor/babel.config.js new file mode 100644 index 0000000..61d5d89 --- /dev/null +++ b/apps/eventfloor/babel.config.js @@ -0,0 +1,3 @@ +module.exports = { + presets: ['module:@react-native/babel-preset', 'nativewind/babel'], +}; diff --git a/apps/eventfloor/index.js b/apps/eventfloor/index.js new file mode 100644 index 0000000..9b73932 --- /dev/null +++ b/apps/eventfloor/index.js @@ -0,0 +1,9 @@ +/** + * @format + */ + +import { AppRegistry } from 'react-native'; +import App from './App'; +import { name as appName } from './app.json'; + +AppRegistry.registerComponent(appName, () => App); diff --git a/apps/eventfloor/ios/.xcode.env b/apps/eventfloor/ios/.xcode.env new file mode 100644 index 0000000..3d5782c --- /dev/null +++ b/apps/eventfloor/ios/.xcode.env @@ -0,0 +1,11 @@ +# This `.xcode.env` file is versioned and is used to source the environment +# used when running script phases inside Xcode. +# To customize your local environment, you can create an `.xcode.env.local` +# file that is not versioned. + +# NODE_BINARY variable contains the PATH to the node executable. +# +# Customize the NODE_BINARY variable here. +# For example, to use nvm with brew, add the following line +# . "$(brew --prefix nvm)/nvm.sh" --no-use +export NODE_BINARY=$(command -v node) diff --git a/apps/eventfloor/ios/EventFloor.xcodeproj/project.pbxproj b/apps/eventfloor/ios/EventFloor.xcodeproj/project.pbxproj new file mode 100644 index 0000000..12222b7 --- /dev/null +++ b/apps/eventfloor/ios/EventFloor.xcodeproj/project.pbxproj @@ -0,0 +1,528 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 0C80B921A6F3F58F76C31292 /* libPods-EventFloor.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-EventFloor.a */; }; + 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; + 4204E37E1345127821B1D61D /* space_grotesk_medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7D7566AB5B03E0DD2AE8D975 /* space_grotesk_medium.ttf */; }; + 4DADA4D9FCF7ACF7CD308512 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */; }; + 59FA85C7DABD4C424CC92A6D /* dm_serif_display_regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0DDFFF2E5319DC6CB07FB356 /* dm_serif_display_regular.ttf */; }; + 761780ED2CA45674006654EE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761780EC2CA45674006654EE /* AppDelegate.swift */; }; + 77425900FDE6A239FBDE1587 /* space_grotesk_semibold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 16DDDA6F0AE168DD28C46529 /* space_grotesk_semibold.ttf */; }; + 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; + ACF648FCD514FC7967494DCF /* space_grotesk_regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 8077B93F1BA98961C21AE16E /* space_grotesk_regular.ttf */; }; + B2E8F1A12CA45701006654EE /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2E8F1A02CA45701006654EE /* SceneDelegate.swift */; }; + C79EC88C8F01E8069AAC7EB9 /* space_grotesk_bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A7E51F5E996CDBEB4D2962DC /* space_grotesk_bold.ttf */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 0DDFFF2E5319DC6CB07FB356 /* dm_serif_display_regular.ttf */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = file; name = dm_serif_display_regular.ttf; path = ../../../packages/ui/fonts/font/dm_serif_display_regular.ttf; sourceTree = SOURCE_ROOT; }; + 13B07F961A680F5B00A75B9A /* EventFloor.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EventFloor.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = EventFloor/Images.xcassets; sourceTree = ""; }; + 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = EventFloor/Info.plist; sourceTree = ""; }; + 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = EventFloor/PrivacyInfo.xcprivacy; sourceTree = ""; }; + 16DDDA6F0AE168DD28C46529 /* space_grotesk_semibold.ttf */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = file; name = space_grotesk_semibold.ttf; path = ../../../packages/ui/fonts/font/space_grotesk_semibold.ttf; sourceTree = SOURCE_ROOT; }; + 3B4392A12AC88292D35C810B /* Pods-EventFloor.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-EventFloor.debug.xcconfig"; path = "Target Support Files/Pods-EventFloor/Pods-EventFloor.debug.xcconfig"; sourceTree = ""; }; + 5709B34CF0A7D63546082F79 /* Pods-EventFloor.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-EventFloor.release.xcconfig"; path = "Target Support Files/Pods-EventFloor/Pods-EventFloor.release.xcconfig"; sourceTree = ""; }; + 5DCACB8F33CDC322A6C60F78 /* libPods-EventFloor.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-EventFloor.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 761780EC2CA45674006654EE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = EventFloor/AppDelegate.swift; sourceTree = ""; }; + 7D7566AB5B03E0DD2AE8D975 /* space_grotesk_medium.ttf */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = file; name = space_grotesk_medium.ttf; path = ../../../packages/ui/fonts/font/space_grotesk_medium.ttf; sourceTree = SOURCE_ROOT; }; + 8077B93F1BA98961C21AE16E /* space_grotesk_regular.ttf */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = file; name = space_grotesk_regular.ttf; path = ../../../packages/ui/fonts/font/space_grotesk_regular.ttf; sourceTree = SOURCE_ROOT; }; + 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = EventFloor/LaunchScreen.storyboard; sourceTree = ""; }; + A7E51F5E996CDBEB4D2962DC /* space_grotesk_bold.ttf */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = file; name = space_grotesk_bold.ttf; path = ../../../packages/ui/fonts/font/space_grotesk_bold.ttf; sourceTree = SOURCE_ROOT; }; + B2E8F1A02CA45701006654EE /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SceneDelegate.swift; path = EventFloor/SceneDelegate.swift; sourceTree = ""; }; + ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0C80B921A6F3F58F76C31292 /* libPods-EventFloor.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 13B07FAE1A68108700A75B9A /* EventFloor */ = { + isa = PBXGroup; + children = ( + 13B07FB51A68108700A75B9A /* Images.xcassets */, + 761780EC2CA45674006654EE /* AppDelegate.swift */, + B2E8F1A02CA45701006654EE /* SceneDelegate.swift */, + 13B07FB61A68108700A75B9A /* Info.plist */, + 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */, + 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */, + ); + name = EventFloor; + sourceTree = ""; + }; + 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { + isa = PBXGroup; + children = ( + ED297162215061F000B7C4FE /* JavaScriptCore.framework */, + 5DCACB8F33CDC322A6C60F78 /* libPods-EventFloor.a */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4EAC6312E6044F5B6A468D1D /* Fonts */ = { + isa = PBXGroup; + children = ( + 0DDFFF2E5319DC6CB07FB356 /* dm_serif_display_regular.ttf */, + A7E51F5E996CDBEB4D2962DC /* space_grotesk_bold.ttf */, + 7D7566AB5B03E0DD2AE8D975 /* space_grotesk_medium.ttf */, + 8077B93F1BA98961C21AE16E /* space_grotesk_regular.ttf */, + 16DDDA6F0AE168DD28C46529 /* space_grotesk_semibold.ttf */, + ); + name = Fonts; + sourceTree = ""; + }; + 832341AE1AAA6A7D00B99B32 /* Libraries */ = { + isa = PBXGroup; + children = ( + ); + name = Libraries; + sourceTree = ""; + }; + 83CBB9F61A601CBA00E9B192 = { + isa = PBXGroup; + children = ( + 13B07FAE1A68108700A75B9A /* EventFloor */, + 832341AE1AAA6A7D00B99B32 /* Libraries */, + 83CBBA001A601CBA00E9B192 /* Products */, + 2D16E6871FA4F8E400B85C8A /* Frameworks */, + BBD78D7AC51CEA395F1C20DB /* Pods */, + 4EAC6312E6044F5B6A468D1D /* Fonts */, + ); + indentWidth = 2; + sourceTree = ""; + tabWidth = 2; + usesTabs = 0; + }; + 83CBBA001A601CBA00E9B192 /* Products */ = { + isa = PBXGroup; + children = ( + 13B07F961A680F5B00A75B9A /* EventFloor.app */, + ); + name = Products; + sourceTree = ""; + }; + BBD78D7AC51CEA395F1C20DB /* Pods */ = { + isa = PBXGroup; + children = ( + 3B4392A12AC88292D35C810B /* Pods-EventFloor.debug.xcconfig */, + 5709B34CF0A7D63546082F79 /* Pods-EventFloor.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 13B07F861A680F5B00A75B9A /* EventFloor */ = { + isa = PBXNativeTarget; + buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "EventFloor" */; + buildPhases = ( + C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */, + 13B07F871A680F5B00A75B9A /* Sources */, + 13B07F8C1A680F5B00A75B9A /* Frameworks */, + 13B07F8E1A680F5B00A75B9A /* Resources */, + 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, + 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */, + E235C05ADACE081382539298 /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = EventFloor; + productName = EventFloor; + productReference = 13B07F961A680F5B00A75B9A /* EventFloor.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 83CBB9F71A601CBA00E9B192 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1210; + TargetAttributes = { + 13B07F861A680F5B00A75B9A = { + LastSwiftMigration = 1120; + }; + }; + }; + buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "EventFloor" */; + compatibilityVersion = "Xcode 12.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 83CBB9F61A601CBA00E9B192; + productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 13B07F861A680F5B00A75B9A /* EventFloor */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 13B07F8E1A680F5B00A75B9A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, + 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, + 4DADA4D9FCF7ACF7CD308512 /* PrivacyInfo.xcprivacy in Resources */, + 59FA85C7DABD4C424CC92A6D /* dm_serif_display_regular.ttf in Resources */, + C79EC88C8F01E8069AAC7EB9 /* space_grotesk_bold.ttf in Resources */, + 4204E37E1345127821B1D61D /* space_grotesk_medium.ttf in Resources */, + ACF648FCD514FC7967494DCF /* space_grotesk_regular.ttf in Resources */, + 77425900FDE6A239FBDE1587 /* space_grotesk_semibold.ttf in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(SRCROOT)/.xcode.env.local", + "$(SRCROOT)/.xcode.env", + ); + name = "Bundle React Native code and images"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"\\\"$WITH_ENVIRONMENT\\\" \\\"$REACT_NATIVE_XCODE\\\"\"\n"; + }; + 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-EventFloor/Pods-EventFloor-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-EventFloor/Pods-EventFloor-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-EventFloor/Pods-EventFloor-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-EventFloor-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-EventFloor/Pods-EventFloor-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-EventFloor/Pods-EventFloor-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-EventFloor/Pods-EventFloor-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 13B07F871A680F5B00A75B9A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 761780ED2CA45674006654EE /* AppDelegate.swift in Sources */, + B2E8F1A12CA45701006654EE /* SceneDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 13B07F941A680F5B00A75B9A /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-EventFloor.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 4NZGXQRKBG; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = EventFloor/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 15.1; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.offlineappexamples.eventfloor; + PRODUCT_NAME = EventFloor; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 13B07F951A680F5B00A75B9A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-EventFloor.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 4NZGXQRKBG; + INFOPLIST_FILE = EventFloor/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 15.1; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.offlineappexamples.eventfloor; + PRODUCT_NAME = EventFloor; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; + 83CBBA201A601CBA00E9B192 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "c++20"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.1; + LD_RUNPATH_SEARCH_PATHS = ( + /usr/lib/swift, + "$(inherited)", + ); + LIBRARY_SEARCH_PATHS = ( + "\"$(SDKROOT)/usr/lib/swift\"", + "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", + "\"$(inherited)\"", + ); + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + OTHER_CFLAGS = ( + "$(inherited)", + "-DRCT_REMOVE_LEGACY_ARCH=1", + ); + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-DFOLLY_NO_CONFIG", + "-DFOLLY_MOBILE=1", + "-DFOLLY_USE_LIBCPP=1", + "-DFOLLY_CFG_NO_COROUTINES=1", + "-DFOLLY_HAVE_CLOCK_GETTIME=1", + "-DRCT_REMOVE_LEGACY_ARCH=1", + ); + REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; + SWIFT_ENABLE_EXPLICIT_MODULES = NO; + USE_HERMES = true; + }; + name = Debug; + }; + 83CBBA211A601CBA00E9B192 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "c++20"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.1; + LD_RUNPATH_SEARCH_PATHS = ( + /usr/lib/swift, + "$(inherited)", + ); + LIBRARY_SEARCH_PATHS = ( + "\"$(SDKROOT)/usr/lib/swift\"", + "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", + "\"$(inherited)\"", + ); + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_CFLAGS = ( + "$(inherited)", + "-DRCT_REMOVE_LEGACY_ARCH=1", + ); + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-DFOLLY_NO_CONFIG", + "-DFOLLY_MOBILE=1", + "-DFOLLY_USE_LIBCPP=1", + "-DFOLLY_CFG_NO_COROUTINES=1", + "-DFOLLY_HAVE_CLOCK_GETTIME=1", + "-DRCT_REMOVE_LEGACY_ARCH=1", + ); + REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; + SDKROOT = iphoneos; + SWIFT_ENABLE_EXPLICIT_MODULES = NO; + USE_HERMES = true; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "EventFloor" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 13B07F941A680F5B00A75B9A /* Debug */, + 13B07F951A680F5B00A75B9A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "EventFloor" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 83CBBA201A601CBA00E9B192 /* Debug */, + 83CBBA211A601CBA00E9B192 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; +} diff --git a/apps/eventfloor/ios/EventFloor.xcodeproj/xcshareddata/xcschemes/EventFloor.xcscheme b/apps/eventfloor/ios/EventFloor.xcodeproj/xcshareddata/xcschemes/EventFloor.xcscheme new file mode 100644 index 0000000..21874ed --- /dev/null +++ b/apps/eventfloor/ios/EventFloor.xcodeproj/xcshareddata/xcschemes/EventFloor.xcscheme @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/eventfloor/ios/EventFloor.xcworkspace/contents.xcworkspacedata b/apps/eventfloor/ios/EventFloor.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..a12e7d9 --- /dev/null +++ b/apps/eventfloor/ios/EventFloor.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/apps/eventfloor/ios/EventFloor/AppDelegate.swift b/apps/eventfloor/ios/EventFloor/AppDelegate.swift new file mode 100644 index 0000000..a4c799f --- /dev/null +++ b/apps/eventfloor/ios/EventFloor/AppDelegate.swift @@ -0,0 +1,79 @@ +import UIKit +import React +import React_RCTAppDelegate +import ReactAppDependencyProvider +#if DEBUG +import Network +#endif + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + var window: UIWindow? + + var reactNativeDelegate: ReactNativeDelegate? + var reactNativeFactory: RCTReactNativeFactory? + + #if DEBUG + /// Keeps a Bonjour browser alive so iOS shows Local Network permission (needed for Metro on device). + private static var localNetworkBrowser: NWBrowser? + #endif + + func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil + ) -> Bool { + #if DEBUG + triggerLocalNetworkPermissionIfNeeded() + #endif + + let delegate = ReactNativeDelegate() + let factory = RCTReactNativeFactory(delegate: delegate) + delegate.dependencyProvider = RCTAppDependencyProvider() + + reactNativeDelegate = delegate + reactNativeFactory = factory + + window = UIWindow(frame: UIScreen.main.bounds) + + factory.startReactNative( + withModuleName: "EventFloor", + in: window, + launchOptions: launchOptions + ) + + return true + } + + #if DEBUG + private func triggerLocalNetworkPermissionIfNeeded() { + let params = NWParameters() + params.includePeerToPeer = true + let browser = NWBrowser(for: .bonjour(type: "_http._tcp", domain: nil), using: params) + browser.start(queue: .main) + AppDelegate.localNetworkBrowser = browser + } + #endif +} + +class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate { + override func sourceURL(for bridge: RCTBridge) -> URL? { + self.bundleURL() + } + + override func bundleURL() -> URL? { +#if DEBUG + #if targetEnvironment(simulator) + return RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index") + #else + // Device Debug builds embed main.jsbundle at compile time; prefer it so the app + // opens when Metro / Local Network is unavailable (see react-native-xcode.sh). + if let embedded = Bundle.main.url(forResource: "main", withExtension: "jsbundle") { + return embedded + } + return RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index") + #endif +#else + return Bundle.main.url(forResource: "main", withExtension: "jsbundle") +#endif + } +} diff --git a/apps/eventfloor/ios/EventFloor/Images.xcassets/AppIcon.appiconset/Contents.json b/apps/eventfloor/ios/EventFloor/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..b2ee29e --- /dev/null +++ b/apps/eventfloor/ios/EventFloor/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,6 @@ +{ + "images" : [ + { "filename" : "Icon.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" } + ], + "info" : { "author" : "xcode", "version" : 1 } +} diff --git a/apps/eventfloor/ios/EventFloor/Images.xcassets/AppIcon.appiconset/Icon.png b/apps/eventfloor/ios/EventFloor/Images.xcassets/AppIcon.appiconset/Icon.png new file mode 100644 index 0000000..fddcd5c Binary files /dev/null and b/apps/eventfloor/ios/EventFloor/Images.xcassets/AppIcon.appiconset/Icon.png differ diff --git a/apps/eventfloor/ios/EventFloor/Images.xcassets/Contents.json b/apps/eventfloor/ios/EventFloor/Images.xcassets/Contents.json new file mode 100644 index 0000000..2d92bd5 --- /dev/null +++ b/apps/eventfloor/ios/EventFloor/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/apps/eventfloor/ios/EventFloor/Info.plist b/apps/eventfloor/ios/EventFloor/Info.plist new file mode 100644 index 0000000..c66792f --- /dev/null +++ b/apps/eventfloor/ios/EventFloor/Info.plist @@ -0,0 +1,98 @@ + + + + + CADisableMinimumFrameDurationOnPhone + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + EventFloor + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + NSAllowsLocalNetworking + + + NSBluetoothAlwaysUsageDescription + Coordinate field teams over Bluetooth mesh when towers are down. + NSBluetoothPeripheralUsageDescription + Coordinate field teams over Bluetooth mesh when towers are down. + NSBonjourServices + + _http._tcp + + NSLocalNetworkUsageDescription + EventFloor connects to the development server on your Wi‑Fi while you test debug builds. + RCTNewArchEnabled + + UIAppFonts + + dm_serif_display_regular.ttf + space_grotesk_bold.ttf + space_grotesk_medium.ttf + space_grotesk_regular.ttf + space_grotesk_semibold.ttf + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + + + + + UIBackgroundModes + + bluetooth-central + bluetooth-peripheral + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + arm64 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/apps/eventfloor/ios/EventFloor/LaunchScreen.storyboard b/apps/eventfloor/ios/EventFloor/LaunchScreen.storyboard new file mode 100644 index 0000000..483539a --- /dev/null +++ b/apps/eventfloor/ios/EventFloor/LaunchScreen.storyboard @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/eventfloor/ios/EventFloor/PrivacyInfo.xcprivacy b/apps/eventfloor/ios/EventFloor/PrivacyInfo.xcprivacy new file mode 100644 index 0000000..bad3276 --- /dev/null +++ b/apps/eventfloor/ios/EventFloor/PrivacyInfo.xcprivacy @@ -0,0 +1,37 @@ + + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + CA92.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategorySystemBootTime + NSPrivacyAccessedAPITypeReasons + + 35F9.1 + + + + NSPrivacyCollectedDataTypes + + NSPrivacyTracking + + + diff --git a/apps/eventfloor/ios/EventFloor/SceneDelegate.swift b/apps/eventfloor/ios/EventFloor/SceneDelegate.swift new file mode 100644 index 0000000..e10d231 --- /dev/null +++ b/apps/eventfloor/ios/EventFloor/SceneDelegate.swift @@ -0,0 +1,24 @@ +import UIKit + +/// iOS 27+ requires UIScene lifecycle when built with Xcode 27 (see TN3187). +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + var window: UIWindow? + + func scene( + _ scene: UIScene, + willConnectTo session: UISceneSession, + options connectionOptions: UIScene.ConnectionOptions + ) { + guard + let windowScene = scene as? UIWindowScene, + let appDelegate = UIApplication.shared.delegate as? AppDelegate, + let appWindow = appDelegate.window + else { + return + } + + appWindow.windowScene = windowScene + window = appWindow + window?.makeKeyAndVisible() + } +} diff --git a/apps/eventfloor/ios/Podfile b/apps/eventfloor/ios/Podfile new file mode 100644 index 0000000..45fdf41 --- /dev/null +++ b/apps/eventfloor/ios/Podfile @@ -0,0 +1,67 @@ +# Resolve react_native_pods.rb with node to allow for hoisting +require Pod::Executable.execute_command('node', ['-p', + 'require.resolve( + "react-native/scripts/react_native_pods.rb", + {paths: [process.argv[1]]}, + )', __dir__]).strip + +platform :ios, min_ios_version_supported +prepare_react_native_project! + +linkage = ENV['USE_FRAMEWORKS'] +if linkage != nil + Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green + use_frameworks! :linkage => linkage.to_sym +end + +target 'EventFloor' do + config = use_native_modules! + + use_react_native!( + :path => config[:reactNativePath], + # An absolute path to your application root. + :app_path => "#{Pod::Config.instance.installation_root}/.." + ) + + post_install do |installer| + react_native_post_install( + installer, + config[:reactNativePath], + :mac_catalyst_enabled => false, + # :ccache_enabled => true + ) + # offline-rn-shell: fmt + modular includes for Xcode 26 / RN 0.82+ + fmt_base = File.join(installer.sandbox.root, 'fmt', 'include', 'fmt', 'base.h') + if File.exist?(fmt_base) + original = File.read(fmt_base) + patched = original.gsub('# define FMT_USE_CONSTEVAL 1', + '# define FMT_USE_CONSTEVAL 0') + if patched != original + File.write(fmt_base, patched) + Pod::UI.puts 'Patched fmt/base.h: forced FMT_USE_CONSTEVAL=0 (Xcode 26.5 / clang 21)'.yellow + end + end + + installer.pods_project.targets.each do |target| + target.build_configurations.each do |build_config| + build_config.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES' + # These settings may be arrays; join them, or "#{array}" writes Ruby syntax into the flags. + other_cflags = Array(build_config.build_settings['OTHER_CFLAGS'] || '$(inherited)').join(' ') + other_cxxflags = Array(build_config.build_settings['OTHER_CPLUSPLUSFLAGS'] || '$(inherited)').join(' ') + warning_flag = '-Wno-error=return-type' + unless other_cflags.include?(warning_flag) + build_config.build_settings['OTHER_CFLAGS'] = "#{other_cflags} #{warning_flag}" + end + unless other_cxxflags.include?(warning_flag) + build_config.build_settings['OTHER_CPLUSPLUSFLAGS'] = "#{other_cxxflags} #{warning_flag}" + end + build_config.build_settings['SWIFT_STRICT_CONCURRENCY'] ||= 'minimal' + # Xcode 27 refuses pod targets (e.g. resource bundles) below iOS 15. + if build_config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 15.1 + build_config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.1' + end + end + end + + end +end diff --git a/apps/eventfloor/ios/Podfile.lock b/apps/eventfloor/ios/Podfile.lock new file mode 100644 index 0000000..92986ba --- /dev/null +++ b/apps/eventfloor/ios/Podfile.lock @@ -0,0 +1,2386 @@ +PODS: + - FBLazyVector (0.85.2) + - hermes-engine (250829098.0.10): + - hermes-engine/Pre-built (= 250829098.0.10) + - hermes-engine/Pre-built (250829098.0.10) + - MeshSdk (0.27.0): + - React-Core + - RCTDeprecation (0.85.2) + - RCTRequired (0.85.2) + - RCTSwiftUI (0.85.2) + - RCTSwiftUIWrapper (0.85.2): + - RCTSwiftUI + - RCTTypeSafety (0.85.2): + - FBLazyVector (= 0.85.2) + - RCTRequired (= 0.85.2) + - React-Core (= 0.85.2) + - React (0.85.2): + - React-Core (= 0.85.2) + - React-Core/DevSupport (= 0.85.2) + - React-Core/RCTWebSocket (= 0.85.2) + - React-RCTActionSheet (= 0.85.2) + - React-RCTAnimation (= 0.85.2) + - React-RCTBlob (= 0.85.2) + - React-RCTImage (= 0.85.2) + - React-RCTLinking (= 0.85.2) + - React-RCTNetwork (= 0.85.2) + - React-RCTSettings (= 0.85.2) + - React-RCTText (= 0.85.2) + - React-RCTVibration (= 0.85.2) + - React-callinvoker (0.85.2) + - React-Core (0.85.2): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default (= 0.85.2) + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core-prebuilt (0.85.2): + - ReactNativeDependencies + - React-Core/CoreModulesHeaders (0.85.2): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/Default (0.85.2): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/DevSupport (0.85.2): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default (= 0.85.2) + - React-Core/RCTWebSocket (= 0.85.2) + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTActionSheetHeaders (0.85.2): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTAnimationHeaders (0.85.2): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTBlobHeaders (0.85.2): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTImageHeaders (0.85.2): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTLinkingHeaders (0.85.2): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTNetworkHeaders (0.85.2): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTSettingsHeaders (0.85.2): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTTextHeaders (0.85.2): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTVibrationHeaders (0.85.2): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-Core/RCTWebSocket (0.85.2): + - hermes-engine + - RCTDeprecation + - React-Core-prebuilt + - React-Core/Default (= 0.85.2) + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsinspectorcdp + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-CoreModules (0.85.2): + - RCTTypeSafety (= 0.85.2) + - React-Core-prebuilt + - React-Core/CoreModulesHeaders (= 0.85.2) + - React-debug + - React-jsi (= 0.85.2) + - React-jsinspector + - React-jsinspectorcdp + - React-jsinspectortracing + - React-NativeModulesApple + - React-RCTBlob + - React-RCTFBReactNativeSpec + - React-RCTImage (= 0.85.2) + - React-runtimeexecutor + - React-utils + - ReactCommon + - ReactNativeDependencies + - React-cxxreact (0.85.2): + - hermes-engine + - React-callinvoker (= 0.85.2) + - React-Core-prebuilt + - React-debug (= 0.85.2) + - React-jsi (= 0.85.2) + - React-jsinspector + - React-jsinspectorcdp + - React-jsinspectortracing + - React-logger (= 0.85.2) + - React-perflogger (= 0.85.2) + - React-runtimeexecutor + - React-timing (= 0.85.2) + - React-utils + - ReactNativeDependencies + - React-debug (0.85.2) + - React-defaultsnativemodule (0.85.2): + - hermes-engine + - React-Core-prebuilt + - React-domnativemodule + - React-Fabric/animated + - React-featureflags + - React-featureflagsnativemodule + - React-idlecallbacksnativemodule + - React-intersectionobservernativemodule + - React-jsi + - React-jsiexecutor + - React-microtasksnativemodule + - React-RCTFBReactNativeSpec + - React-webperformancenativemodule + - ReactNativeDependencies + - Yoga + - React-domnativemodule (0.85.2): + - hermes-engine + - React-Core-prebuilt + - React-Fabric + - React-Fabric/bridging + - React-FabricComponents + - React-graphics + - React-jsi + - React-jsiexecutor + - React-RCTFBReactNativeSpec + - React-runtimeexecutor + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-Fabric (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric/animated (= 0.85.2) + - React-Fabric/animationbackend (= 0.85.2) + - React-Fabric/animations (= 0.85.2) + - React-Fabric/attributedstring (= 0.85.2) + - React-Fabric/bridging (= 0.85.2) + - React-Fabric/componentregistry (= 0.85.2) + - React-Fabric/componentregistrynative (= 0.85.2) + - React-Fabric/components (= 0.85.2) + - React-Fabric/consistency (= 0.85.2) + - React-Fabric/core (= 0.85.2) + - React-Fabric/dom (= 0.85.2) + - React-Fabric/imagemanager (= 0.85.2) + - React-Fabric/leakchecker (= 0.85.2) + - React-Fabric/mounting (= 0.85.2) + - React-Fabric/observers (= 0.85.2) + - React-Fabric/scheduler (= 0.85.2) + - React-Fabric/telemetry (= 0.85.2) + - React-Fabric/uimanager (= 0.85.2) + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/animated (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric/animationbackend + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/animationbackend (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/animations (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/attributedstring (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/bridging (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/componentregistry (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/componentregistrynative (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/components (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric/components/legacyviewmanagerinterop (= 0.85.2) + - React-Fabric/components/root (= 0.85.2) + - React-Fabric/components/scrollview (= 0.85.2) + - React-Fabric/components/view (= 0.85.2) + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/components/legacyviewmanagerinterop (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/components/root (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/components/scrollview (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/components/view (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-renderercss + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-Fabric/consistency (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/core (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/dom (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/imagemanager (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/leakchecker (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/mounting (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/observers (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric/observers/events (= 0.85.2) + - React-Fabric/observers/intersection (= 0.85.2) + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/observers/events (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/observers/intersection (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/scheduler (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric/animationbackend + - React-Fabric/observers/events + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-performancecdpmetrics + - React-performancetimeline + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/telemetry (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/uimanager (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric/uimanager/consistency (= 0.85.2) + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererconsistency + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-Fabric/uimanager/consistency (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererconsistency + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-FabricComponents (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-FabricComponents/components (= 0.85.2) + - React-FabricComponents/textlayoutmanager (= 0.85.2) + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-FabricComponents/components/inputaccessory (= 0.85.2) + - React-FabricComponents/components/iostextinput (= 0.85.2) + - React-FabricComponents/components/modal (= 0.85.2) + - React-FabricComponents/components/rncore (= 0.85.2) + - React-FabricComponents/components/safeareaview (= 0.85.2) + - React-FabricComponents/components/scrollview (= 0.85.2) + - React-FabricComponents/components/switch (= 0.85.2) + - React-FabricComponents/components/text (= 0.85.2) + - React-FabricComponents/components/textinput (= 0.85.2) + - React-FabricComponents/components/unimplementedview (= 0.85.2) + - React-FabricComponents/components/virtualview (= 0.85.2) + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/inputaccessory (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/iostextinput (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/modal (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/rncore (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/safeareaview (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/scrollview (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/switch (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/text (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/textinput (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/unimplementedview (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/components/virtualview (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricComponents/textlayoutmanager (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-RCTFBReactNativeSpec + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-FabricImage (0.85.2): + - hermes-engine + - RCTRequired (= 0.85.2) + - RCTTypeSafety (= 0.85.2) + - React-Core-prebuilt + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - React-jsiexecutor (= 0.85.2) + - React-logger + - React-rendererdebug + - React-utils + - ReactCommon + - ReactNativeDependencies + - Yoga + - React-featureflags (0.85.2): + - React-Core-prebuilt + - ReactNativeDependencies + - React-featureflagsnativemodule (0.85.2): + - hermes-engine + - React-Core-prebuilt + - React-featureflags + - React-jsi + - React-jsiexecutor + - React-RCTFBReactNativeSpec + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-graphics (0.85.2): + - hermes-engine + - React-Core-prebuilt + - React-featureflags + - React-jsi + - React-jsiexecutor + - React-utils + - ReactNativeDependencies + - React-hermes (0.85.2): + - hermes-engine + - React-Core-prebuilt + - React-cxxreact (= 0.85.2) + - React-jsi + - React-jsiexecutor (= 0.85.2) + - React-jsinspector + - React-jsinspectorcdp + - React-jsinspectortracing + - React-jsitooling + - React-oscompat + - React-perflogger (= 0.85.2) + - React-runtimeexecutor + - ReactNativeDependencies + - React-idlecallbacksnativemodule (0.85.2): + - hermes-engine + - React-Core-prebuilt + - React-jsi + - React-jsiexecutor + - React-RCTFBReactNativeSpec + - React-runtimeexecutor + - React-runtimescheduler + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-ImageManager (0.85.2): + - React-Core-prebuilt + - React-Core/Default + - React-debug + - React-Fabric + - React-graphics + - React-rendererdebug + - React-utils + - ReactNativeDependencies + - React-intersectionobservernativemodule (0.85.2): + - hermes-engine + - React-Core-prebuilt + - React-cxxreact + - React-Fabric + - React-Fabric/bridging + - React-graphics + - React-jsi + - React-jsiexecutor + - React-RCTFBReactNativeSpec + - React-runtimeexecutor + - React-runtimescheduler + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-jserrorhandler (0.85.2): + - hermes-engine + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-jsi + - ReactCommon/turbomodule/bridging + - ReactNativeDependencies + - React-jsi (0.85.2): + - hermes-engine + - React-Core-prebuilt + - ReactNativeDependencies + - React-jsiexecutor (0.85.2): + - hermes-engine + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-jserrorhandler + - React-jsi + - React-jsinspector + - React-jsinspectorcdp + - React-jsinspectortracing + - React-jsitooling + - React-perflogger + - React-runtimeexecutor + - React-utils + - ReactNativeDependencies + - React-jsinspector (0.85.2): + - hermes-engine + - React-Core-prebuilt + - React-featureflags + - React-jsi + - React-jsinspectorcdp + - React-jsinspectornetwork + - React-jsinspectortracing + - React-oscompat + - React-perflogger (= 0.85.2) + - React-runtimeexecutor + - React-utils + - ReactNativeDependencies + - React-jsinspectorcdp (0.85.2): + - React-Core-prebuilt + - ReactNativeDependencies + - React-jsinspectornetwork (0.85.2): + - React-Core-prebuilt + - React-jsinspectorcdp + - ReactNativeDependencies + - React-jsinspectortracing (0.85.2): + - hermes-engine + - React-Core-prebuilt + - React-jsi + - React-jsinspectornetwork + - React-oscompat + - React-timing + - ReactNativeDependencies + - React-jsitooling (0.85.2): + - hermes-engine + - React-Core-prebuilt + - React-cxxreact (= 0.85.2) + - React-debug + - React-jsi (= 0.85.2) + - React-jsinspector + - React-jsinspectorcdp + - React-jsinspectortracing + - React-runtimeexecutor + - React-utils + - ReactNativeDependencies + - React-jsitracing (0.85.2): + - React-jsi + - React-logger (0.85.2): + - React-Core-prebuilt + - ReactNativeDependencies + - React-Mapbuffer (0.85.2): + - React-Core-prebuilt + - React-debug + - ReactNativeDependencies + - React-microtasksnativemodule (0.85.2): + - hermes-engine + - React-Core-prebuilt + - React-jsi + - React-jsiexecutor + - React-RCTFBReactNativeSpec + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - react-native-safe-area-context (5.9.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - react-native-safe-area-context/common (= 5.9.1) + - react-native-safe-area-context/fabric (= 5.9.1) + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - react-native-safe-area-context/common (5.9.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - react-native-safe-area-context/fabric (5.9.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - react-native-safe-area-context/common + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - React-NativeModulesApple (0.85.2): + - hermes-engine + - React-callinvoker + - React-Core + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-jsi + - React-jsinspector + - React-jsinspectorcdp + - React-runtimeexecutor + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - React-networking (0.85.2): + - React-Core-prebuilt + - React-jsinspectornetwork + - React-jsinspectortracing + - React-performancetimeline + - React-timing + - ReactNativeDependencies + - React-oscompat (0.85.2) + - React-perflogger (0.85.2): + - React-Core-prebuilt + - ReactNativeDependencies + - React-performancecdpmetrics (0.85.2): + - hermes-engine + - React-Core-prebuilt + - React-jsi + - React-performancetimeline + - React-runtimeexecutor + - React-timing + - ReactNativeDependencies + - React-performancetimeline (0.85.2): + - React-Core-prebuilt + - React-featureflags + - React-jsinspector + - React-jsinspectortracing + - React-perflogger + - React-timing + - ReactNativeDependencies + - React-RCTActionSheet (0.85.2): + - React-Core/RCTActionSheetHeaders (= 0.85.2) + - React-RCTAnimation (0.85.2): + - RCTTypeSafety + - React-Core-prebuilt + - React-Core/RCTAnimationHeaders + - React-debug + - React-featureflags + - React-jsi + - React-NativeModulesApple + - React-RCTFBReactNativeSpec + - ReactCommon + - ReactNativeDependencies + - React-RCTAppDelegate (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-CoreModules + - React-debug + - React-defaultsnativemodule + - React-Fabric + - React-featureflags + - React-graphics + - React-hermes + - React-jsitooling + - React-NativeModulesApple + - React-RCTFabric + - React-RCTFBReactNativeSpec + - React-RCTImage + - React-RCTNetwork + - React-RCTRuntime + - React-rendererdebug + - React-RuntimeApple + - React-RuntimeCore + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactCommon + - ReactNativeDependencies + - React-RCTBlob (0.85.2): + - hermes-engine + - React-Core-prebuilt + - React-Core/RCTBlobHeaders + - React-Core/RCTWebSocket + - React-jsi + - React-jsinspector + - React-jsinspectorcdp + - React-NativeModulesApple + - React-RCTFBReactNativeSpec + - React-RCTNetwork + - ReactCommon + - ReactNativeDependencies + - React-RCTFabric (0.85.2): + - hermes-engine + - RCTSwiftUIWrapper + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-FabricComponents + - React-FabricImage + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - React-jsinspector + - React-jsinspectorcdp + - React-jsinspectortracing + - React-networking + - React-performancecdpmetrics + - React-performancetimeline + - React-RCTAnimation + - React-RCTFBReactNativeSpec + - React-RCTImage + - React-RCTText + - React-rendererconsistency + - React-renderercss + - React-rendererdebug + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - Yoga + - React-RCTFBReactNativeSpec (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-jsi + - React-NativeModulesApple + - React-RCTFBReactNativeSpec/components (= 0.85.2) + - ReactCommon + - ReactNativeDependencies + - React-RCTFBReactNativeSpec/components (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-jsi + - React-NativeModulesApple + - React-rendererdebug + - React-utils + - ReactCommon + - ReactNativeDependencies + - Yoga + - React-RCTImage (0.85.2): + - RCTTypeSafety + - React-Core-prebuilt + - React-Core/RCTImageHeaders + - React-jsi + - React-NativeModulesApple + - React-RCTFBReactNativeSpec + - React-RCTNetwork + - ReactCommon + - ReactNativeDependencies + - React-RCTLinking (0.85.2): + - React-Core/RCTLinkingHeaders (= 0.85.2) + - React-jsi (= 0.85.2) + - React-NativeModulesApple + - React-RCTFBReactNativeSpec + - ReactCommon + - ReactCommon/turbomodule/core (= 0.85.2) + - React-RCTNetwork (0.85.2): + - RCTTypeSafety + - React-Core-prebuilt + - React-Core/RCTNetworkHeaders + - React-debug + - React-featureflags + - React-jsi + - React-jsinspectorcdp + - React-jsinspectornetwork + - React-NativeModulesApple + - React-networking + - React-RCTFBReactNativeSpec + - ReactCommon + - ReactNativeDependencies + - React-RCTRuntime (0.85.2): + - hermes-engine + - React-Core + - React-Core-prebuilt + - React-debug + - React-jsi + - React-jsinspector + - React-jsinspectorcdp + - React-jsinspectortracing + - React-jsitooling + - React-RuntimeApple + - React-RuntimeCore + - React-runtimeexecutor + - React-RuntimeHermes + - React-utils + - ReactNativeDependencies + - React-RCTSettings (0.85.2): + - RCTTypeSafety + - React-Core-prebuilt + - React-Core/RCTSettingsHeaders + - React-jsi + - React-NativeModulesApple + - React-RCTFBReactNativeSpec + - ReactCommon + - ReactNativeDependencies + - React-RCTText (0.85.2): + - React-Core/RCTTextHeaders (= 0.85.2) + - Yoga + - React-RCTVibration (0.85.2): + - React-Core-prebuilt + - React-Core/RCTVibrationHeaders + - React-jsi + - React-NativeModulesApple + - React-RCTFBReactNativeSpec + - ReactCommon + - ReactNativeDependencies + - React-rendererconsistency (0.85.2) + - React-renderercss (0.85.2): + - React-debug + - React-utils + - React-rendererdebug (0.85.2): + - React-Core-prebuilt + - React-debug + - ReactNativeDependencies + - React-RuntimeApple (0.85.2): + - hermes-engine + - React-callinvoker + - React-Core-prebuilt + - React-Core/Default + - React-CoreModules + - React-cxxreact + - React-featureflags + - React-jserrorhandler + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsitooling + - React-Mapbuffer + - React-NativeModulesApple + - React-RCTFabric + - React-RCTFBReactNativeSpec + - React-RuntimeCore + - React-runtimeexecutor + - React-RuntimeHermes + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - React-RuntimeCore (0.85.2): + - hermes-engine + - React-Core-prebuilt + - React-cxxreact + - React-Fabric + - React-featureflags + - React-jserrorhandler + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-jsitooling + - React-performancetimeline + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - ReactNativeDependencies + - React-runtimeexecutor (0.85.2): + - React-Core-prebuilt + - React-debug + - React-featureflags + - React-jsi (= 0.85.2) + - React-utils + - ReactNativeDependencies + - React-RuntimeHermes (0.85.2): + - hermes-engine + - React-Core-prebuilt + - React-featureflags + - React-hermes + - React-jsi + - React-jsinspector + - React-jsinspectorcdp + - React-jsinspectortracing + - React-jsitooling + - React-jsitracing + - React-RuntimeCore + - React-runtimeexecutor + - React-utils + - ReactNativeDependencies + - React-runtimescheduler (0.85.2): + - hermes-engine + - React-callinvoker + - React-Core-prebuilt + - React-cxxreact + - React-debug + - React-featureflags + - React-jsi + - React-jsinspectortracing + - React-performancetimeline + - React-rendererconsistency + - React-rendererdebug + - React-runtimeexecutor + - React-timing + - React-utils + - ReactNativeDependencies + - React-timing (0.85.2): + - React-debug + - React-utils (0.85.2): + - hermes-engine + - React-Core-prebuilt + - React-debug + - React-jsi (= 0.85.2) + - ReactNativeDependencies + - React-webperformancenativemodule (0.85.2): + - hermes-engine + - React-Core-prebuilt + - React-cxxreact + - React-jsi + - React-jsiexecutor + - React-performancetimeline + - React-RCTFBReactNativeSpec + - React-runtimeexecutor + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - ReactAppDependencyProvider (0.85.2): + - ReactCodegen + - ReactCodegen (0.85.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-FabricImage + - React-featureflags + - React-graphics + - React-jsi + - React-jsiexecutor + - React-NativeModulesApple + - React-RCTAppDelegate + - React-rendererdebug + - React-utils + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - ReactCommon (0.85.2): + - React-Core-prebuilt + - ReactCommon/turbomodule (= 0.85.2) + - ReactNativeDependencies + - ReactCommon/turbomodule (0.85.2): + - hermes-engine + - React-callinvoker (= 0.85.2) + - React-Core-prebuilt + - React-cxxreact (= 0.85.2) + - React-jsi (= 0.85.2) + - React-logger (= 0.85.2) + - React-perflogger (= 0.85.2) + - ReactCommon/turbomodule/bridging (= 0.85.2) + - ReactCommon/turbomodule/core (= 0.85.2) + - ReactNativeDependencies + - ReactCommon/turbomodule/bridging (0.85.2): + - hermes-engine + - React-callinvoker (= 0.85.2) + - React-Core-prebuilt + - React-cxxreact (= 0.85.2) + - React-jsi (= 0.85.2) + - React-logger (= 0.85.2) + - React-perflogger (= 0.85.2) + - ReactNativeDependencies + - ReactCommon/turbomodule/core (0.85.2): + - hermes-engine + - React-callinvoker (= 0.85.2) + - React-Core-prebuilt + - React-cxxreact (= 0.85.2) + - React-debug (= 0.85.2) + - React-featureflags (= 0.85.2) + - React-jsi (= 0.85.2) + - React-logger (= 0.85.2) + - React-perflogger (= 0.85.2) + - React-utils (= 0.85.2) + - ReactNativeDependencies + - ReactNativeDependencies (0.85.2) + - RNCAsyncStorage (2.2.0): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - RNReanimated (4.6.0): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-hermes + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - RNReanimated/apple (= 4.6.0) + - RNReanimated/common (= 4.6.0) + - RNReanimated/view (= 4.6.0) + - RNWorklets + - Yoga + - RNReanimated/apple (4.6.0): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-hermes + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - RNWorklets + - Yoga + - RNReanimated/common (4.6.0): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-hermes + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - RNWorklets + - Yoga + - RNReanimated/view (4.6.0): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-hermes + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - RNWorklets + - Yoga + - RNSVG (15.15.5): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - RNSVG/common (= 15.15.5) + - Yoga + - RNSVG/common (15.15.5): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - RNWorklets (0.12.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-hermes + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - RNWorklets/apple (= 0.12.2) + - RNWorklets/common (= 0.12.2) + - Yoga + - RNWorklets/apple (0.12.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-hermes + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - RNWorklets/common (0.12.2): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-hermes + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga + - Yoga (0.0.0) + +DEPENDENCIES: + - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) + - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) + - "MeshSdk (from `../node_modules/@offline-protocol/mesh-sdk`)" + - RCTDeprecation (from `../node_modules/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation`) + - RCTRequired (from `../node_modules/react-native/Libraries/Required`) + - RCTSwiftUI (from `../node_modules/react-native/ReactApple/RCTSwiftUI`) + - RCTSwiftUIWrapper (from `../node_modules/react-native/ReactApple/RCTSwiftUIWrapper`) + - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) + - React (from `../node_modules/react-native/`) + - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) + - React-Core (from `../node_modules/react-native/`) + - React-Core-prebuilt (from `../node_modules/react-native/React-Core-prebuilt.podspec`) + - React-Core/RCTWebSocket (from `../node_modules/react-native/`) + - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) + - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) + - React-debug (from `../node_modules/react-native/ReactCommon/react/debug`) + - React-defaultsnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/defaults`) + - React-domnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/dom`) + - React-Fabric (from `../node_modules/react-native/ReactCommon`) + - React-FabricComponents (from `../node_modules/react-native/ReactCommon`) + - React-FabricImage (from `../node_modules/react-native/ReactCommon`) + - React-featureflags (from `../node_modules/react-native/ReactCommon/react/featureflags`) + - React-featureflagsnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/featureflags`) + - React-graphics (from `../node_modules/react-native/ReactCommon/react/renderer/graphics`) + - React-hermes (from `../node_modules/react-native/ReactCommon/hermes`) + - React-idlecallbacksnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/idlecallbacks`) + - React-ImageManager (from `../node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios`) + - React-intersectionobservernativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/intersectionobserver`) + - React-jserrorhandler (from `../node_modules/react-native/ReactCommon/jserrorhandler`) + - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) + - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) + - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector-modern`) + - React-jsinspectorcdp (from `../node_modules/react-native/ReactCommon/jsinspector-modern/cdp`) + - React-jsinspectornetwork (from `../node_modules/react-native/ReactCommon/jsinspector-modern/network`) + - React-jsinspectortracing (from `../node_modules/react-native/ReactCommon/jsinspector-modern/tracing`) + - React-jsitooling (from `../node_modules/react-native/ReactCommon/jsitooling`) + - React-jsitracing (from `../node_modules/react-native/ReactCommon/hermes/executor/`) + - React-logger (from `../node_modules/react-native/ReactCommon/logger`) + - React-Mapbuffer (from `../node_modules/react-native/ReactCommon`) + - React-microtasksnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/microtasks`) + - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`) + - React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`) + - React-networking (from `../node_modules/react-native/ReactCommon/react/networking`) + - React-oscompat (from `../node_modules/react-native/ReactCommon/oscompat`) + - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`) + - React-performancecdpmetrics (from `../node_modules/react-native/ReactCommon/react/performance/cdpmetrics`) + - React-performancetimeline (from `../node_modules/react-native/ReactCommon/react/performance/timeline`) + - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) + - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) + - React-RCTAppDelegate (from `../node_modules/react-native/Libraries/AppDelegate`) + - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) + - React-RCTFabric (from `../node_modules/react-native/React`) + - React-RCTFBReactNativeSpec (from `../node_modules/react-native/React`) + - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) + - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) + - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) + - React-RCTRuntime (from `../node_modules/react-native/React/Runtime`) + - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) + - React-RCTText (from `../node_modules/react-native/Libraries/Text`) + - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) + - React-rendererconsistency (from `../node_modules/react-native/ReactCommon/react/renderer/consistency`) + - React-renderercss (from `../node_modules/react-native/ReactCommon/react/renderer/css`) + - React-rendererdebug (from `../node_modules/react-native/ReactCommon/react/renderer/debug`) + - React-RuntimeApple (from `../node_modules/react-native/ReactCommon/react/runtime/platform/ios`) + - React-RuntimeCore (from `../node_modules/react-native/ReactCommon/react/runtime`) + - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) + - React-RuntimeHermes (from `../node_modules/react-native/ReactCommon/react/runtime`) + - React-runtimescheduler (from `../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`) + - React-timing (from `../node_modules/react-native/ReactCommon/react/timing`) + - React-utils (from `../node_modules/react-native/ReactCommon/react/utils`) + - React-webperformancenativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/webperformance`) + - ReactAppDependencyProvider (from `build/generated/ios/ReactAppDependencyProvider`) + - ReactCodegen (from `build/generated/ios/ReactCodegen`) + - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) + - ReactNativeDependencies (from `../node_modules/react-native/third-party-podspecs/ReactNativeDependencies.podspec`) + - "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)" + - RNReanimated (from `../node_modules/react-native-reanimated`) + - RNSVG (from `../node_modules/react-native-svg`) + - RNWorklets (from `../node_modules/react-native-worklets`) + - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) + +EXTERNAL SOURCES: + FBLazyVector: + :path: "../node_modules/react-native/Libraries/FBLazyVector" + hermes-engine: + :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" + :tag: hermes-v250829098.0.10 + MeshSdk: + :path: "../node_modules/@offline-protocol/mesh-sdk" + RCTDeprecation: + :path: "../node_modules/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation" + RCTRequired: + :path: "../node_modules/react-native/Libraries/Required" + RCTSwiftUI: + :path: "../node_modules/react-native/ReactApple/RCTSwiftUI" + RCTSwiftUIWrapper: + :path: "../node_modules/react-native/ReactApple/RCTSwiftUIWrapper" + RCTTypeSafety: + :path: "../node_modules/react-native/Libraries/TypeSafety" + React: + :path: "../node_modules/react-native/" + React-callinvoker: + :path: "../node_modules/react-native/ReactCommon/callinvoker" + React-Core: + :path: "../node_modules/react-native/" + React-Core-prebuilt: + :podspec: "../node_modules/react-native/React-Core-prebuilt.podspec" + React-CoreModules: + :path: "../node_modules/react-native/React/CoreModules" + React-cxxreact: + :path: "../node_modules/react-native/ReactCommon/cxxreact" + React-debug: + :path: "../node_modules/react-native/ReactCommon/react/debug" + React-defaultsnativemodule: + :path: "../node_modules/react-native/ReactCommon/react/nativemodule/defaults" + React-domnativemodule: + :path: "../node_modules/react-native/ReactCommon/react/nativemodule/dom" + React-Fabric: + :path: "../node_modules/react-native/ReactCommon" + React-FabricComponents: + :path: "../node_modules/react-native/ReactCommon" + React-FabricImage: + :path: "../node_modules/react-native/ReactCommon" + React-featureflags: + :path: "../node_modules/react-native/ReactCommon/react/featureflags" + React-featureflagsnativemodule: + :path: "../node_modules/react-native/ReactCommon/react/nativemodule/featureflags" + React-graphics: + :path: "../node_modules/react-native/ReactCommon/react/renderer/graphics" + React-hermes: + :path: "../node_modules/react-native/ReactCommon/hermes" + React-idlecallbacksnativemodule: + :path: "../node_modules/react-native/ReactCommon/react/nativemodule/idlecallbacks" + React-ImageManager: + :path: "../node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios" + React-intersectionobservernativemodule: + :path: "../node_modules/react-native/ReactCommon/react/nativemodule/intersectionobserver" + React-jserrorhandler: + :path: "../node_modules/react-native/ReactCommon/jserrorhandler" + React-jsi: + :path: "../node_modules/react-native/ReactCommon/jsi" + React-jsiexecutor: + :path: "../node_modules/react-native/ReactCommon/jsiexecutor" + React-jsinspector: + :path: "../node_modules/react-native/ReactCommon/jsinspector-modern" + React-jsinspectorcdp: + :path: "../node_modules/react-native/ReactCommon/jsinspector-modern/cdp" + React-jsinspectornetwork: + :path: "../node_modules/react-native/ReactCommon/jsinspector-modern/network" + React-jsinspectortracing: + :path: "../node_modules/react-native/ReactCommon/jsinspector-modern/tracing" + React-jsitooling: + :path: "../node_modules/react-native/ReactCommon/jsitooling" + React-jsitracing: + :path: "../node_modules/react-native/ReactCommon/hermes/executor/" + React-logger: + :path: "../node_modules/react-native/ReactCommon/logger" + React-Mapbuffer: + :path: "../node_modules/react-native/ReactCommon" + React-microtasksnativemodule: + :path: "../node_modules/react-native/ReactCommon/react/nativemodule/microtasks" + react-native-safe-area-context: + :path: "../node_modules/react-native-safe-area-context" + React-NativeModulesApple: + :path: "../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios" + React-networking: + :path: "../node_modules/react-native/ReactCommon/react/networking" + React-oscompat: + :path: "../node_modules/react-native/ReactCommon/oscompat" + React-perflogger: + :path: "../node_modules/react-native/ReactCommon/reactperflogger" + React-performancecdpmetrics: + :path: "../node_modules/react-native/ReactCommon/react/performance/cdpmetrics" + React-performancetimeline: + :path: "../node_modules/react-native/ReactCommon/react/performance/timeline" + React-RCTActionSheet: + :path: "../node_modules/react-native/Libraries/ActionSheetIOS" + React-RCTAnimation: + :path: "../node_modules/react-native/Libraries/NativeAnimation" + React-RCTAppDelegate: + :path: "../node_modules/react-native/Libraries/AppDelegate" + React-RCTBlob: + :path: "../node_modules/react-native/Libraries/Blob" + React-RCTFabric: + :path: "../node_modules/react-native/React" + React-RCTFBReactNativeSpec: + :path: "../node_modules/react-native/React" + React-RCTImage: + :path: "../node_modules/react-native/Libraries/Image" + React-RCTLinking: + :path: "../node_modules/react-native/Libraries/LinkingIOS" + React-RCTNetwork: + :path: "../node_modules/react-native/Libraries/Network" + React-RCTRuntime: + :path: "../node_modules/react-native/React/Runtime" + React-RCTSettings: + :path: "../node_modules/react-native/Libraries/Settings" + React-RCTText: + :path: "../node_modules/react-native/Libraries/Text" + React-RCTVibration: + :path: "../node_modules/react-native/Libraries/Vibration" + React-rendererconsistency: + :path: "../node_modules/react-native/ReactCommon/react/renderer/consistency" + React-renderercss: + :path: "../node_modules/react-native/ReactCommon/react/renderer/css" + React-rendererdebug: + :path: "../node_modules/react-native/ReactCommon/react/renderer/debug" + React-RuntimeApple: + :path: "../node_modules/react-native/ReactCommon/react/runtime/platform/ios" + React-RuntimeCore: + :path: "../node_modules/react-native/ReactCommon/react/runtime" + React-runtimeexecutor: + :path: "../node_modules/react-native/ReactCommon/runtimeexecutor" + React-RuntimeHermes: + :path: "../node_modules/react-native/ReactCommon/react/runtime" + React-runtimescheduler: + :path: "../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler" + React-timing: + :path: "../node_modules/react-native/ReactCommon/react/timing" + React-utils: + :path: "../node_modules/react-native/ReactCommon/react/utils" + React-webperformancenativemodule: + :path: "../node_modules/react-native/ReactCommon/react/nativemodule/webperformance" + ReactAppDependencyProvider: + :path: build/generated/ios/ReactAppDependencyProvider + ReactCodegen: + :path: build/generated/ios/ReactCodegen + ReactCommon: + :path: "../node_modules/react-native/ReactCommon" + ReactNativeDependencies: + :podspec: "../node_modules/react-native/third-party-podspecs/ReactNativeDependencies.podspec" + RNCAsyncStorage: + :path: "../node_modules/@react-native-async-storage/async-storage" + RNReanimated: + :path: "../node_modules/react-native-reanimated" + RNSVG: + :path: "../node_modules/react-native-svg" + RNWorklets: + :path: "../node_modules/react-native-worklets" + Yoga: + :path: "../node_modules/react-native/ReactCommon/yoga" + +SPEC CHECKSUMS: + FBLazyVector: 26fd21c75314e101f280d401e97f27d54f3f7064 + hermes-engine: 3a002838bb4972a0235545718ba18f497305aa5d + MeshSdk: dc48b6c67eb632530836c964c9f2c5b1513224dd + RCTDeprecation: c7a2768f905d76ca6d2cfefb26e4349eacbdfca3 + RCTRequired: 5e502c3553cfbed090a991c444448da452fb752e + RCTSwiftUI: 5ce3ccbdc58b78cc4ebbaace01709ec22d58e131 + RCTSwiftUIWrapper: a8317a87bb70ef8a07dcecaf4977db7f60cf04c1 + RCTTypeSafety: 5826cf1f2269e44caee5e7c8d64e2a43af8cf0ef + React: 13cf8451582adb1bb324306e1893b91d1cba28c6 + React-callinvoker: 91e6a605826b684ad2e623811253b4d0c4196bef + React-Core: 46818de5f211b2a2759ac823b591af8a0a95c2c1 + React-Core-prebuilt: d4da31166265ea02d62af4030a82a343ea5392db + React-CoreModules: a6a37afee48d4a31ab398640b0795462647d5c67 + React-cxxreact: 2ec3e2f7a8ae9303460d4ba94cde183ea90d64cd + React-debug: 0d21117b897ce0359c9d2c9dfe952f237476a14a + React-defaultsnativemodule: d39e708d4da6badf4ecca767da448da50b67c7c9 + React-domnativemodule: 100e502f718502d0f9c22071339e690f911aabc6 + React-Fabric: 8595b459278e6c6bf9757f3df9c6d1bfbbf00e9f + React-FabricComponents: 7da0ce24bcf163d2e447876b249aa2bd81689165 + React-FabricImage: 87d397fe918e2725633211c121457b5aa3ddc437 + React-featureflags: 2302476d727ad40a684724e3e137ebfa21640386 + React-featureflagsnativemodule: dbb8429313c66b48d9bcdf0f446ee095ef28f16a + React-graphics: 086f042572c2b957c505bc3e3138ee8e1c6415c1 + React-hermes: 540a5f1f008eb04fe59b931112b10854ee6c7061 + React-idlecallbacksnativemodule: 0dcf39e4842a8255ce48f834e82524b394c016d2 + React-ImageManager: 367a9979094651c157a35f7cb0e0f7b072451035 + React-intersectionobservernativemodule: 6b695a44eec274569a438d690e468a9e4a74a3dd + React-jserrorhandler: b23306d6d8309693189a89efdd0cf25a5c35b17d + React-jsi: 533b0f879f5e60d6c4047d429d9ba1b6c2a7e113 + React-jsiexecutor: e4380339286988d17dd1bf1b0f31e4e6ac5ef1a0 + React-jsinspector: 6360a071b0c8bd3c77f519e8836ea57bab2456d4 + React-jsinspectorcdp: 7a33cd5cfd16ca10a9b7eff7462456b18daf5d14 + React-jsinspectornetwork: dd8dbb9f54308408e4483c3160aebccb6f03780d + React-jsinspectortracing: 90f7ad9acafd2de4bc56ed5f0b13aca5d221ce4b + React-jsitooling: 713feac6b772e11c9bf2a5d75570bb74d9bfe15f + React-jsitracing: cacd0f0ef50ea61e7035c8ba3a4dc5b38c4da834 + React-logger: 2c87840a9f6322a1226d0df337d9662f44ea6094 + React-Mapbuffer: 1fc10d873f00aa895836c316a9737ce7d43875ce + React-microtasksnativemodule: 85ac7286ff84e8fc8e1956233748b8d4b2a6dcea + react-native-safe-area-context: 8368d1052ccc8fe8725adfb6a83498c8bdb48250 + React-NativeModulesApple: 993744f42aab769eb02bf5d256b6767c546d0bb5 + React-networking: 251bfddc651caca5e3039d1afa1d2eca890d0c56 + React-oscompat: ed8fa636665935e962d4091180ba6f07dcad7ea9 + React-perflogger: 2c9c7a2cb14c78d12803609d289a1bb8761d4ac3 + React-performancecdpmetrics: 613cb5ee8ac9ef50e9511e7b82aeed4d81b57b81 + React-performancetimeline: 1dde052682d06f61b1472ab79d26598ba0c883f1 + React-RCTActionSheet: f498102098d724dcf921224e213f946368cd482b + React-RCTAnimation: 9b42153018cc5f998ec911736a586cb885e33ccf + React-RCTAppDelegate: daf9f6f1fb452fbe13c81df1a8175378de7ac203 + React-RCTBlob: 8d165c9942d1a591cacadb1f073e3d9f5234d1ea + React-RCTFabric: 8071a9ca7628518420a6634c6457ecde8460e6a3 + React-RCTFBReactNativeSpec: e8eb38cca9abecf12d10a0787e413c84dc2a630f + React-RCTImage: f36bd87ac6e4aa27860518d221fd3860569a57fc + React-RCTLinking: af169ba3619e9fd02e4a0666ac01349ee642a446 + React-RCTNetwork: e31b7555e1c2c4dff1e1c594d8dac0f1a9b22fe5 + React-RCTRuntime: 397c81200ce8c2bf0d2b52b689241ed6463087a3 + React-RCTSettings: f71c195191839901491b5b2e9301514b014fbe8b + React-RCTText: 6b0cac11ad4ea9153f526a80aeecdcb0315a2039 + React-RCTVibration: 46b9020e5aab8c0c986bc4005bc2b05e1698c77d + React-rendererconsistency: fba5adaef458215b81f62459f3b1cdcc629348b8 + React-renderercss: d3bb39665d1c2f59e96fb8a04ae5bfd2baf05ca9 + React-rendererdebug: 2634d95dd3fc09f2cf2f0d2664c46a560fb57778 + React-RuntimeApple: 0f8f09f8d8031bb906ab52c683bbd6f18789faf4 + React-RuntimeCore: d4728c58d2143f503391b1389082e3044e8b0f23 + React-runtimeexecutor: a21a37ce38ff623c5f51b41d7a0f05de8e1fb01f + React-RuntimeHermes: 0e7833979b1b14e64cbda469104f48d1d12a573a + React-runtimescheduler: 13582d42d9d9ff6bd2d59c25576b1c13eb62308c + React-timing: 9f1af3753eef091257c424d3856cd6cbedcad01e + React-utils: 862e61256698fe3841aec1af476abf924a6737c3 + React-webperformancenativemodule: e745e43264767cb8f4334fc11bf3fbff880050d0 + ReactAppDependencyProvider: 22e2265d86a4e871e5e858f4e7ef1c8d01103680 + ReactCodegen: ff525841ad04271ac014124551cc27fe2504e966 + ReactCommon: a804bb8d1dcf3ecdec3a77eb8bba19b7863bbbdb + ReactNativeDependencies: 000a90f84e92b1caa17ed9691b6784eae55d927f + RNCAsyncStorage: 2ad919e88b8bc2cd80e8697ce66d04d006743283 + RNReanimated: f194a821533c12bd52284f5f7cbc39f44f5e70b8 + RNSVG: 0e52210d4d43165e7e2cf9c890a9848b27e513ac + RNWorklets: 6df88df4d498668192571738b0492db7bc6463da + Yoga: 04bb4bfeb02c0000b940c1e6e89e856cd8de5a71 + +PODFILE CHECKSUM: 2bf2198ccff38ad4fc8a50a7397a7b54991bab21 + +COCOAPODS: 1.16.2 diff --git a/apps/eventfloor/metro.config.js b/apps/eventfloor/metro.config.js new file mode 100644 index 0000000..36527b3 --- /dev/null +++ b/apps/eventfloor/metro.config.js @@ -0,0 +1,21 @@ +const path = require('path'); +const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config'); +const { withNativeWind } = require('nativewind/metro'); + +const monorepoRoot = path.resolve(__dirname, '../..'); + +/** @type {import('@react-native/metro-config').MetroConfig} */ +const config = { + watchFolders: [monorepoRoot], + resolver: { + nodeModulesPaths: [ + path.resolve(__dirname, 'node_modules'), + path.resolve(monorepoRoot, 'node_modules'), + ], + }, +}; + +// The theme lives in the shared ui package; App.tsx imports the same file. +module.exports = withNativeWind(mergeConfig(getDefaultConfig(__dirname), config), { + input: require.resolve('@offline-app-examples/ui/global.css'), +}); diff --git a/apps/eventfloor/nativewind-env.d.ts b/apps/eventfloor/nativewind-env.d.ts new file mode 100644 index 0000000..a13e313 --- /dev/null +++ b/apps/eventfloor/nativewind-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/apps/eventfloor/package.json b/apps/eventfloor/package.json new file mode 100644 index 0000000..a4a8c15 --- /dev/null +++ b/apps/eventfloor/package.json @@ -0,0 +1,76 @@ +{ + "name": "@offline-app-examples/eventfloor", + "version": "0.1.0", + "private": true, + "license": "MIT-0", + "scripts": { + "android": "react-native run-android", + "ios": "react-native run-ios", + "start": "react-native start", + "dev": "react-native start", + "start:fresh": "react-native start --reset-cache", + "test": "jest --runInBand --passWithNoTests", + "lint": "eslint .", + "typecheck": "tsc --noEmit", + "format": "prettier --write App.tsx src __tests__", + "format:check": "prettier --check App.tsx src __tests__" + }, + "dependencies": { + "@offline-app-examples/mesh": "workspace:*", + "@offline-app-examples/ui": "workspace:*", + "@offline-protocol/mesh-sdk": "^0.27.0", + "@react-native-async-storage/async-storage": "^2.2.0", + "lucide-react-native": "^1.48.0", + "nativewind": "^4.2.7", + "react": "19.2.3", + "react-native": "0.85.2", + "react-native-css-interop": "^0.2.7", + "react-native-reanimated": "~4.6.0", + "react-native-safe-area-context": "^5.5.2", + "react-native-svg": "^15.15.5", + "react-native-worklets": "~0.12.2" + }, + "devDependencies": { + "@babel/core": "^7.25.2", + "@babel/plugin-transform-react-jsx": "^7.27.1", + "@babel/preset-env": "^7.25.3", + "@babel/runtime": "^7.25.0", + "@jest/globals": "^29.6.3", + "@react-native-community/cli": "20.1.0", + "@react-native-community/cli-platform-android": "20.1.0", + "@react-native-community/cli-platform-ios": "20.1.0", + "@react-native/babel-preset": "0.85.2", + "@react-native/codegen": "0.85.2", + "@react-native/eslint-config": "0.85.2", + "@react-native/gradle-plugin": "0.85.2", + "@react-native/jest-preset": "0.85.2", + "@react-native/metro-config": "0.85.2", + "@react-native/typescript-config": "0.85.2", + "@types/react": "^19.2.0", + "babel-jest": "^29.6.3", + "eslint": "^8.19.0", + "hermes-compiler": "250829098.0.10", + "jest": "^29.6.3", + "prettier": "^3.9.6", + "react-test-renderer": "19.2.3", + "tailwindcss": "^3.4.19", + "typescript": "^5.8.3" + }, + "engines": { + "node": ">=20" + }, + "jest": { + "testMatch": [ + "**/__tests__/**/*.test.ts" + ], + "transform": { + "^.+\\.(ts|tsx)$": "babel-jest" + }, + "moduleFileExtensions": [ + "ts", + "tsx", + "js", + "json" + ] + } +} diff --git a/apps/eventfloor/src/domain/admission.ts b/apps/eventfloor/src/domain/admission.ts new file mode 100644 index 0000000..4bf536a --- /dev/null +++ b/apps/eventfloor/src/domain/admission.ts @@ -0,0 +1,222 @@ +import { findTicket } from './tickets'; + +export type AdmissionRecord = { + scanId: string; + ticketId: string; + eventId: string; + gateId: string; + gateName: string; + deviceId: string; + scannedAt: number; + holder: string; + section: string; +}; + +export type GateMessage = + | { type: 'propose'; record: AdmissionRecord } + | { + type: 'snapshot'; + rev: number; + admissions: AdmissionRecord[]; + syncedScanIds: string[]; + platformDuplicatesDropped: number; + }; + +export const SNAPSHOT_ADMISSIONS = 40; + +export type HostState = { + rev: number; + admissions: AdmissionRecord[]; + syncedScanIds: string[]; + platformDuplicatesDropped: number; +}; + +export type ScannerState = { + rev: number; + admissions: AdmissionRecord[]; + syncedScanIds: string[]; + platformDuplicatesDropped: number; + pendingScanIds: string[]; + lastResult: ScanResult | null; +}; + +export type ScanResult = + | { outcome: 'admitted'; record: AdmissionRecord } + | { outcome: 'already_used'; record: AdmissionRecord } + | { outcome: 'unknown_ticket'; ticketId: string } + | { outcome: 'invalid'; reason: string }; + +export const emptyHost = (): HostState => ({ + rev: 0, + admissions: [], + syncedScanIds: [], + platformDuplicatesDropped: 0, +}); + +export const emptyScanner = (): ScannerState => ({ + rev: -1, + admissions: [], + syncedScanIds: [], + platformDuplicatesDropped: 0, + pendingScanIds: [], + lastResult: null, +}); + +export function newScanId(): string { + return `scan-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`; +} + +export function admissionByTicket( + admissions: AdmissionRecord[], + ticketId: string, +): AdmissionRecord | undefined { + const id = ticketId.trim().toUpperCase(); + return admissions.find((a) => a.ticketId === id); +} + +export function snapshotOf(state: HostState): GateMessage { + return { + type: 'snapshot', + rev: state.rev, + admissions: state.admissions.slice(-SNAPSHOT_ADMISSIONS), + syncedScanIds: state.syncedScanIds, + platformDuplicatesDropped: state.platformDuplicatesDropped, + }; +} + +export type HostAction = + | { type: 'propose'; record: AdmissionRecord } + | { + type: 'mark_synced'; + scanIds: string[]; + duplicatesDropped: number; + }; + +export function hostReducer(state: HostState, action: HostAction): HostState { + switch (action.type) { + case 'propose': { + const { record } = action; + if (state.admissions.some((a) => a.ticketId === record.ticketId)) return state; + if (state.admissions.some((a) => a.scanId === record.scanId)) return state; + return { + ...state, + rev: state.rev + 1, + admissions: [...state.admissions, record], + }; + } + case 'mark_synced': + return { + ...state, + syncedScanIds: [...new Set([...state.syncedScanIds, ...action.scanIds])], + platformDuplicatesDropped: state.platformDuplicatesDropped + action.duplicatesDropped, + }; + default: + return state; + } +} + +export type ScannerAction = + | { type: 'queue'; scanId: string } + | { + type: 'snapshot'; + rev: number; + admissions: AdmissionRecord[]; + syncedScanIds: string[]; + platformDuplicatesDropped: number; + } + | { type: 'scan_result'; result: ScanResult }; + +export function scannerReducer(state: ScannerState, action: ScannerAction): ScannerState { + switch (action.type) { + case 'queue': + if (state.pendingScanIds.includes(action.scanId)) return state; + return { ...state, pendingScanIds: [...state.pendingScanIds, action.scanId] }; + case 'snapshot': { + if (action.rev < state.rev) return state; + const known = new Set(action.admissions.map((a) => a.scanId)); + const pendingScanIds = state.pendingScanIds.filter((id) => !known.has(id)); + return { + rev: action.rev, + admissions: action.admissions, + syncedScanIds: action.syncedScanIds, + platformDuplicatesDropped: action.platformDuplicatesDropped, + pendingScanIds, + lastResult: state.lastResult, + }; + } + case 'scan_result': + return { ...state, lastResult: action.result }; + default: + return state; + } +} + +export function pendingResend(state: ScannerState): string[] { + const admitted = new Set(state.admissions.map((a) => a.scanId)); + return state.pendingScanIds.filter((id) => !admitted.has(id)); +} + +export function buildScanProposal(input: { + ticketId: string; + eventId: string; + gateId: string; + gateName: string; + deviceId: string; + now: number; +}): { record: AdmissionRecord } | { error: string } { + const ticket = findTicket(input.ticketId); + if (!ticket) return { error: 'Ticket not in offline cache for this event.' }; + return { + record: { + scanId: newScanId(), + ticketId: ticket.ticketId, + eventId: input.eventId, + gateId: input.gateId, + gateName: input.gateName.slice(0, 40), + deviceId: input.deviceId, + scannedAt: input.now, + holder: ticket.holder, + section: ticket.section, + }, + }; +} + +export function evaluateLocalScan( + admissions: AdmissionRecord[], + ticketId: string, +): ScanResult { + const ticket = findTicket(ticketId); + if (!ticket) return { outcome: 'unknown_ticket', ticketId: ticketId.trim().toUpperCase() }; + const existing = admissionByTicket(admissions, ticket.ticketId); + if (existing) return { outcome: 'already_used', record: existing }; + return { outcome: 'invalid', reason: 'Host must confirm first scan' }; +} + +export function parseGateMessage(data: unknown): GateMessage | null { + if (!data || typeof data !== 'object') return null; + const m = data as Partial; + if (m.type === 'propose') { + const r = m.record as Partial | undefined; + if ( + !r || + typeof r.scanId !== 'string' || + typeof r.ticketId !== 'string' || + typeof r.gateId !== 'string' + ) { + return null; + } + return { type: 'propose', record: r as AdmissionRecord }; + } + if (m.type === 'snapshot') { + if (typeof m.rev !== 'number' || !Array.isArray(m.admissions)) return null; + return { + type: 'snapshot', + rev: m.rev, + admissions: m.admissions as AdmissionRecord[], + syncedScanIds: Array.isArray(m.syncedScanIds) ? m.syncedScanIds : [], + platformDuplicatesDropped: + typeof m.platformDuplicatesDropped === 'number' ? m.platformDuplicatesDropped : 0, + }; + } + return null; +} diff --git a/apps/eventfloor/src/domain/platform.ts b/apps/eventfloor/src/domain/platform.ts new file mode 100644 index 0000000..60ef6d1 --- /dev/null +++ b/apps/eventfloor/src/domain/platform.ts @@ -0,0 +1,32 @@ +/** Mock ticketing platform ingest — idempotent on scanId. */ + +export type PlatformIngestResult = { + accepted: string[]; + duplicatesDropped: number; +}; + +export function ingestToPlatform( + alreadyStored: Set, + scanIds: string[], +): { next: Set; result: PlatformIngestResult } { + const accepted: string[] = []; + let duplicatesDropped = 0; + const next = new Set(alreadyStored); + for (const id of scanIds) { + if (next.has(id)) { + duplicatesDropped += 1; + continue; + } + next.add(id); + accepted.push(id); + } + return { next, result: { accepted, duplicatesDropped } }; +} + +export function unsyncedScanIds( + admissions: { scanId: string }[], + syncedIds: string[], +): string[] { + const synced = new Set(syncedIds); + return admissions.map((a) => a.scanId).filter((id) => !synced.has(id)); +} diff --git a/apps/eventfloor/src/domain/staff.ts b/apps/eventfloor/src/domain/staff.ts new file mode 100644 index 0000000..304d67f --- /dev/null +++ b/apps/eventfloor/src/domain/staff.ts @@ -0,0 +1,104 @@ +/** Flow A — staff roster (demo OfflineID stand-in: staff id + PIN). */ + +export type StaffProfile = { + staffId: string; + displayName: string; + pin: string; + unit: string; +}; + +export const STAFF_ROSTER: StaffProfile[] = [ + { staffId: 'staff-sec', displayName: 'Security Lead', pin: '1001', unit: 'Security' }, + { staffId: 'staff-med', displayName: 'Medical Lead', pin: '2002', unit: 'Medical' }, + { staffId: 'staff-ops', displayName: 'Ops Coordinator', pin: '3003', unit: 'Operations' }, +]; + +export type StaffSession = { + staffId: string; + displayName: string; + unit: string; +}; + +export function signInStaff(staffId: string, pin: string): StaffSession | null { + const profile = STAFF_ROSTER.find((s) => s.staffId === staffId); + if (!profile || profile.pin !== pin.trim()) return null; + return { + staffId: profile.staffId, + displayName: profile.displayName, + unit: profile.unit, + }; +} + +export type StaffAlert = { + type: 'staff_alert'; + alertId: string; + body: string; + section: string; + senderStaffId: string; + senderName: string; + senderUnit: string; + createdAt: number; +}; + +export type StaffAck = { + type: 'staff_ack'; + alertId: string; + ackStaffId: string; + ackName: string; + at: number; +}; + +export type StaffMessage = StaffAlert | StaffAck; + +export const STAFF_SECTIONS = ['Section A', 'Section B', 'Section C', 'Backstage'] as const; + +export function newAlertId(): string { + return `alert-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 7)}`; +} + +export function parseStaffMessage(data: unknown): StaffMessage | null { + if (!data || typeof data !== 'object') return null; + const m = data as Partial; + if (m.type === 'staff_alert') { + if ( + typeof m.alertId !== 'string' || + typeof m.body !== 'string' || + typeof m.section !== 'string' || + typeof m.senderStaffId !== 'string' || + typeof m.senderName !== 'string' || + typeof m.createdAt !== 'number' + ) { + return null; + } + if (!STAFF_ROSTER.some((s) => s.staffId === m.senderStaffId)) return null; + return { + type: 'staff_alert', + alertId: m.alertId.slice(0, 64), + body: m.body.slice(0, 240), + section: m.section.slice(0, 40), + senderStaffId: m.senderStaffId, + senderName: m.senderName.slice(0, 40), + senderUnit: typeof m.senderUnit === 'string' ? m.senderUnit.slice(0, 40) : 'Staff', + createdAt: m.createdAt, + }; + } + if (m.type === 'staff_ack') { + if ( + typeof m.alertId !== 'string' || + typeof m.ackStaffId !== 'string' || + typeof m.ackName !== 'string' || + typeof m.at !== 'number' + ) { + return null; + } + if (!STAFF_ROSTER.some((s) => s.staffId === m.ackStaffId)) return null; + return { + type: 'staff_ack', + alertId: m.alertId, + ackStaffId: m.ackStaffId, + ackName: m.ackName.slice(0, 40), + at: m.at, + }; + } + return null; +} diff --git a/apps/eventfloor/src/domain/tickets.ts b/apps/eventfloor/src/domain/tickets.ts new file mode 100644 index 0000000..42a4e6a --- /dev/null +++ b/apps/eventfloor/src/domain/tickets.ts @@ -0,0 +1,25 @@ +/** Seeded tickets for Flow B demos (no partner trademark in copy). */ +export type SeededTicket = { + ticketId: string; + holder: string; + section: string; + tier: string; +}; + +export const DEMO_EVENT = { + eventId: 'evt-demo-2026', + name: 'Harbor Pavilion — Night Session', +} as const; + +export const SEEDED_TICKETS: SeededTicket[] = [ + { ticketId: 'T-1001', holder: 'Alex Kim', section: 'A', tier: 'GA' }, + { ticketId: 'T-1002', holder: 'Jordan Lee', section: 'B', tier: 'GA' }, + { ticketId: 'T-1003', holder: 'Sam Rivera', section: 'VIP', tier: 'VIP' }, + { ticketId: 'T-1004', holder: 'Casey Morgan', section: 'A', tier: 'GA' }, + { ticketId: 'T-1005', holder: 'Riley Chen', section: 'C', tier: 'GA' }, +]; + +export function findTicket(ticketId: string): SeededTicket | undefined { + const id = ticketId.trim().toUpperCase(); + return SEEDED_TICKETS.find((t) => t.ticketId === id); +} diff --git a/apps/eventfloor/src/flows/GateFlow.tsx b/apps/eventfloor/src/flows/GateFlow.tsx new file mode 100644 index 0000000..f50b6db --- /dev/null +++ b/apps/eventfloor/src/flows/GateFlow.tsx @@ -0,0 +1,275 @@ +import { useMeshRelay, useNearbyRoom } from '@offline-app-examples/mesh'; +import React, { useCallback, useEffect, useRef, useState } from 'react'; +import { + admissionByTicket, + buildScanProposal, + emptyHost, + emptyScanner, + hostReducer, + parseGateMessage, + pendingResend, + scannerReducer, + snapshotOf, + type AdmissionRecord, +} from '../domain/admission'; +import { ingestToPlatform, unsyncedScanIds } from '../domain/platform'; +import { DEMO_EVENT } from '../domain/tickets'; +import { loadPersisted, savePersisted, sanitizeHost, sanitizeScanner } from '../services/persist'; +import { HostGateScreen } from '../ui/HostGateScreen'; +import { RelayScreen } from '../ui/RelayScreen'; +import { ScannerGateScreen } from '../ui/ScannerGateScreen'; + +const APP_ID = 'eventfloor'; +const RESEND_MS = 8_000; + +export type GateRole = 'host' | 'scanner' | 'relay'; + +export function GateFlow({ + role, + gateName, + onLeave, +}: { + role: GateRole; + gateName: string; + onLeave: () => void; +}) { + const [host, setHost] = useState(emptyHost); + const [scanner, setScanner] = useState(emptyScanner); + const [platformStored, setPlatformStored] = useState>(new Set()); + const hostRef = useRef(host); + const scannerRef = useRef(scanner); + const platformRef = useRef(platformStored); + const pendingRecords = useRef>(new Map()); + + hostRef.current = host; + scannerRef.current = scanner; + platformRef.current = platformStored; + + useEffect(() => { + loadPersisted().then((p) => { + if (p.host) setHost(sanitizeHost(p.host)); + if (p.scanner) setScanner(sanitizeScanner(p.scanner)); + if (p.platformStoredScanIds) setPlatformStored(new Set(p.platformStoredScanIds)); + }); + }, []); + + const persist = useCallback(() => { + savePersisted({ + host: hostRef.current, + scanner: scannerRef.current, + platformStoredScanIds: [...platformRef.current], + }); + }, []); + + const relay = useMeshRelay(APP_ID); + + const room = useNearbyRoom({ + appId: APP_ID, + onMessage: (from, data) => { + const msg = parseGateMessage(data); + if (!msg) return; + + if (room.role === 'host') { + if (msg.type === 'propose') { + const existing = admissionByTicket(hostRef.current.admissions, msg.record.ticketId); + if (existing) return; + const next = hostReducer(hostRef.current, { type: 'propose', record: msg.record }); + if (next !== hostRef.current) { + hostRef.current = next; + setHost(next); + broadcast(snapshotOf(next)); + persist(); + } + } + } else if (msg.type === 'snapshot') { + scannerRef.current = scannerReducer(scannerRef.current, { + type: 'snapshot', + rev: msg.rev, + admissions: msg.admissions, + syncedScanIds: msg.syncedScanIds, + platformDuplicatesDropped: msg.platformDuplicatesDropped, + }); + for (const [scanId] of pendingRecords.current.entries()) { + const confirmed = msg.admissions.find((a) => a.scanId === scanId); + if (confirmed) { + scannerRef.current = scannerReducer(scannerRef.current, { + type: 'scan_result', + result: { outcome: 'admitted', record: confirmed }, + }); + pendingRecords.current.delete(scanId); + } + } + setScanner(scannerRef.current); + persist(); + } + }, + onPeerJoined: (peer) => { + if (room.role === 'host') send(peer.id, snapshotOf(hostRef.current)); + else resend(); + }, + }); + + const send = (peerId: string, data: unknown) => + room.send(peerId, data).catch((e) => console.warn('send failed', e)); + const broadcast = (data: unknown) => + room.broadcast(data).catch((e) => console.warn('broadcast failed', e)); + + function resend() { + for (const id of pendingResend(scannerRef.current)) { + const record = pendingRecords.current.get(id); + if (record) broadcast({ type: 'propose', record }); + } + } + + useEffect(() => { + if (role === 'relay') { + void relay.start(gateName || 'Gate relay'); + return () => { + void relay.leave(); + }; + } + if (role === 'host') { + void room.host(gateName || 'Lead gate'); + } else if (role === 'scanner') { + void room.discover(); + } + return () => { + void room.leave(); + }; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [role]); + + useEffect(() => { + if (role !== 'scanner' || room.status !== 'discovering') return; + const lead = room.hosts[0]; + if (lead) void room.join(lead.id, gateName || 'Gate'); + }, [role, room.status, room.hosts, gateName, room]); + + useEffect(() => { + if (role !== 'scanner' || room.status !== 'connected') return; + const timer = setInterval(resend, RESEND_MS); + return () => clearInterval(timer); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [role, room.status]); + + function syncPlatform() { + const ids = unsyncedScanIds(hostRef.current.admissions, hostRef.current.syncedScanIds); + const batch = ids.length > 0 ? ids : hostRef.current.admissions.map((a) => a.scanId); + const { next, result } = ingestToPlatform(platformRef.current, batch); + platformRef.current = next; + setPlatformStored(next); + const hostNext = hostReducer(hostRef.current, { + type: 'mark_synced', + scanIds: result.accepted, + duplicatesDropped: result.duplicatesDropped, + }); + hostRef.current = hostNext; + setHost(hostNext); + broadcast(snapshotOf(hostNext)); + persist(); + } + + function scanTicket(ticketId: string) { + const existing = admissionByTicket(scannerRef.current.admissions, ticketId); + if (existing) { + scannerRef.current = scannerReducer(scannerRef.current, { + type: 'scan_result', + result: { outcome: 'already_used', record: existing }, + }); + setScanner(scannerRef.current); + return; + } + + const built = buildScanProposal({ + ticketId, + eventId: DEMO_EVENT.eventId, + gateId: room.localId || 'scanner', + gateName, + deviceId: room.localId || 'scanner', + now: Date.now(), + }); + + if ('error' in built) { + scannerRef.current = scannerReducer(scannerRef.current, { + type: 'scan_result', + result: { outcome: 'unknown_ticket', ticketId: ticketId.trim().toUpperCase() }, + }); + setScanner(scannerRef.current); + return; + } + + if (room.role === 'host') { + const next = hostReducer(hostRef.current, { type: 'propose', record: built.record }); + hostRef.current = next; + setHost(next); + broadcast(snapshotOf(next)); + scannerRef.current = scannerReducer(scannerRef.current, { + type: 'scan_result', + result: { outcome: 'admitted', record: built.record }, + }); + setScanner(scannerRef.current); + persist(); + return; + } + + pendingRecords.current.set(built.record.scanId, built.record); + scannerRef.current = scannerReducer(scannerRef.current, { + type: 'queue', + scanId: built.record.scanId, + }); + setScanner(scannerRef.current); + broadcast({ type: 'propose', record: built.record }); + persist(); + } + + const me = { id: room.localId || relay.localId || 'me', name: gateName || 'Gate' }; + + if (role === 'relay') { + return ( + { + void relay.leave(); + onLeave(); + }} + /> + ); + } + + if (role === 'host' && room.status === 'hosting') { + return ( + { + void room.leave(); + onLeave(); + }} + /> + ); + } + + if (role === 'scanner' && (room.status === 'connected' || room.status === 'joining')) { + return ( + { + void room.leave(); + onLeave(); + }} + me={me} + /> + ); + } + + return null; +} diff --git a/apps/eventfloor/src/flows/StaffFlow.tsx b/apps/eventfloor/src/flows/StaffFlow.tsx new file mode 100644 index 0000000..862a6a7 --- /dev/null +++ b/apps/eventfloor/src/flows/StaffFlow.tsx @@ -0,0 +1,160 @@ +import { useMeshRelay, useNearbyRoom } from '@offline-app-examples/mesh'; +import React, { useEffect, useRef, useState } from 'react'; +import { + newAlertId, + parseStaffMessage, + type StaffAlert, + type StaffSession, +} from '../domain/staff'; +import { RelayScreen } from '../ui/RelayScreen'; +import { StaffReceiverScreen } from '../ui/StaffReceiverScreen'; +import { StaffSenderScreen } from '../ui/StaffSenderScreen'; + +const APP_ID = 'eventfloor'; + +export type StaffRole = 'sender' | 'receiver' | 'relay'; + +export function StaffFlow({ + role, + session, + displayName, + onLeave, +}: { + role: StaffRole; + session: StaffSession | null; + displayName: string; + onLeave: () => void; +}) { + const [alerts, setAlerts] = useState([]); + const [ackedIds, setAckedIds] = useState>(new Set()); + const sessionRef = useRef(session); + sessionRef.current = session; + + const relay = useMeshRelay(APP_ID); + + const room = useNearbyRoom({ + appId: APP_ID, + group: true, + onMessage: (_from, data) => { + const msg = parseStaffMessage(data); + if (!msg) return; + if (msg.type === 'staff_alert') { + setAlerts((prev) => { + if (prev.some((a) => a.alertId === msg.alertId)) return prev; + return [...prev, msg]; + }); + } else if (msg.type === 'staff_ack') { + setAckedIds((prev) => new Set(prev).add(msg.alertId)); + } + }, + }); + + const me = { id: room.localId || relay.localId || 'me', name: displayName || 'Staff' }; + + useEffect(() => { + if (role === 'relay') { + void relay.start(displayName || 'Crowd relay'); + return () => { + void relay.leave(); + }; + } + if (role === 'sender') { + void room.host(`${session?.displayName ?? 'Staff'} · dispatch`); + } else if (role === 'receiver') { + void room.discover(); + } + return () => { + void room.leave(); + }; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [role]); + + useEffect(() => { + if (role !== 'receiver' || room.status !== 'discovering') return; + const host = room.hosts[0]; + if (host) void room.join(host.id, session?.displayName ?? 'Staff'); + }, [role, room.status, room.hosts, session, room]); + + function sendAlert(section: string, body: string) { + const staff = sessionRef.current; + if (!staff || room.role !== 'host') return; + const alert: StaffAlert = { + type: 'staff_alert', + alertId: newAlertId(), + body: body.slice(0, 240), + section, + senderStaffId: staff.staffId, + senderName: staff.displayName, + senderUnit: staff.unit, + createdAt: Date.now(), + }; + setAlerts((prev) => [...prev, alert]); + room.broadcast(alert).catch((e) => console.warn('staff broadcast failed', e)); + } + + function ackAlert(alert: StaffAlert) { + const staff = sessionRef.current; + if (!staff) return; + const ack = { + type: 'staff_ack' as const, + alertId: alert.alertId, + ackStaffId: staff.staffId, + ackName: staff.displayName, + at: Date.now(), + }; + setAckedIds((prev) => new Set(prev).add(alert.alertId)); + const target = room.role === 'member' ? room.hostId : null; + if (target) room.send(target, ack).catch(() => room.broadcast(ack)); + else room.broadcast(ack).catch((e) => console.warn('ack failed', e)); + } + + if (role === 'relay') { + return ( + { + void relay.leave(); + onLeave(); + }} + /> + ); + } + + if (role === 'sender' && session && room.status === 'hosting') { + return ( + { + void room.leave(); + onLeave(); + }} + /> + ); + } + + if (role === 'receiver' && session && (room.status === 'connected' || room.status === 'hosting')) { + return ( + { + void room.leave(); + onLeave(); + }} + /> + ); + } + + return null; +} diff --git a/apps/eventfloor/src/services/persist.ts b/apps/eventfloor/src/services/persist.ts new file mode 100644 index 0000000..83e2018 --- /dev/null +++ b/apps/eventfloor/src/services/persist.ts @@ -0,0 +1,57 @@ +import AsyncStorage from '@react-native-async-storage/async-storage'; +import type { HostState, ScannerState } from '../domain/admission'; +import { emptyHost, emptyScanner } from '../domain/admission'; + +const KEY = '@eventfloor/persist/v1'; + +export type Persisted = { + host?: HostState; + scanner?: ScannerState; + platformStoredScanIds?: string[]; +}; + +export async function loadPersisted(): Promise { + try { + const raw = await AsyncStorage.getItem(KEY); + if (!raw) return {}; + return (JSON.parse(raw) as Persisted) ?? {}; + } catch { + return {}; + } +} + +export async function savePersisted(data: Persisted): Promise { + try { + await AsyncStorage.setItem(KEY, JSON.stringify(data)); + } catch (e) { + console.warn('[eventfloor] persist failed', e); + } +} + +export function sanitizeHost(state: unknown): HostState { + if (!state || typeof state !== 'object') return emptyHost(); + const s = state as HostState; + if (!Array.isArray(s.admissions) || !Array.isArray(s.syncedScanIds)) return emptyHost(); + return { + rev: typeof s.rev === 'number' ? s.rev : 0, + admissions: s.admissions, + syncedScanIds: s.syncedScanIds, + platformDuplicatesDropped: + typeof s.platformDuplicatesDropped === 'number' ? s.platformDuplicatesDropped : 0, + }; +} + +export function sanitizeScanner(state: unknown): ScannerState { + if (!state || typeof state !== 'object') return emptyScanner(); + const s = state as ScannerState; + if (!Array.isArray(s.admissions) || !Array.isArray(s.pendingScanIds)) return emptyScanner(); + return { + rev: typeof s.rev === 'number' ? s.rev : -1, + admissions: s.admissions, + syncedScanIds: Array.isArray(s.syncedScanIds) ? s.syncedScanIds : [], + platformDuplicatesDropped: + typeof s.platformDuplicatesDropped === 'number' ? s.platformDuplicatesDropped : 0, + pendingScanIds: s.pendingScanIds, + lastResult: s.lastResult ?? null, + }; +} diff --git a/apps/eventfloor/src/ui/HostGateScreen.tsx b/apps/eventfloor/src/ui/HostGateScreen.tsx new file mode 100644 index 0000000..23833f0 --- /dev/null +++ b/apps/eventfloor/src/ui/HostGateScreen.tsx @@ -0,0 +1,66 @@ +import { Button, Text } from '@offline-app-examples/ui'; +import React from 'react'; +import { FlatList, View } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import type { AdmissionRecord, HostState } from '../domain/admission'; +import { DebugStrip, TopBar, useNow } from './common'; + +export function HostGateScreen({ + gateName, + host, + platformTotal, + people, + onSyncPlatform, + onLeave, +}: { + gateName: string; + host: HostState; + platformTotal: number; + people: { id: string; name: string }[]; + onSyncPlatform: () => void; + onLeave: () => void; +}) { + const now = useNow(); + const me = { id: 'host', name: gateName }; + + return ( + + + a.scanId} + ListHeaderComponent={ + + + Authoritative admission ledger for this event. Other scanners receive snapshots over + Bluetooth mesh. + + + + } + renderItem={({ item }: { item: AdmissionRecord }) => ( + + {item.ticketId} + + {item.holder} · {item.section} · {item.gateName} + + + {item.scanId} · {Math.round((now - item.scannedAt) / 1000)}s ago + + + )} + /> + + + ); +} diff --git a/apps/eventfloor/src/ui/RelayScreen.tsx b/apps/eventfloor/src/ui/RelayScreen.tsx new file mode 100644 index 0000000..895e899 --- /dev/null +++ b/apps/eventfloor/src/ui/RelayScreen.tsx @@ -0,0 +1,37 @@ +import { Text } from '@offline-app-examples/ui'; +import React from 'react'; +import { View } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { DebugStrip, TopBar } from './common'; + +export function RelayScreen({ + relayName, + neighbors, + me, + hint, + onLeave, +}: { + relayName: string; + neighbors: number; + me: { id: string; name: string }; + hint: string; + onLeave: () => void; +}) { + return ( + + + + Relay active + {hint} + + {neighbors} BLE neighbor{neighbors === 1 ? '' : 's'} + + + Payload bodies are not shown — encrypted staff or gate traffic forwards at the mesh layer + only. + + + + + ); +} diff --git a/apps/eventfloor/src/ui/ScannerGateScreen.tsx b/apps/eventfloor/src/ui/ScannerGateScreen.tsx new file mode 100644 index 0000000..9f54941 --- /dev/null +++ b/apps/eventfloor/src/ui/ScannerGateScreen.tsx @@ -0,0 +1,88 @@ +import { Button, Text } from '@offline-app-examples/ui'; +import React from 'react'; +import { Pressable, ScrollView, View } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import type { ScannerState } from '../domain/admission'; +import { SEEDED_TICKETS } from '../domain/tickets'; +import { DebugStrip, TopBar } from './common'; + +export function ScannerGateScreen({ + gateName, + scanner, + people, + onScan, + onLeave, + me, +}: { + gateName: string; + scanner: ScannerState; + people: { id: string; name: string }[]; + onScan: (ticketId: string) => void; + onLeave: () => void; + me: { id: string; name: string }; +}) { + const result = scanner.lastResult; + + return ( + + + + + Scan a seeded ticket id. Admissions sync from the lead scanner over Bluetooth mesh — no + cellular required at the gate. + + {result ? ( + + + {result.outcome.replace('_', ' ')} + + {result.outcome === 'admitted' || result.outcome === 'already_used' ? ( + + {result.record.ticketId} · {result.record.gateName} + + ) : result.outcome === 'unknown_ticket' ? ( + {result.ticketId} + ) : ( + {result.reason} + )} + + ) : null} + + Seeded tickets + + + {SEEDED_TICKETS.map((t) => ( + onScan(t.ticketId)} + className="border-foreground rounded-xl border-2 px-4 py-3" + > + {t.ticketId} + + {t.holder} · Section {t.section} + + + ))} + + + + + + ); +} diff --git a/apps/eventfloor/src/ui/StaffReceiverScreen.tsx b/apps/eventfloor/src/ui/StaffReceiverScreen.tsx new file mode 100644 index 0000000..cefafb6 --- /dev/null +++ b/apps/eventfloor/src/ui/StaffReceiverScreen.tsx @@ -0,0 +1,74 @@ +import { Button, Text } from '@offline-app-examples/ui'; +import React from 'react'; +import { FlatList, View } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import type { StaffAlert, StaffSession } from '../domain/staff'; +import { DebugStrip, TopBar, useNow } from './common'; + +export function StaffReceiverScreen({ + session, + me, + people, + alerts, + ackedIds, + onAck, + onLeave, +}: { + session: StaffSession; + me: { id: string; name: string }; + people: { id: string; name: string }[]; + alerts: StaffAlert[]; + ackedIds: Set; + onAck: (alert: StaffAlert) => void; + onLeave: () => void; +}) { + const now = useNow(); + + return ( + + + a.alertId} + ListHeaderComponent={ + + + Encrypted staff alerts appear here when cell is saturated. Tap Ack when your unit is + responding. + + {alerts.length === 0 ? ( + No alerts yet. + ) : null} + + } + renderItem={({ item }) => { + const acked = ackedIds.has(item.alertId); + return ( + + {item.section} + {item.body} + + From {item.senderName} ({item.senderUnit}) · {Math.round((now - item.createdAt) / 1000)}s ago + + + + ); + }} + /> + !ackedIds.has(a.alertId)).length}`, + ]} + /> + + ); +} diff --git a/apps/eventfloor/src/ui/StaffSenderScreen.tsx b/apps/eventfloor/src/ui/StaffSenderScreen.tsx new file mode 100644 index 0000000..9a13e29 --- /dev/null +++ b/apps/eventfloor/src/ui/StaffSenderScreen.tsx @@ -0,0 +1,87 @@ +import { Button, Text } from '@offline-app-examples/ui'; +import React, { useState } from 'react'; +import { Pressable, ScrollView, View } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { STAFF_SECTIONS, type StaffAlert, type StaffSession } from '../domain/staff'; +import { DebugStrip, TopBar } from './common'; + +export function StaffSenderScreen({ + session, + me, + people, + alerts, + onSend, + onLeave, +}: { + session: StaffSession; + me: { id: string; name: string }; + people: { id: string; name: string }[]; + alerts: StaffAlert[]; + onSend: (section: string, body: string) => void; + onLeave: () => void; +}) { + const [section, setSection] = useState(STAFF_SECTIONS[1]); + const [body, setBody] = useState('Medic needed — guest assist'); + + return ( + + + + + MLS-encrypted staff channel over Bluetooth mesh. Crowd relay phones forward traffic but + cannot read staff payloads. + + + Section + + + {STAFF_SECTIONS.map((s) => ( + setSection(s)} + className={`rounded-lg border-2 px-3 py-2 ${section === s ? 'border-foreground bg-muted' : 'border-muted'}`} + > + {s} + + ))} + + + Alert + + {['Medic needed — guest assist', 'Security backup', 'Crowd surge — need ushers'].map( + (preset) => ( + setBody(preset)} + className={`mb-2 rounded-lg border-2 px-3 py-2 ${body === preset ? 'border-foreground bg-muted' : 'border-muted'}`} + > + {preset} + + ), + )} + + {alerts.length > 0 ? ( + + + Sent + + {alerts.slice(-3).reverse().map((a) => ( + + {a.section}: {a.body} + + ))} + + ) : null} + + + + ); +} diff --git a/apps/eventfloor/src/ui/common.tsx b/apps/eventfloor/src/ui/common.tsx new file mode 100644 index 0000000..eed50c3 --- /dev/null +++ b/apps/eventfloor/src/ui/common.tsx @@ -0,0 +1,64 @@ +import { Button, cn, Icon, PersonAvatar, Text } from '@offline-app-examples/ui'; +import { LogOut } from 'lucide-react-native'; +import React, { useEffect, useState } from 'react'; +import { View } from 'react-native'; + +type Person = { id: string; name: string }; + +export function TopBar({ + eyebrow, + title, + people, + onLeave, +}: { + eyebrow: string; + title: string; + people: Person[]; + onLeave: () => void; +}) { + return ( + + + + {eyebrow} + + + {title} + + + p.name).join(', ')}> + {people.slice(0, 4).map((person, i) => ( + 0 && '-ml-2')} + /> + ))} + + + + ); +} + +export function DebugStrip({ lines }: { lines: string[] }) { + return ( + + + Presenter + + {lines.join(' · ')} + + ); +} + +export function useNow(ms = 15_000) { + const [now, setNow] = useState(Date.now); + useEffect(() => { + const id = setInterval(() => setNow(Date.now()), ms); + return () => clearInterval(id); + }, [ms]); + return now; +} diff --git a/apps/eventfloor/src/ui/illustrations.tsx b/apps/eventfloor/src/ui/illustrations.tsx new file mode 100644 index 0000000..5b54564 --- /dev/null +++ b/apps/eventfloor/src/ui/illustrations.tsx @@ -0,0 +1,13 @@ +import React from 'react'; +import Svg, { Circle, Path, Rect } from 'react-native-svg'; + +export function EventHero({ size = 160 }: { size?: number }) { + return ( + + + + + + + ); +} diff --git a/apps/eventfloor/tailwind.config.js b/apps/eventfloor/tailwind.config.js new file mode 100644 index 0000000..a76801d --- /dev/null +++ b/apps/eventfloor/tailwind.config.js @@ -0,0 +1,6 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + // Include the shared ui package so its component classes are generated. + content: ['./App.tsx', './src/**/*.{ts,tsx}', '../../packages/ui/src/**/*.{ts,tsx}'], + presets: [require('@offline-app-examples/ui/tailwind-preset')], +}; diff --git a/apps/eventfloor/tsconfig.json b/apps/eventfloor/tsconfig.json new file mode 100644 index 0000000..e56fffa --- /dev/null +++ b/apps/eventfloor/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "@react-native/typescript-config", + "compilerOptions": { + "skipLibCheck": true + }, + "include": [ + "**/*.ts", + "**/*.tsx", + "nativewind-env.d.ts" + ], + "exclude": [ + "**/node_modules", + "**/Pods" + ] +} \ No newline at end of file diff --git a/docs/DEMO_APPS_PLAN.md b/docs/DEMO_APPS_PLAN.md index 90a848d..e4949fe 100644 --- a/docs/DEMO_APPS_PLAN.md +++ b/docs/DEMO_APPS_PLAN.md @@ -36,7 +36,7 @@ Planning only — no app scaffolds until implementation starts. 1. **OutageNet** — handoff, accept, outbox, idempotent mock HQ (template for sync honesty) 2. **YardGate** — MeshServices + gate role + relay phone *(shipped: `apps/yardgate`)* -3. **Event Floor** — single events demo app: Flow A (staff) + Flow B (gate); see `docs/EVENT_FLOOR_DEMO_PLAN.md`; **demo GIF per flow** +3. **Event Floor** — single events demo app: Flow A (staff) + Flow B (gate); see `docs/EVENT_FLOOR_DEMO_PLAN.md`; **demo GIF per flow** *(shipped: `apps/eventfloor` — add GIF assets for catalogue)* 4. **AgriMesh** — multi-hop batch carry (depends on comfort with group/relay from Event Floor Flow A) --- diff --git a/packages/mesh/src/index.ts b/packages/mesh/src/index.ts index feb7ca4..3800bbb 100644 --- a/packages/mesh/src/index.ts +++ b/packages/mesh/src/index.ts @@ -9,6 +9,8 @@ export { } from './hosts'; export { requestNearbyPermissions } from './permissions'; export { bluetoothMeshProtocolConfig, pause, poll, waitForBluetooth } from './runtime'; +export { useMeshRelay } from './useMeshRelay'; +export type { RelaySnapshot, RelayStatus } from './relaySession'; // For group mode: replicated documents live in the room's MLS group (space id = groupId). export { DataStore } from '@offline-protocol/mesh-sdk'; diff --git a/packages/mesh/src/relaySession.ts b/packages/mesh/src/relaySession.ts new file mode 100644 index 0000000..4d30358 --- /dev/null +++ b/packages/mesh/src/relaySession.ts @@ -0,0 +1,124 @@ +import { cleanName } from './hosts'; +import { requestNearbyPermissions } from './permissions'; +import { bluetoothMeshProtocolConfig, pause, poll, waitForBluetooth } from './runtime'; +import OfflineProtocol, { type ProtocolEvent } from '@offline-protocol/mesh-sdk'; + +export type RelayStatus = 'idle' | 'starting' | 'active' | 'error'; + +export type RelaySnapshot = { + status: RelayStatus; + error: string; + localId: string; + displayName: string; + neighborCount: number; +}; + +export type RelayCallbacks = { + onProtocolEvent?: (event: ProtocolEvent) => void; +}; + +const RELAY_HOPS = 3; +const errorMessage = (error: unknown) => (error instanceof Error ? error.message : String(error)); + +const IDLE: RelaySnapshot = { + status: 'idle', + error: '', + localId: '', + displayName: '', + neighborCount: 0, +}; + +/** Bluetooth mesh relay only — forwards traffic, no app room or service registration. */ +export class MeshRelaySession { + private snapshot: RelaySnapshot = { ...IDLE }; + private listeners = new Set<() => void>(); + private protocol: OfflineProtocol | null = null; + private generation = 0; + private stopping: Promise = Promise.resolve(); + private neighbors = new Set(); + + constructor( + private readonly appId: string, + private getCallbacks: () => RelayCallbacks, + ) {} + + subscribe = (listener: () => void) => { + this.listeners.add(listener); + return () => this.listeners.delete(listener); + }; + + getSnapshot = (): RelaySnapshot => this.snapshot; + + start = async (displayName: string): Promise => { + if (this.snapshot.status !== 'idle' && this.snapshot.status !== 'error') return; + const label = cleanName(displayName, 'Relay'); + this.update({ ...IDLE, status: 'starting', displayName: label }); + const generation = ++this.generation; + await this.stopping; + this.neighbors.clear(); + try { + await requestNearbyPermissions(); + if (generation !== this.generation) return; + const p = new OfflineProtocol(bluetoothMeshProtocolConfig(this.appId, RELAY_HOPS)); + p.on('all', this.onEvent); + this.protocol = p; + await p.start(); + await pause(500); + if (!(await p.isMlsInitialized())) await p.initializeMlsWithSecureStorage(); + const localId = await poll(() => p.localAddress(), 15_000); + if (!localId) throw new Error('Mesh identity is not ready. Close and reopen the app.'); + if (!(await waitForBluetooth(p))) { + throw new Error('Turn on Bluetooth and allow access in Settings, then try again.'); + } + if (generation !== this.generation) return; + this.update({ localId, status: 'active' }); + } catch (error) { + if (generation === this.generation) this.fail(error); + } + }; + + leave = async (): Promise => { + this.stop(); + this.update({ ...IDLE }); + await this.stopping; + }; + + private fail(error: unknown) { + if (__DEV__) console.warn(`[${this.appId}:relay]`, errorMessage(error)); + this.stop(); + this.update({ ...IDLE, status: 'error', error: errorMessage(error) }); + } + + private stop() { + const p = this.protocol; + this.protocol = null; + ++this.generation; + this.stopping = (async () => { + if (p) await p.stop().catch(() => {}); + })(); + } + + private onEvent = (event: ProtocolEvent) => { + if (!this.protocol) return; + this.getCallbacks().onProtocolEvent?.(event); + switch (event.type) { + case 'identity_ready': + if (event.address) this.update({ localId: event.address }); + break; + case 'neighbor_discovered': + if (event.transport.toLowerCase() !== 'ble') return; + this.neighbors.add(event.peer_id); + this.update({ neighborCount: this.neighbors.size }); + break; + case 'neighbor_lost': + this.neighbors.delete(event.peer_id); + this.update({ neighborCount: this.neighbors.size }); + break; + } + }; + + private update(patch: Partial) { + this.snapshot = { ...this.snapshot, ...patch }; + this.listeners.forEach((listener) => listener()); + } +} diff --git a/packages/mesh/src/useMeshRelay.ts b/packages/mesh/src/useMeshRelay.ts new file mode 100644 index 0000000..be00f17 --- /dev/null +++ b/packages/mesh/src/useMeshRelay.ts @@ -0,0 +1,23 @@ +import { useEffect, useRef, useState, useSyncExternalStore } from 'react'; +import { MeshRelaySession, type RelayCallbacks } from './relaySession'; + +export function useMeshRelay(appId: string, callbacks: RelayCallbacks = {}) { + const latest = useRef(callbacks); + latest.current = callbacks; + const [session] = useState(() => new MeshRelaySession(appId, () => latest.current)); + + useEffect( + () => () => { + void session.leave(); + }, + [session], + ); + + const state = useSyncExternalStore(session.subscribe, session.getSnapshot); + + return { + ...state, + start: session.start, + leave: session.leave, + }; +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2945b60..3742bba 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -323,6 +323,121 @@ importers: specifier: ^5.8.3 version: 5.9.3 + apps/eventfloor: + dependencies: + '@offline-app-examples/mesh': + specifier: workspace:* + version: link:../../packages/mesh + '@offline-app-examples/ui': + specifier: workspace:* + version: link:../../packages/ui + '@offline-protocol/mesh-sdk': + specifier: ^0.27.0 + version: 0.27.0(react-native@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(@react-native-community/cli@20.1.0(supports-color@8.1.1)(typescript@5.9.3))(@react-native/jest-preset@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(react@19.2.3)(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.3.0)(react@19.2.3)(supports-color@8.1.1))(react@19.2.3) + '@react-native-async-storage/async-storage': + specifier: ^2.2.0 + version: 2.2.0(react-native@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(@react-native-community/cli@20.1.0(supports-color@8.1.1)(typescript@5.9.3))(@react-native/jest-preset@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(react@19.2.3)(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.3.0)(react@19.2.3)(supports-color@8.1.1)) + lucide-react-native: + specifier: ^1.48.0 + version: 1.48.0(react-native-svg@15.15.5(react-native@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(@react-native-community/cli@20.1.0(supports-color@8.1.1)(typescript@5.9.3))(@react-native/jest-preset@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(react@19.2.3)(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.3.0)(react@19.2.3)(supports-color@8.1.1))(react@19.2.3))(react-native@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(@react-native-community/cli@20.1.0(supports-color@8.1.1)(typescript@5.9.3))(@react-native/jest-preset@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(react@19.2.3)(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.3.0)(react@19.2.3)(supports-color@8.1.1))(react@19.2.3) + nativewind: + specifier: ^4.2.7 + version: 4.2.7(6af35d6757d3fd7944cdf994ae66f9a7) + react: + specifier: 19.2.3 + version: 19.2.3 + react-native: + specifier: 0.85.2 + version: 0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(@react-native-community/cli@20.1.0(supports-color@8.1.1)(typescript@5.9.3))(@react-native/jest-preset@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(react@19.2.3)(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.3.0)(react@19.2.3)(supports-color@8.1.1) + react-native-css-interop: + specifier: ^0.2.7 + version: 0.2.7(6af35d6757d3fd7944cdf994ae66f9a7) + react-native-reanimated: + specifier: ~4.6.0 + version: 4.6.0(46d81d4174c4966f579d17df97e5129d) + react-native-safe-area-context: + specifier: ^5.5.2 + version: 5.9.1(react-native@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(@react-native-community/cli@20.1.0(supports-color@8.1.1)(typescript@5.9.3))(@react-native/jest-preset@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(react@19.2.3)(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.3.0)(react@19.2.3)(supports-color@8.1.1))(react@19.2.3) + react-native-svg: + specifier: ^15.15.5 + version: 15.15.5(react-native@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(@react-native-community/cli@20.1.0(supports-color@8.1.1)(typescript@5.9.3))(@react-native/jest-preset@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(react@19.2.3)(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.3.0)(react@19.2.3)(supports-color@8.1.1))(react@19.2.3) + react-native-worklets: + specifier: ~0.12.2 + version: 0.12.2(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(react-native@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(@react-native-community/cli@20.1.0(supports-color@8.1.1)(typescript@5.9.3))(@react-native/jest-preset@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(react@19.2.3)(supports-color@8.1.1))(@react-native/metro-config@0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.3.0)(react@19.2.3)(supports-color@8.1.1))(react@19.2.3)(supports-color@8.1.1) + devDependencies: + '@babel/core': + specifier: ^7.25.2 + version: 7.29.7(supports-color@8.1.1) + '@babel/plugin-transform-react-jsx': + specifier: ^7.27.1 + version: 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/preset-env': + specifier: ^7.25.3 + version: 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/runtime': + specifier: ^7.25.0 + version: 7.29.7 + '@jest/globals': + specifier: ^29.6.3 + version: 29.7.0(supports-color@8.1.1) + '@react-native-community/cli': + specifier: 20.1.0 + version: 20.1.0(supports-color@8.1.1)(typescript@5.9.3) + '@react-native-community/cli-platform-android': + specifier: 20.1.0 + version: 20.1.0 + '@react-native-community/cli-platform-ios': + specifier: 20.1.0 + version: 20.1.0 + '@react-native/babel-preset': + specifier: 0.85.2 + version: 0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@react-native/codegen': + specifier: 0.85.2 + version: 0.85.2(@babel/core@7.29.7(supports-color@8.1.1)) + '@react-native/eslint-config': + specifier: 0.85.2 + version: 0.85.2(eslint@8.57.1(supports-color@8.1.1))(jest@29.7.0(@types/node@26.5.1)(supports-color@8.1.1))(prettier@3.9.6)(supports-color@8.1.1)(typescript@5.9.3) + '@react-native/gradle-plugin': + specifier: 0.85.2 + version: 0.85.2 + '@react-native/jest-preset': + specifier: 0.85.2 + version: 0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(react@19.2.3)(supports-color@8.1.1) + '@react-native/metro-config': + specifier: 0.85.2 + version: 0.85.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@react-native/typescript-config': + specifier: 0.85.2 + version: 0.85.2 + '@types/react': + specifier: ^19.2.0 + version: 19.3.0 + babel-jest: + specifier: ^29.6.3 + version: 29.7.0(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + eslint: + specifier: ^8.19.0 + version: 8.57.1(supports-color@8.1.1) + hermes-compiler: + specifier: 250829098.0.10 + version: 250829098.0.10 + jest: + specifier: ^29.6.3 + version: 29.7.0(@types/node@26.5.1)(supports-color@8.1.1) + prettier: + specifier: ^3.9.6 + version: 3.9.6 + react-test-renderer: + specifier: 19.2.3 + version: 19.2.3(react@19.2.3) + tailwindcss: + specifier: ^3.4.19 + version: 3.4.19(yaml@2.9.1) + typescript: + specifier: ^5.8.3 + version: 5.9.3 + apps/orderup: dependencies: '@offline-app-examples/mesh':