Repository navigation
OpenTea DX-OS v1.13.0
A cooperative manager gets a chart dashboard over the core's data and sensor readings, and three client apps join the repository: the multi-role Flutter app hub-mobile and the staff management pair staff-desktop and staff-mobile.
Added
-
App
hub-mobile(apps/hub-mobile): one Flutter (Dart) app for Android, iOS and the web demo with roles chosen from the token claims after sign-in: guest, customer, farmer, HTX manager (officer read-only) and tour guide (guide, a staff account of an HTX). Tours belong to the HTX: the manager creates and edits tours (with a briefing for the guides), adds or removes guides, reads the member list of each tour and checks groups in; a guide sees only the tours an HTX assigned, with the HTX that assigned it, the schedule (Lộ trình), the itinerary, the groups with phone numbers and a check-in; a customer's ticket shows the guides of the tour. Guest browses news, tours and products; customer books tours, buys products, pays by VietQR, and keeps orders and tickets on the device (open offline). Leaf diagnosis sends a photo (gallery or live camera) to the web classifier with the app token. AI assistant pages per role (market, technical, shop, tour topics) with a local keyword answerer for guests and the webPOST /api/chatbotstream for signed-in users. Reels: short videos with a For-you and Following feed, hearts, comments, share and follow, posted from the phone gallery (own videos on a page opened from the + button of Reels). Runs on a mockHubRepositoryand a demoAuthServiceor, with an issuer configured, on Keycloak OIDC PKCE (clientdxos-mobile) and the web API throughHttpHubRepository; storefront, tours and Reels still use sample data. No Google Play services, Firebase, Maps or analytics. Build:apps/hub-mobile/tool/build.sh. Not yet built as a release APK or run on iOS, and the VietQR code has not been scanned by a real banking app. Seeapps/hub-mobile/README.md. -
Staff management clients (
apps/staff-desktop,apps/staff-mobile): Tea Staff Manager, a C# .NET 10 WPF app (MVVM) where the HTX owner manages employee records, teams, task assignment, a monthly timesheet, leave approval and payroll (prorated monthly salary or daily wage, overtime, allowance, bonus, compulsory insurance, advances; Draft, Approved, Paid), and Tea Work, a Kotlin Jetpack Compose app (MVVM) where staff accept and report tasks, check in and out, request leave and read payslips. The desktop app serves the phones over a small REST API (docs/mobile-api.md), stores data in SQLite or in the core schemaapp_staff_work(every table hashtx_code), and signs in with a local owner account or the shared Keycloak account (realmagrimarket, rolemanager). Both followDESIGN.md. Tests: xUnit for payroll and the task state machine, a Robolectric walkthrough of every mobile screen and an API contract test between the two apps. -
Staff apps 1.1 (
apps/staff-desktop,apps/staff-mobile): leave requests carry evidence (photo or PDF, checked by content, required for sick leave of two days or more); a Reports page with KPI tiles and charts and a Kanban board for tasks; toasts, sound and red counters on the desktop when staff act on their phones; phone connection self-test, one-click firewall rule and a DX-OS core connection check in Settings; quiet 30-second refresh and an offline-demo banner on the phone. -
Keycloak client
dxos-mobile: a public PKCE client (S256; no password grant, no service account) for mobile apps, with the same scopes and roles asnextjs-weband the redirect URIs of the Android tour app and of the Flutter hub-mobile app (docker/keycloak/realm-agrimarket.json).make mobile-clientadds it to a running realm and does nothing if it exists. Covered byplatform/tests/test_realm_policy.py. -
View
telemetry.sensor_daily(platform/postgres/init/07-telemetry-views.sql): read-only daily summary oftelemetry.sensor_readingsper (htx_code,parcel_code,sensor, Vietnam day) withreading_count,min_value,max_value,avg_value,first_ts,last_ts. Tracked in Hasura astelemetry_sensor_dailywith the samehtx_codefilter as the raw table formanagerandofficer;farmerhas no access. Covered byplatform/tests/smoke-dataops.sh. -
Mini-app
htx-dashboard("Bảng điều hành HTX", 0.1.0): a read-only overall view of a cooperative for its manager, with no database of its own. Tổng quan lists what needs attention (journals waiting more than 3 days, disease reports waiting, sensors silent for 6 hours, harvests due or overdue, failed transfers to the cold store) over a strip of figures, a grid of parcels, journals per week, lots and the newest tea prices; the tabs Sản xuất, Vùng trồng, Sức khoẻ cây, Lô chè and Dữ liệu have a CSV file and a print page; each parcel has a page with the newest reading and the daily chart of each sensor, the crop round, weather, journal, disease reports and lots. Every figure is read from the core through Hasura with the viewer's own token, so a manager sees only their cooperative. Lists ask for at most 5,000 rows and say when cut; sensor charts cover at most 30 days. Requires core 1.13.0. Covered by the app's pytest suite, a block ofmake apps-smoke(every tab against the real core, the figures of seeded readings, the gateway's refusal of other roles, the view's permissions asked from Hasura), a browser story and the screens at 1280 and 390 px in light and dark.
Changed
make platform-smokegives 131 PASS (was 124): five checks for the daily view and two for theofficerrole. The daily-view readings are dated yesterday and today instead of March 2026, so the lifecycle job cannot archive them between the insert and the query.- Web package version
1.13.0. htx-dashboard0.2.0, a chart dashboard: the app draws its figures as charts instead of tiles, with a server-side SVG toolkit of its own (line and area, stacked and grouped columns, donut, sparkline, gauge, ring, calendar and matrix heatmaps, funnel, timeline, scatter) and one palette for both themes. The overview has a KPI strip with the change against the previous period, cooperative-wide sensor charts, a sensor freshness matrix and a harvest timeline; every other tab gains charts of its own. A rejected disease report is no longer listed as a kind of disease. Still no JavaScript and no new dependency. Upgrade an installed copy with./dxos upgrade miniapps/htx-dashboard; a preview with sample data runs withpython tests/preview.pyin the app's folder.
Upgrade notes
make platform-up, thenmake web-up: the first creates the viewtelemetry.sensor_dailyand restarts Hasura so it loads the new metadata; the second rebuilds the web app at1.13.0. No data migration../dxos install miniapps/htx-dashboard(or install "Bảng điều hành HTX" from the App Store with a worker running). A copy of 0.1.0 installed frommainbefore this release is replaced with./dxos upgrade miniapps/htx-dashboard.- A realm that already exists gets the mobile client with
make mobile-client; a new realm has it from the realm file. apps/hub-mobile,apps/staff-desktopandapps/staff-mobileare built from source with their own toolchains (Flutter, .NET, Gradle); see the README of each. The release workflow does not publish them as images.
Known limits
htx-dashboardshows the core's data only: figures of other mini-apps and of the staff apps are not included. Its charts are drawn on the server, so they do not update while the page is open. Sensor charts cover at most the 30 days the hot store keeps. Rainfall is shown as the average of a day's readings.- The staff apps keep their data in a schema of their own and are not installed through
./dxos. - What
hub-mobilereads from a real server and what it still shows from sample data is listed inapps/hub-mobile/README.md. - The browser checks of
app-kit.spec.tscan fail on a frame that is still navigating (issue #44); a failedPlatform Smoke Testjob on that spec is re-run.
Container images
ghcr.io/maiychrus25/opentea-dx-os-web:1.13.0ghcr.io/maiychrus25/opentea-dx-os-api:1.13.0ghcr.io/maiychrus25/opentea-dx-os-postgres:1.13.0ghcr.io/maiychrus25/opentea-dx-os-scanner:1.13.0ghcr.io/maiychrus25/opentea-dx-os-migrate:1.13.0ghcr.io/maiychrus25/opentea-dx-os-dataops:1.13.0
Deploy
Download opentea-dx-os-1.13.0.tar.gz, verify it with SHA256SUMS, then follow the
release deployment guide (6-step order: postgres, platform-init, migrate, platform-init again, rest, then --profile tools run --rm ollama-init to pull the pinned LLM model).
Set DXOS_MQTT_DEVICES and DXOS_MQTT_INGEST_PASSWORD in docker/.env.local first: the broker refuses to start while any MQTT password begins with change_me.
Also set MINIO_ACCESS_KEY, MINIO_SECRET_KEY (SeaweedFS refuses placeholders), KEYCLOAK_ADMIN and KEYCLOAK_ADMIN_PASSWORD, and run every command as docker compose --env-file docker/.env.local -f docker/docker-compose.yml -f docker/docker-compose.release.yml ..., otherwise Compose ignores those values.