Logistics Operations and Output Flow
Connected lookup, reservation, Excel, and label output across web and mobile-device boundaries.
- Scope
New build and output integration
Operations / WebView and Android output
- Technology stack
Web
- React
- TypeScript
- Vite
- React Router
- TanStack Query
- Zustand
- XLSX
- Vitest
Mobile
- Expo
- React Native
- Expo Router
- WebView
- Android native module
- TypeScript
- Bluetooth
Problem
Reservation intake, batch work, Excel preview, and output belonged to one workflow, but desktop browsers and mobile devices lived in separate apps and repositories with different runtime constraints. Web loading cost and Android permission, Bluetooth, and printer-SDK behavior needed separate boundaries while sharing request data and failure criteria.
Key decision
The web app owned lookup, reservation, Excel, output-request state, and initial loading, while mobile owned permissions, Bluetooth, and printer output after the WebView contract.
Web
2026.04 ~ 2026.06
Logistics Operations Web
The work connected API integration, responsive UI, spreadsheet handling, and print paths under the same operational baseline.
Mobile
2026.04 ~ 2026.06
Mobile Output Bridge App
The app kept the business screen in WebView while moving device-specific output responsibilities into a native module boundary.
Verified outcome
Verified web entry cost and mobile output completion against separate runtime and validation criteria.
Logistics Operations Web
- web initial JS entry
- 2,405.50 β 616.59 kB
- About 74% lower after route and spreadsheet lazy loading
- web gzip size
- 815.10 β 204.38 kB
- About 75% lower for the same initial entry
Mobile Output Bridge App
- mobile output check
- Android 16 / API 36
- Permissions, Bluetooth connection, and physical label output checked
Working principle
Even one user journey needs separate completion criteria for browser performance and physical-device output.
Implementation and verification details
Presented a React operations web app and a mobile output app from separate repositories as one user workflow while keeping screen-state and device-SDK responsibilities distinct.
Web
Logistics Operations Web
Problem
Bundling initial screens with spreadsheet handling made the first load heavy, while mixing desktop and WebView print paths made verification unclear.
Decision
- Separated data integration, UI state, and print-request boundaries before adding more screens.
- Moved non-initial routes and spreadsheet processing to runtime-loaded paths.
- Treated desktop print, mobile browser fallback, and WebView/native output as separate flows.
Solution
- Built the main workflows on a shared shell, table, modal, form, and feedback structure.
- Connected reservation intake, bulk handling, contact selection, Excel preview, and print payload conversion.
- Applied route-level lazy loading and spreadsheet-library lazy loading from bundle analysis.
Execution
- Connected lookup, reservation, contact, spreadsheet, and print flows inside the same shell first.
- Separated mock data from the API adapter so UI state and integration state could be checked independently.
- Split print verification across formatter, preview, browser fallback, and native request paths.
- A deeper app, auth, public-API, and UI split reached 500.67 kB (164.69 kB gzip), but was rejected because added auth/API initialization and first-click loading boundaries outweighed the gain.
- The accepted lazy-loading scope was checked across 116 files and 573 tests; the physical PC label path was checked separately across 8 files and 73 tests.
Impact
- Initial JS entry
- ~74% lower
- non-initial routes and spreadsheet handling were split out
- gzip size
- ~75% lower
- same-baseline first-load reduction
- Responsive checks
- mobile to desktop
- mobile, tablet, and desktop width baseline
Checks
- Checked overflow, modal clipping, and dropdown placement across key viewport widths.
- Checked formatter, bitmap, command, and browser fallback paths as print regressions.
- Re-ran lint, test, build, and bundle analysis to separate accepted optimization from experiments.
Mobile
Mobile Output Bridge App
Problem
Sending a print/output request from a web button is different from making the physical mobile device complete it. WebView, permission, native module, and device state needed separate failure boundaries.
Decision
- Kept the business screen in the web layer and moved device-facing output into the native module.
- Handled WebView bridge requests and native responses as structured contracts.
- Separated development and production URLs, app identifiers, and install artifacts.
Solution
- Organized the request/response path between the WebView bridge and Android native module.
- Separated payload conversion, device-state checks, and failure messaging.
- Kept mobile browser fallback distinct from app WebView output.
Execution
- Defined the boundary that converts web output data into a native output payload.
- Checked Bluetooth permission, device lookup, connection state, and output command stages.
- Separated local development, test install, and production install conditions.
- Traced the SDK's internal device-discovery call on Android 16/API 36 and added cancellation plus BLUETOOTH_SCAN and BLUETOOTH_CONNECT handling.
- Treated command-queue acceptance and completed physical output as separate verification points.
Impact
- output boundary
- WebView -> native
- web payload separated from device output commands
- device output
- real device check
- verified against Android device behavior, not only emulator flow
Checks
- Checked permission, device connection, and output request flows on an Android device.
- Checked that WebView bridge requests and native output responses stayed separated.
- Checked development and production install baselines.