All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased#
[1.17.0] - 2026-11-27#
The agentic layer is complete. Agents now hand work to staff, plan the season, and can run approved kinds of work on their own inside hard limits, with a stop button and a full audit trail. A manager can ask for a new mini-app in chat and an AI builds it behind seven gates. Everything a role can do on the web can now be done through the Telegram bot: in chat, by voice, or in the Mini App.
Added#
- Agentic layer milestone M10: staff tasks (
platform/agent,apps/web,apps/staff-desktop): - 05:50 tasks. Agent A8 proposes up to 10 staff tasks from the work approved in the last 24 hours: picking after an approved harvest, a disease inspection, watering when the soil is dry. It suggests the person with the fewest open tasks and uses no model.
- Hand-over. An approved task waits as "Đã gửi app nhân sự". The staff app pulls it every minute, creates the task and reports its id back.
- Head count. The staff app reports who is present today, and the daily campaign uses that number for its people limit.
- One client per cooperative.
./dxos staff enable <HTX>creates the client and prints what to enter in the staff app. Staff desktop 1.4.0. - Agentic layer milestone M6: Telegram Mini App (
apps/web,platform/telegram): Mở ứng dụng. The bot's menu button opens the web inside Telegram when the web has an HTTPS address (DXOS_WEB_PUBLIC_URL). Without HTTPS the button is not set and chat works as before.- Sign-in. A person signs in with Keycloak inside Telegram once. The web then ties the Telegram account to the session only when
initDatahas a valid signature, is under 24 hours old and names the linked account. - Buttons in chat.
Sửaon a farmer's journal card opens the form already filled in, andMở chi tiếtopens a high-risk proposal. - Agentic layer milestone M12: autonomous mode (
apps/web,platform/agent,platform/telegram): - Off by default. A manager turns it on in the AI settings after signing in again within 5 minutes and accepting responsibility. The screen shown at that moment is stored in the audit log.
- Veto window. An eligible proposal is scheduled, then runs after a wait by risk: the next cycle for low, 15 minutes for medium, 2 hours for high. Anyone who could decide it can press
Chặnmeanwhile. - Same checks. The web runs the proposal through the same use case as a human approval, under the name of the person who turned the mode on, with the channel
autopilot. - Stops.
/dungon Telegram orDừng ngayon the web stops it. It also stops by itself when the enabler loses the manager role, when no manager has interacted for 7 days, or when a brake trips (3 failed runs in an hour, the daily cap, more than 30% blocked, or 3 times the usual number of proposals). - Shadow runs. In normal mode every proposal records whether it would have run, and the enable screen shows the 30-day match rate of each kind.
- Farmers. A message sent by an automatic run says "(Tin do AI của HTX gửi)", and a household gets at most 2 automatic messages a day.
- Agentic layer milestone M9: mini-app actions (
platform/cli,platform/agent,apps/web,miniapps/tea-shop): agentblock inapp.yaml. A mini-app declares a suggestions path and up to 10 actions.dxos validatechecks the block.- Suggestions become proposals. The agent asks each enabled app every 30 minutes and files its suggestions as
app.<app>.<action>proposals, decided like every other kind. - Execution. The web calls the app through the internal gateway with the client
dxos-apps-actorand three headers naming the approver. The gateway strips those headers on every other route. tea-shoppromotions. The shop suggests a promotion for stock of 20 packs or more unsold for 21 days.promotion.createinvolves money, so it runs on its own only when unlocked, after a 2-hour window.- Agentic layer milestone M11: season plan (
platform/agent,apps/web): - Quarterly draft. Agent A11 drafts the quarter's plan on its first day at 06:15. Targets follow fixed rules against the same quarter last year; the model only writes priorities.
- Adoption. A manager adopts it with
strategy.adopt. The daily campaign then puts work that serves a target first, and the Monday report compares real figures with last year. - Low targets. A plan with a target below last year carries a warning and never runs on its own.
- Agentic layer milestone M13: mini-app factory (
platform/builder,platform/agent,apps/web,platform/cli): - Request. A manager asks in chat ("cần app …") or at
/manager/ai/apps. Agent A12 picks the cheapest answer: enable an existing app, draft a book in Sổ tự tạo, or ask up to 5 questions and write a spec for the manager to approve. - Build.
./dxos builderbuilds from the approved spec in single-use containers. The build container sees only its workspace, reaches the network through an allowlist proxy and holds no core secret. The gate container has no network. - Seven gates. Manifest, markup (no script, no inline style), kit, tests, dependencies, files, and a trial run with screenshots. An app gets at most 3 repair rounds.
- Install. A passing app is tagged in its own git repository, listed in the store as "App do AI xây" for the requesting cooperative only, and installed after the manager approves
miniapp.install. It runs on a private network that reaches only the gateway and the database. - Agentic layer milestone M15: voice messages (
platform/telegram,apps/web, new servicedxos-stt): - On the cooperative's server. A voice message of up to 60 seconds is turned into text by whisper.cpp (
make up-voice). The audio stays in memory and is dropped once the text exists. - Confirm first. The bot answers "Em nghe được: “…”" with
Đúng,SửaandHuỷ. OnlyĐúngsends the sentence on, as if typed, so a write still needs its confirmation card. - Model choice.
make stt-measuremeasures the word error rate of each model on the cooperative's own recordings. - The rest of the Telegram chat operations (
apps/web,platform/telegram, Keycloak, gateway, #80): - Every in-chat row is served. Ten more read tools (search, certificate, soil, photo, households, members, disease reports, profile, documents, partners) and sixteen more actions with a confirmation card. Deletes, announcements, member approval and QR export take two cards. Inviting a member stays in the app, because it makes an account with a password.
- Disease photo in chat. A farmer picks a parcel and sends a photo. The web calls the disease API with the token of its own client
dxos-web-service, on a route that exists only on the internal gateway port. An officer still confirms the result. Nghe. The bulletin has aNghebutton: the web reads it with Piper and the relay sends the audio fileban-tin.wav.- Captions and photos. A photo's caption is read as text. The photos of cancelled, replaced or expired cards are deleted.
Changed#
./dxos telegram enablenow also creates the clientdxos-web-serviceand writes its secret, next to the Mini App key, into the web'sroles.env../dxos telegram disableremoves them.
Fixed#
- A farmer with no household (
apps/web).GET /api/journalanswers an empty list for a farmer whose account has no household, instead of every entry the role can read. - Tests on the real clock (
apps/web). Proposal fixtures no longer expire on a fixed date, which made the unit tests fail from 2026-11-27. - Throwaway test databases (
platform/cli). The CLI tests remove their Postgres container with its volume, so a test run no longer leaves a volume behind.
[1.16.0] - 2026-11-26#
The agentic layer starts to plan and learn. Every morning an agent turns the open proposals into one daily campaign that a manager approves with one button. Every Monday another agent looks at how the agents did and proposes improvements, which are measured again weeks later. Outside AI clients can now connect through MCP with a person's own account, the public lot page shows when an AI decision is verified in the audit chain, and a public benchmark compares models on the agents' scenarios.
Added#
- Agentic layer milestone M7: daily campaign (
platform/agent,apps/web): - 06:00 campaign. At 06:00 agent A9 groups the cooperative's open proposals into one campaign of at most 15 actions, each with a measurable goal.
- Fixed rules order the items and drop conflicts: no harvest on a parcel still in its withdrawal period, no spraying before rain, and no more work than the people available.
- The model only writes the summary.
- Deciding. Managers receive the campaign on Telegram (
Duyệt cả chiến dịch,Xem từng mục,Bỏ chiến dịch, and/chiendich) and in a new "Chiến dịch hôm nay" panel above the AI inbox.- Approving the whole campaign runs every item the approver may decide.
- High-risk items still wait for their own confirmation, and items for another role are forwarded.
- 18:00 report. The report shows target against actual for each goal.
- Schedule. The harvest and disease agents now run at 05:30 and 05:40, so their warnings are ready before 06:00.
- Agentic layer milestone M8: weekly improvements and the AI tab (
platform/agent,apps/web,miniapps/htx-dashboard, Hasura): - Weekly rules. Every Monday agent A10 looks for:
- a warning that managers keep rejecting;
- journal entries returned for missing information;
- slow decisions;
- campaign goals that keep slipping.
- Proposals. It proposes at most five improvements as ordinary proposals:
agent.settings.updatechanges a threshold within fixed ranges, marking whether it tightens or loosens;improvement.adoptcovers a process note or a Monday reminder.
- Measurement. Adopted improvements are measured again after two and four weeks, and the Monday report says whether they helped.
- AI tab.
htx-dashboard0.3.0 adds an AI tab with each agent's approval rate, waiting time, failures and cost, read with the manager's own rights. - Agentic layer milestone M14: MCP, lot verification and the public benchmark (
apps/web,platform/mcp,platform/agent, Keycloak, gateway): - MCP. A person can connect any MCP client with their own Keycloak account, through the device-login bridge
platform/mcp/dxos_mcp.pyand the new clientdxos-mcp.- The client gets the assistant's read tools and one write tool, which creates a proposal that a person still has to approve.
- Lot verification. The public lot page shows "AI đề xuất,
đã duyệt ngày …, kiểm chứng trong sổ audit" only when the decision is in an intact audit chain with a matching evidence hash. It never shows a name. - Benchmark.
make benchmarkruns every agent scenario suite with a chosen model, and the results are published indocs/benchmark.md.
Fixed#
- Proposal deletes in a campaign (
platform/postgres). Deleting a proposal also removes it from campaign items, so cleanup and retention jobs no longer fail on proposals that a campaign listed.
[1.15.0] - 2026-11-26#
The agentic layer goes to work in the field and in the chat. Four new agents watch sensors and weather, disease reports, harvest readiness and the market, and propose warnings, inspections, harvest approvals and a bulletin that a person approves. The Telegram bot becomes an assistant: farmers, officers and managers ask questions, share a location, and record a journal entry with a photo from the chat, with a confirmation card before anything is written.
Added#
-
Agentic layer milestone M4: field, disease, harvest and bulletin agents (
platform/agent,apps/web, Hasura): four agents per cooperative propose, and a person approves on the web or in Telegram.field-watch(every 30 minutes) warns officers about a sensor silent for 6 hours and households about dry soil, heat, frost and heavy rain forecast after a recent spraying.disease-watch(daily and on new reports) asks officers to inspect when 3 reports of one disease fall within 2 km in 7 days, and warns the households around them.harvest-ready(each morning) proposes approving the harvest of parcels past their withdrawal period and due for picking.bulletin(each morning) writes a market bulletin for the cooperative with the provider chosen in the settings. Messages to households use fixed templates with typed slots: an agent cannot add text of its own, and only the approver can add a note (spec test 32). A warning that was approved or rejected is not proposed again within 24 hours. Bulletins gain a status and a cooperative, and readers show only published ones. Thresholds are per-cooperative settings, with defaults indocs/rules-and-limits.md§3.10. -
Agentic layer milestone M5: Telegram chat assistant (
apps/web,platform/agent,platform/telegram): a linked farmer, officer or manager now uses the bot as an assistant in a private chat. A button menu by role and typed commands (/menu,/nhatky,/cho,/tomtat,/hoi,/huy) open 11 read tools (today, pending approvals, weather, market, bulletin, notifications, journal, harvest schedule, parcels, lots, and the nearest parcel from a shared location); answers come from the web's own use cases with the asker's scope, so a farmer sees only their household, and each answer names its source. Writes go through a confirmation card that expires after 10 minutes: a farmer records a journal entry with a photo using only Telegram, an officer or manager approves the pending journal backlog, and a harvest approval takes two cards. Nothing is written without Confirm. Free sentences the web's keyword router cannot place go to the new agent A7, which picks a tool or action with the cooperative's provider; the model sees only the sentence and the list of tools, never business data. The relay forwards photos and locations, each user may send 60 messages an hour, and every web route is classified for Telegram in one table checked by a test (spec test 17). Sending a disease photo from chat, the read-aloud button and the remaining chat operations follow in #80.
Fixed#
- Random sign-outs right after sign-in (
apps/web, #75): the session no longer keeps the Keycloak id token, so it fits in one cookie (3593 characters for the CI user, under the 3936 Auth.js chunk size). With two cookies, responses arriving a few milliseconds apart could leave the browser with mismatched halves and the next requests sent the user to the login page. Sign-out ends the Keycloak session with a back-channel logout using the refresh token. Sessions made before this change drop the id token on their next request.
[1.14.0] - 2026-11-25#
The agentic layer arrives. One AI agent per cooperative reviews pending journal entries and proposes; a manager or officer approves on the web or from Telegram, and every step is in the audit chain. A cooperative can switch an agent to Claude or OpenAI within a monthly budget, with personal data masked first. Staff work gains automation and AI-ranked suggestions, and a sensor station simulator joins the repository.
Added#
- Agentic layer milestone M3: external LLM providers (
platform/agent,apps/web,docker): a manager can switch each agent of the cooperative (A1 journal review, A6 digest) from the local Ollama to Claude (Anthropic) or OpenAI on a new settings page (/manager/ai/settings, read only for officers), with a confirmation that lists what leaves the server; only providers whose key the agent container holds are offered, and every change is audited. The agent calls both APIs over plain HTTP from the standard library, masks phone numbers, e-mails and identity numbers before any external call, and falls back to Ollama, then to the rules, on any failure (cut network, 5xx, timeout, refusal, malformed output; a 429 pauses the provider for at least 60 s). Runs report provider, model, tokens and estimated cost; a run that called an external provider writes oneagent.external_callaudit event without content. A monthly budget per cooperative warns the managers at 80% and stops external calls at 100% until the Vietnam month ends (Telegram message once per threshold and month, banner in the inbox). A6 sends the daily report at the cooperative's report time. The keys (ANTHROPIC_API_KEY,OPENAI_API_KEY, optionalDXOS_ANTHROPIC_MODEL,DXOS_OPENAI_MODEL) reach onlydxos-agent; a test-only LLM stub (profilellm-test) andplatform/tests/smoke-llm.shcover the path in CI. - Agentic layer milestone M2: Telegram (
platform/telegram,apps/web,platform/agent,workflows):dxos-telegramrelays Telegram updates to the web and sends what the web queues (long polling, no public address needed; idle when no bot token is set). People link their account from their profile page with a one-time code (/start <code>,/stop); a manager can link the cooperative's group for reports. Proposals reach linked approvers with Approve and Reject buttons signed by the web (callback_dataHMAC, private chats only, roles re-checked with Keycloak at the moment of the tap); a rejection asks for a reason; every message of a proposal is edited to show who decided. The agent posts daily (18:00) and weekly (Monday 07:00) figures that the web renders and sends; health alerts cover stale agent or relay heartbeats, repeated agent failures and n8n failures, recorded by the newworkflows/system-error-alert.json(set aserrorWorkflowof every workflow). New:./dxos telegram enable|disable, realm roletelegram, tables inplatform/postgres/init/09-telegram.sql, a stub Bot API andplatform/tests/smoke-telegram.sh. SetTELEGRAM_BOT_TOKEN,TELEGRAM_BOT_USERNAMEand, for a release,DXOS_TELEGRAM_CALLBACK_KEYindocker/.env.local. - Tea IoT Station (
apps/tea-iot): a WPF sensor station simulator for tea hills that publishes soil moisture, soil and air temperature, air humidity and rainfall to the core broker (htx/<HTX>/plot/<parcel>/<sensor>, QoS 1, store and forward while offline), with drought, heavy rain, frost and faulty-sensor scenarios. Field alerts (dry soil, frost, heat) become task suggestions in Tea Staff Manager.apps/tea-iot/docker/mqtt-port.override.ymlpublishes the broker on 127.0.0.1 for local development. - Tea Staff Manager 1.3.0: Automation page (recurring work, cover for rejected work and approved leave, forgotten check-outs, overdue warnings, draft payroll), an explainable ranking of who fits a task shown with its facts,
POST /api/iot/alerts, and Tea Work sign-in with the shared Keycloak account. Tea Work 1.2.0 documents the shared account on its sign-in screen. - Agentic layer milestone M1c (
platform/agent, APISIX,docker/docker-compose.yml): implemented stdlib-onlydxos-agentruntime modules: cross-language canonical JSON + SHA-256evidence.py, schema-validated LLM provider abstraction with 1-retry JSON repair (ReplayProviderandOllamaProviderwith>= 60sHTTP 429 backoff over dedicated APISIX route/api/internal/agent/llm/v1/chat/completions), Keycloak/Hasura/internal-API client, Agent A1journal-reviewwith deterministic farming hard rules (WITHDRAWAL_PERIOD,MISSING_INFO,DOSAGE,INCONSISTENT), prompt-injection resistance, rule-based fallback on LLM outage, andplatform/agent/tests/scenarios/a1_journal_review.jsonscenario tests. - Agentic layer milestone M1b (
dxos, Keycloak, Hasura, APISIX,apps/web): added realm roleagentand./dxos agent enable|disable <HTX>to provision/revoke per-cooperative Keycloak client-credentials clients (dxos-agent-<htx>with mode-600 runtime env files), read-only zero-PII Hasuraagentpermissions across cooperative tables, internal-only APISIX:9081route/api/internal/agent/*injectingX-Dxos-Gatewayafter claim validation, RS256 JWKS verification + internal run/proposal ingestion routes inapps/web, Jest unit/route tests, andplatform/tests/smoke-agent.shboundary smoke checks. - Agentic layer milestone M1a (
apps/web,platform/postgres/init/08-agent.sql): addedplatform.agent_runs,platform.agent_proposals(withagent_proposals_one_openpartial unique index), andplatform.agent_settingswith row-level audit triggers; typed action catalogue (journal.approve,journal.reject), canonical evidence hashing, proposal creation and single-execution claim/decision use cases with audit trail, HTTP routes (/api/agent/proposals,/api/agent/proposals/[id]/decision,/api/journal/[id]/review),journal_entries.review_notemigration, and theProposalInboxUI at/manager/aiand/officer/ai. - Agentic layer milestone M0 skeletons (
platform/agent,platform/telegram): stdlib-only heartbeat skeleton containers (dxos-agent,dxos-telegram) added todocker/docker-compose.yml,docker/docker-compose.release.yml,Makefile(make up-agent,stop-extras,platform-up), CI unit test jobs, and release/edge image matrices. They start and report health without running agents or connecting to Telegram yet. - Architecture Decision Records: ADR 0003 (agentic layer with human approval and trust-zone separation) and ADR 0004 (optional external LLM providers with local-first fallback).
- Mini-app
hub-mobile(miniapps/hub-mobile): a card in the app store and an open page (/public/<htxCode>) with the download link of the Android APK and the steps to add the web build to an iPhone home screen. Links come fromHUB_APK_URLandHUB_WEB_URL; the app stores and reads nothing. The 67 MB APK itself is not in the repository.
Changed#
- Web package version
1.14.0. - Agent credentials (
./dxos agent enable|disable,docker/docker-compose.yml): the per-cooperative credentials now live in thedxos-agent-envvolume, written by a short-lived root helper that receives them on stdin and stores them as uid 10001, so the agent can read them on Linux. Upgrade note: run./dxos agent enable <HTX>once for every cooperative that had the agent enabled; the old files underdocker/runtime/<project>/agent/are no longer read.enablenow refuses a cooperative that does not exist. - Agent evidence version 2 (
apps/web,platform/agent): proposals carry every column the rules read (journal entry, its activities and the crop cycles compared), hashed with one canonical JSON shared by TypeScript and Python (platform/agent/tests/fixtures/evidence-vectors.json). Open proposals made with version 1 answer stale on decision. - Agent schedule (
platform/agent): journal review runs on the first cycle, when the pending entries change, or hourly between 06:00 and 20:00 Vietnam time; an empty queue no longer writes a run row. Out-of-range dosage and a missing withdrawal period now ask for a correction (REQUEST_CHANGES) instead of a rejection. Thresholds are documented indocs/rules-and-limits.md§3.8. - Proposal dedupe (
apps/web,08-agent.sql): duplicates are judged by the journal entries a proposal acts on (subject_ids), not by the key the agent sends. - Release override: the web and APISIX refuse to start when
DXOS_INTERNAL_GATEWAY_SECRETis missing or still the public development value. docs/rules-and-limits.md: amended §1.1 (AI Principle Invariant) and §1.2 (MNM Invariant) per milestone M0 to permit typed catalogue action proposals (with human approval in normal mode, or manager-enabled bounded autonomous mode) and optional per-cooperative external LLM providers while keeping local Ollama as the zero-key default.
Fixed#
- Telegram messages for proposals, reports and alerts (
PrismaTelegramRepository): the link and outbox column lists were plain strings inside$queryRawtemplates, so Prisma sent them as a bound value; recipients came back without a chat id and queuing a message failed. They are SQL fragments now, checked by a unit test and against a real Postgres. - Mosquitto restart loop: on kernels with
fs.protected_regular(including WSL 2) a restarted broker container failed with "can't create /tmp/mosquitto.passwd: Permission denied"; the entrypoint now removes the old password file first. - The PostgreSQL scripts of the staff app (
apps/staff-desktop/database/postgres) were hidden by the root*.sqlignore rule. - Withdrawal checks fail closed (
approve-harvest,CreateLotUseCase, lot trace, farmer dashboard): spraying recorded in a rejected, returned or pending journal entry still blocks harvest approval, lot creation and QR export; only drafts are ignored. Without this, rejecting a journal through the new review flow would have hidden a real spray from the withdrawal period. - Agent A1 withdrawal rule: compares Vietnam calendar days (a harvest on the spraying day is a violation, a harvest on the safe day is allowed) instead of UTC timestamps; the invented 7-day minimum is removed; Vietnamese numbers such as "1.200 ml" and "0,5 kg" are read correctly.
- Agent tokens limited to their routes (APISIX): tokens of the
agentrole are refused on the workflow, disease and chat LLM routes; the internal agent route is rate-limited per token. - Proposal creation checks: evidence values must match their hashes, referenced rows must belong to the caller's cooperative, at most 50 rows, known agent names only, bounded body size.
- Journal review races: review and batch approval change only entries that are still pending and record the reviewer; a returned or rejected entry can be edited and goes back to pending.
- Agent containers:
dxos-agentanddxos-telegramrun read-only, without capabilities, with process and CPU limits;08-agent.sqlis mounted for fresh databases. -
Agent resilience: provider failures of any kind fall back to rule-only reasons, HTTP 429 no longer blocks the agent loop, and one malformed credentials file or journal entry no longer stops the others.
-
Journal reject/request-changes flow (
officer-journal-approval.tsx,POST /api/journal/[id]/review): officer "Từ chối" / "Yêu cầu sửa" actions previously posted ignoredisApproved/rejectionReasonfields to/api/journal/batch-approveand approved the entry; they now invoke the dedicated review endpoint, recordreview_note, and keep rejected entries out ofAPPROVED.
Upgrade notes#
- Set
DXOS_INTERNAL_GATEWAY_SECRETandDXOS_TELEGRAM_CALLBACK_KEYindocker/.env.localto long random values. With the release override the web does not start while either is missing or still the development value, and APISIX does not start without the first. make platform-up, thenmake web-up: the first creates the agent and Telegram tables (08-agent.sql,09-telegram.sql), applies the database migrations and startsdxos-agentanddxos-telegram; the second rebuilds the web app at1.14.0. No data migration.- AI layer:
./dxos agent enable <HTX>for each cooperative that should get it; the running agent picks it up on its next cycle, and the command creates the realm roleagentwhen it is missing (on a smaller stack,make up-agentstarts the agent). A cooperative enabled frommainbefore this release runsenableonce more: the credentials moved to thedxos-agent-envvolume. - Telegram (optional): set
TELEGRAM_BOT_TOKENandTELEGRAM_BOT_USERNAMEfrom BotFather, run./dxos telegram enable, then link a phone from the profile page. - External LLM providers (optional): set
ANTHROPIC_API_KEY(andDXOS_ANTHROPIC_MODELto change the defaultclaude-haiku-5-5) orOPENAI_API_KEYwithDXOS_OPENAI_MODEL, restartdxos-agent, then choose the provider for an agent on/manager/ai/settings. Without a key everything runs on Ollama as before. - n8n: import the workflows again (
n8n import:workflow, seedocs/dev-setup.md); every workflow now namesworkflows/system-error-alert.jsonas its error workflow, so failures reach managers. - Withdrawal checks now count every journal entry that is not a draft: a harvest or a lot that passed before because the spraying entry was rejected, returned or pending is blocked until the withdrawal period ends. Open AI proposals made before the upgrade answer stale when decided.
- Tea Staff Manager's shared sign-in needs a Keycloak client created by hand: see
apps/staff-desktop/docs/core-integration.md.
Known limits#
- The withdrawal checks read at most 100 journal entries of a parcel (issue #67).
- A farmer cannot yet edit a returned journal entry from the web form (issue #68).
- Telegram delivery is at least once: a message can arrive twice if the relay stops between Telegram's answer and reporting it.
- With an external provider, names a farmer writes inside a note are not masked; the confirmation on the settings page says so. Costs are estimated from a small price table in code; a model not in the table counts as 0.
- 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.
1.13.0 - 2026-11-22#
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#
-
Project site (
site/, published with GitHub Pages by.github/workflows/pages.yml): a static, dependency-free landing page in Vietnamese (/) and English (/en/) with real screenshots from the mini-apps and staff apps, a three-tier diagram, light and dark themes, and the known limits from this changelog.scripts/build-site.shassembles the publishable folder with the screenshots taken from their repository paths. Self-hosted Be Vietnam Pro (OFL-1.1) is listed in DEPENDENCIES.md. -
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.
1.12.0 - 2026-11-14#
The v1.11.0 tag has no GitHub Release, images or bundle: its release run failed twice on a race in a browser test (the test typed into a frame that was still navigating), fixed here. v1.12.0 contains everything in 1.11.0.
Added#
-
Manifest
feed(platform/apps/manifest.schema.json,dxos validate): an app may name a protected path that returns, for the calling user, a JSON list of sub-apps (entriesand an optionalcreatelink). The web menu shows them after the app's own items in each role's sidebar, and the App Store shows a section "Ứng dụng do HTX tự tạo". The web validates the feed (30 entries, label 60, path^/[a-z0-9_-]+(/[a-z0-9_-]+)*$, icon allowlist, 64 KB, 1.5 s, cached 15 s) and a broken feed leaves the menu intact.GET /api/app-storegainscreated. The icon map moved tolib/apps/app-icons.tsx. Seedocs/miniapps.md. -
Mini-app
custom-books("Sổ tự tạo", 0.1.0): the HTX manager designs record-keeping books without code. Eight templates (picking attendance, spraying, fertilising, cashbook, meeting minutes, supply hand-over, pest tracking, visitors) and a blank book; a form-based designer (name, description, menu icon, fields of eight types, which fields show in the list or are summed, access of officers and farmers: none, view, own rows, all rows; optional approval of each row); preview, publish, archive and publish again. Each published book appears in the menu of the roles allowed to use it and in the App Store section "Ứng dụng do HTX tự tạo", with a form, a filtered list with search and paging, a summary with totals and charts, a CSV download and a print page. With approval on, a row waits for the manager, who approves or rejects it on a page with a reason; the author corrects a rejected row, an approved row is locked, and the summary counts approved rows only. A user at level "own" never reads another user's row (list, edit, CSV, print, summary). Requires core 1.12.0. - Smaller dev stack:
make up-core(postgres, keycloak, hasura, apisix, web) and one target per optional group (up-docs,up-sensors,up-ai,up-voice,up-workflow,up-chat) start only their own containers;make stop-extrasstops (never removes) every optional container.make upandmake platform-upare unchanged. See the README. - Designer table (
dxos-app.css): aform-tablemodifier gives the input columns of a table of inputs a share of its width, the name column the largest (about 230 px at 1280 px), and the table stays inside its card with any system font. - Tests: the app smoke installs
custom-books, drives a book from the picking template through publish, feed per role, rows at level own, rejection, approval, CSV, print, archive and purge; a browser story installs it from the App Store, designs and publishes a book, checks that the officer and farmer menus gain the entry on their own, a farmer row at 390 px, approval, summary, CSV, print and archive, and that the shell still renders when the app is stopped; screens for the books list, template chooser, designer, list, summary, print and farmer list at 1280 and 390 px, light and dark.
Changed#
- Keycloak heap cap in the dev stack (
docker/docker-compose.yml):JAVA_OPTS_KC_HEAPdefaults to-Xms64m -Xmx512m(override withKEYCLOAK_HEAP_OPTS); Keycloak used about 1.1 GiB before and about 360 MiB after for the same activity. - The sidebar lights only the most specific menu item, so a feed entry no longer lights its app's own item as well.
Upgrade notes#
- The Keycloak cap applies when the keycloak container is next recreated (
make up-coreormake platform-upafter pulling); recreating it also restarts web. - Run
make platform-upandmake web-up(new menu feed, store section and designer CSS), then./dxos install miniapps/custom-booksor install "Sổ tự tạo" from the App Store (a worker must be running). No migration of existing apps; keep everydocker_*volume. ./dxos validatenow accepts thefeedkey; an app that declares it should require core>=1.12.0.
Known limits#
- No photo or file fields (mini-apps have no object storage access).
- No formulas or calculated fields: the summary only totals number and money fields.
- Approval is one step, by the manager.
- The designer is a form, not a drag-and-drop canvas; a field's type cannot change once the book has rows, and a choice field that has rows cannot lose options.
- A book's menu entry shows on the next page load, up to 15 seconds after publishing (the feed is cached 15 s per app, HTX and role, 5 s after a failure).
- The menu entry cap is 30 books per role; an HTX has at most 50 books; CSV and print hold at most 5000 rows.
- A second household field in one book shows "Nông hộ khác" for households a farmer may not see; only the first household field's name is stored.
1.11.0 - 2026-11-13#
Added#
- Shared mini-app kit (
platform/appkit/): CSS components indxos-app.css(header, tabs, stats, SVG bar chart, toolbar, pagination, cards, steps, empty state, field errors, disclosure, row actions, print sheet), Jinja macros (kit.html), Python helpers (appkit.py: paging, safe date and integer parameters,ILIKEescaping, Vietnamese money, number and date formats, CSV with BOM and formula escaping, chart widths) and a showcase page.make appkit-synccopies the two files into the four apps;make lintfails when a copy differs. - Mini-apps can offer downloads: the app frame sandbox gains
allow-downloadsand the proxy keeps acontent-dispositionheader when it starts withattachment. Scripts stay blocked and the CSP is unchanged. -
./dxos upgrade <dir>gives an installed mini-app new code in place: it validates the manifest, applies only pending migrations (same role and password), rewrites the route and compose file, rebuilds and restarts the container, then stores the newname,version,menuandmanifest. Enablements are never touched; a failed build or health check leaves the registry on the old version. The App Store card and detail showCó bản mớiwhen the running version differs from the catalogue. -
The four business apps rebuilt on the kit (version 0.2.0):
leaf-purchase(overview, ticket list with filters and search, print of a weighing slip and a payout sheet, CSV of tickets and payouts, month filter for farmers, inline field errors),tea-shop(overview with revenue chart and best sellers, order and product lists, delivery note, order CSV, tracking steps),farm-supply(overview, round list, item and household CSV, delivery sheet with a signature column, inline item errors, round cards for farmers) andtea-tour(overview, tour and booking lists, guest CSV, group list with check-in boxes, public cards). Status pills carry tones (amber waiting, red cancelled, grey closed). Existing paths, form fields, status codes and redirects are unchanged. - Tests: the app smoke checks a list, a CSV download (
text/csv, attachment, BOM) and a print page for each app, wildcard and out-of-range page values, role refusals on exports, and./dxos upgrade(installed app: exit 0, version, same enablement rows, still answering; not installed: refused). A new browser story (app-kit.spec.ts) writes sample data through each app and checks tabs, a second page, CSV download inside the frame, the print page in the top window and the way back, inline errors and the stored theme; screens cover the overview, one list and one print page of every app at 1280 and 390 px, light and dark. The five store screenshots are recaptured from the new pages (the tea-shop picture is nowmanager-orders.png).
Upgrade notes#
- Run
make platform-upandmake web-up(rebuilds the web image: newdxos-app.css,allow-downloadson the app frame, "Có bản mới" in the store), then./dxos upgrade miniapps/<id>for each installed app (leaf-purchase,tea-shop,farm-supply,tea-tour). Enablements are kept; until you upgrade, an installed app keeps its 0.1.0 code and pages. The newleaf-purchaseroute/overviewreaches an installed app only after its upgrade. Restart./dxos workerif one runs. - No database migration; keep every
docker_*volume.
Known limits#
- Search in the apps is accent-sensitive (
Nguyendoes not findNguyễn): the app roles cannot create theunaccentextension. - No notifications: nothing tells a manager that a new order or booking arrived; the overview shows the count when opened.
- Printing goes through the browser's own print command (Ctrl+P); the pages only prepare the sheet. No script may call
print(). - CSV files hold every row of the current filter, with no row cap.
farm-supplyprints inside asectionrather than on thebody, so its print page keeps the page background in dark mode.
Fixed#
- Flaky crash-recovery check in
make apps-smoke: the check of the leftover container and gateway route now waits (up to 60 s) for the worker to undo the half install, which it does after marking the request FAILED.
1.10.1 - 2026-11-13#
Added#
make web-upandmake gateway-up:web-uprebuilds or startswebanddisease-apion the generated route file (it replaces the hand-typeddocker compose upforweb, in the README,docs/miniapps.mdand CI);gateway-upputs the gateway back on that file after a hand-typed compose command recreated it on the base one.
Fixed#
./dxos installand./dxos workerrefuse to run while the gateway reads the base route file: after a hand-typeddocker compose upwithoutDXOS_GATEWAY_FILErecreated apisix, every mini-app route answered 404 and an install still ended "Đã cài". They now stop with a message namingmake gateway-up; the check never blocks when docker cannot be asked.
1.10.0 - 2026-11-13#
Added#
- App Store detail page (
/manager/app-store/<id>, web version 1.10.0): header with the Cài, Gỡ, Thử lại and Mở ứng dụng buttons, a step progress while an install runs (Đã gửi yêu cầu, Chuẩn bị, Dựng và khởi động, Đăng ký), a strip of screenshots that open at full size, the "Giới thiệu" text, a preview "Khi cài, ứng dụng sẽ" of what the install does for the HTX ("Ứng dụng đã thêm vào HTX" once the HTX uses the app), the data and personal data the app declares, version information, the full address of the app's public page with a "Chép địa chỉ" button, and the history of the app. - Richer store page: accent-insensitive search, filters by status and category, cards that link to the detail page, and a "Lịch sử" tab with the 50 newest install and removal requests of the HTX and the name of who asked. The history only holds requests of the caller's HTX.
- Optional
storeblock in the mini-app manifest (category, icon from an allowlist, about, data, personal data, core reads, up to 4 screenshots of at most 400 KB, PNG, WebP or JPEG detected from the first bytes). Text from a manifest is shown as plain text only../dxos validatealso checks the screenshot files (inside the app directory, size, type);catalog-syncstores the block (platform.app_catalog.store,requires_core,has_database) and the screenshots (platform.app_catalog_screenshots) in the platform database. - Install phases: while the worker installs an app it sets
platform.app_requests.phasetoprepare,buildandregisterthrough the new./dxos worker-progress, so the page can show the step; a failed install keeps the phase that failed. A hand./dxos installnever writes a request or a phase. - Store text and screenshots for the five apps:
leaf-purchase,tea-shop,farm-supply(two screenshots each),tea-tour(one) andhellocarry astoreblock in Vietnamese; the screenshots come from the real apps with sample data and are retaken withapps/web/tests/e2e/tools/store-screenshots.spec.ts(E2E_STORE_SHOTS=1). - Tests: the app smoke checks the synced store block, the phases seen during a queued install, the
buildphase of a failed install, that a hand install writes no request, and thatvalidaterefuses a text file declared as a screenshot; the App Store story now searches, opens the detail page, installs from it, opens the app and finds the history row; the screens add the history tab and the detail page at 1280 and 390 px, light and dark.
Upgrade notes#
make platform-upapplies the new columns and tables without recreatingpostgres(06-app-store.sqlis extended in place and stays idempotent). Keep everydocker_*volume.- Rebuild the web image (
make web-upfrom v1.10.1; before that the full command of the v1.8.0 note, withDXOS_GATEWAY_FILE) and restart./dxos worker, otherwise the page works but no install phase is reported. - Apps that carry a
storeblock declarerequires.core: ">=1.10.0"; app versions are unchanged.
Known limits#
- The declared data is not enforced: what an app says it stores or reads is the publisher's statement, shown as such; nothing checks it against the app's real behaviour.
- There is no update flow: an installed app is not upgraded from the store, and its version does not change for a metadata-only edit.
- The install steps show only what the worker reports (three phases); building and starting the container are one step.
1.9.0 - 2026-11-13#
Added#
- Optional
descriptionin the mini-app manifest (1-200 characters), shown by the upcoming app store;helloandtea-tournow declare one.docs/miniapps.mddocuments it and the rule that public pages live under/public/<htxCode>/...(from v1.9.0 the web proxy serves a public page only when that HTX has enabled the app). Web package version is now1.9.0 - App Store: install mini-apps per cooperative (the manifest
descriptionabove feeds it). A manager opens "Kho ứng dụng" (/manager/app-store) and installs or removes an app for their own HTX; the card shows Chưa cài, Đang cài…, Đã cài, Đang gỡ…, Lỗi (with Thử lại) or "Đã cài cho mọi HTX (quản trị máy chủ)", and polls every 3 s only while something is in progress, then refreshes the sidebar menu of the manager who pressed the button (other signed-in users of the HTX see the change at their next page load). A mini-app is now served, and listed in the menu, only to the HTXs that enabled it: the proxy answers 404 to any other HTX on protected and public paths, and a public page names its HTX in/public/<htxCode>/.... New tables in schemaplatform(platform/postgres/init/06-app-store.sql, applied byplatform-init):app_catalog(synced fromminiapps/*/app.yamlbymake platform-upand by the worker; an installed app keeps its card when its directory is gone),app_enablements(*means every HTX),app_requests(one open request per app and HTX, enforced by a unique index) andapp_worker(heartbeat); requests and enablements are audited../dxos workeris the host process that claims requests one at a time (ENABLEinstalls the app when needed,DISABLEremoves the container once no HTX is left, and keeps the data), takes a lock indocker/runtime/<project>/worker.lock, fails requests a crashed worker left running (undoing the half install) and logs one line per job; without it the page warns that requests wait for the administrator../dxos install <dir>is unchanged and enables the app for*. New API:GET /api/app-store,POST /api/app-store/requests(docs/api-contract.md) - Mini-app
leaf-purchase(Thu mua búp tươi): officers and managers write fresh-leaf weighing tickets (household, date, grade, kg with one decimal, price copied from the grade when written; money is integer VND shown as9.000 ₫) and can edit or void a ticket until its period closes; managers set the price per grade (/prices), close a payment period over a date range (/periods: every non-voided ticket in the range joins it and gets one payout per household) and mark each payout paid; a farmer sees their own tickets and payouts at/mine. The household lists come from Hasura with the caller's own token and role, so a farmer sees only their household. Periods of one HTX never overlap (checked in a transaction under an advisory lock, since the app role cannot createbtree_gist), and a ticket cannot be written or moved into a closed period's dates. Menu: "Thu mua búp tươi" (officer, manager), "Kỳ thanh toán" (manager), "Phiếu cân của tôi" (farmer). Schemaapp_leaf_purchase - Mini-app
tea-shop(Cửa hàng chè): managers list products (name, pack, price, stock, optional trace lot code) and process orders (Mới→Đã xác nhận→Đang giao→Hoàn tất, or cancel, which gives the stock back); guests order without an account at/apps/tea-shop/public/<htxCode>(cash on delivery), get an 8-character order code and look the order up with code and phone together. Stock is locked per order in a fixed product order, so concurrent orders never oversell and never deadlock; an order keeps the product name and price it was placed with; a manager's stock edit is an adjustment (+/-), never an overwrite. Personal data (name, phone, address, note) is shown only to the HTX's manager and never on a public page. Menu: "Cửa hàng chè" (manager). Schemaapp_tea_shop - Mini-app
farm-supply(Vật tư mua chung): managers open a group-buying round with a deadline and add items (name, unit, price) while it is open; each farmer registers quantities for their own household (the household comes from Hasura with the farmer's token, never from the form) until the round closes; closing creates one settlement per registered household, and the manager marks each delivered and paid and sees totals per item and per household. Menu: "Vật tư mua chung" (manager), "Đăng ký vật tư" (farmer). Schemaapp_farm_supply - Tests for the store and the three apps:
make apps-smokenow also installs, calls through the gateway (200 with the right role, 404 on the published port, the gateway's refusal for a wrong role, including/tickets/*and/periods/*ofleaf-purchase), reads the real Hasura household lists as officer, manager and farmer, makes one write per app (a ticket, a closed period and a payout, a public order, a registration) and purges each app; through the queue it enablestea-shopfor TC, checks that the web proxy answers 404 for LB when the web container runs, disables it, enables it again and checks that the product created before is still there. It refuses to start when one of the five apps is installed, and starts its own./dxos worker. Browser:tests/e2e/story/app-store.spec.ts(TC installs the shop from the page and seesĐang cài…thenĐã cài; LB does not see it and gets 404; a guest orders on a 390 px phone; the manager advances the order, presses Gỡ, installs again and finds the order) andbusiness-apps.spec.ts(the leaf-purchase and farm-supply stories);screens.spec.tsadds the store page and one screen per app and role at 1280 and 390 px, light and dark. CI runs the pytest suites of the three apps next totea-tour's and, inplatform-smoke, a./dxos workerfor the store stories
Upgrade notes#
- First
make platform-uprecreatespostgresonce: it mounts the newplatform/postgres/init/06-app-store.sql. The data indocker_pgdatais kept, andplatform-initcreates the store tables on the existing database. Never delete thedocker_*volumes - Apps installed before the upgrade stay enabled for every HTX: the
platform-initrun that createsplatform.app_enablementsenables each already-installed app for*once (enabled_by = 'dxos-upgrade'), so nothing disappears from the menu. Later runs never do it again: an installed app with no enablement is a valid state (every HTX turned it off) and is not handed back to everyone - Start
./dxos worker: the store only queues a request until a worker runs. Start it from the repo root (README, "Kho ứng dụng và./dxos worker", has a systemd unit); until it runs, the page warns "Trình cài đặt chưa chạy"../dxos installand./dxos removework without it - The web image must be rebuilt (
make web-upfrom v1.10.1; before that the full command of the v1.8.0 note, withDXOS_GATEWAY_FILE): the proxy, the menu and the store page readplatform.app_enablements; the package version is now1.9.0, which the new manifests require - Demo: build the images of the three new apps ahead (install each once, then
./dxos remove <id> --purge) and start the worker before the demo; the first Cài otherwise builds an image, which takes minutes
Known limits#
- Apps still trust each other (ruling R24, unchanged): enabling an app per HTX only decides who sees it; every installed app shares
dxos-apps-netand decodes the token without verifying it, so another installed app can read or change the data ofleaf-purchase,tea-shopandfarm-supply. Install only apps of this repository. Real per-app isolation is deferred - The worker is a host process, not a container (the web app must never hold the Docker socket): it must be started and kept alive by the operator, and one worker serves one compose project
- The farm-supply item form shows a rejected item (empty name, bad price) as a plain error page (heading and one message, no form and no link back; the browser's Back button returns to the round) instead of an inline error; nothing is stored
- The gateway can answer 503 for up to about 30 seconds after a core service restarts (for example Hasura): its DNS client caches the "name not found" answer it got while the service was down, and
apisix.dns_resolver_validonly shortens the cache of valid answers. Unchanged from earlier releases
1.8.1 - 2026-11-12#
The v1.8.0 tag has no GitHub Release, images or bundle: the release workflow's smoke gate failed on the flaky restart fixed below. v1.8.1 is the same product with that fix and is the first published build of the mini-app platform.
Fixed#
make platform-upno longer recreates containers whose build inputs did not change: BuildKit attached a provenance attestation with a new digest to every build, so rebuilding an unchanged image (up --build,run --build migrate, the web step) produced a new image ID and Compose recreatedagrimarket-postgres(and its dependents) under a running Keycloak. Keycloak then answered 500 on its next admin call, which failedmake apps-smokeon main and in the release gate (FAIL: keycloak admin PUT .../default-client-scopes/...,Error 22). The Makefile,./dxosand the CIplatform-smokejob now setBUILDX_NO_DEFAULT_ATTESTATIONS=1, so the same inputs give the same image ID. First-start behaviour is unchangedmake apps-smokewaits for Keycloak aftermake platform-up: it now asserts that the postgres container is the same one as before, then waits (bounded, 120 s for the admin API, 60 s for the user token) before using Keycloak, so a legitimate restart no longer fails the run. New helperkc_readyinplatform/tests/tokens.sh; no assertion was removed
1.8.0 - 2026-11-12#
Added#
- Mini-app manifest and
dxos validate: a mini-app is described byapp.yaml(apiVersion: dxos/v1), published as the JSON Schemaplatform/apps/manifest.schema.jsonwithadditionalProperties: falseeverywhere../dxos validate <dir>...refuses a manifest with a schema error, anidalready installed, a licence outside the CLI's OSI list, arequires.corethe core (versioninapps/web/package.json) does not satisfy, animagenot pinned by@sha256:digest, a route or menu path with..,//or characters outside[a-z0-9/_-], a role other thanfarmer,officerandmanager, a prefix listed as both public and protected, or a protected prefix nested under a public one (the web proxy would never send it a token). The developer guide isdocs/miniapps.md; the decision is recorded indocs/adr/0002-miniapp-architecture.md ./dxos install,removeandlist:./dxosat the repo root runs thedxos-clicontainer (profiletools, no host port, no docker socket) for the manifest, database, gateway, install journal and registry work, and starts or stops the app container itself withdocker compose. Install validates the manifest, prepares the database (when declared), writes the app's APISIX routes under/apps/<id>/and the app's compose file, starts the container withup -d --build --wait, then records the app inplatform.installed_apps(id, name, version, menu, manifest, install time; created byplatform-initfromplatform/postgres/init/05-apps.sql). A failure at any step, a failing health check, Ctrl-C or TERM undoes the earlier steps in reverse order from the journaldocker/runtime/<project>/apps/<id>.pending.json; installing an installed app only makes sure its container runs.remove <id>stops the container, removes the routes and the registry row and keeps the data;--purgealso drops it.listprints id, version, install time and container state. Protected routes useopenid-connectbearer_onlywith aclaim_schemacheck onrealm_access.roles; a token without one of the manifest's roles gets 401 from the gateway. The routes are merged with the trackedplatform/gateway/apisix.yamlintodocker/runtime/<project>/gateway/apisix.yaml, which APISIX reloads in place within about a second; with no app installed that file is identical to the base, and the tracked file is never modified.make platform-upandmake uprungateway-syncfirst, so installed apps keep their routes and containers across a restart. App routes match only on the gateway's internal listener9081(vars: [["server_port", "==", "9081"]]), so the published9080answers 404 under/apps/and every outside request goes through the web proxy;gateway-syncrefuses an app route without that condition- Hardened app containers: the generated compose file runs service
app-<id>as user10001:10001with a read-only root filesystem and a/tmptmpfs,cap_drop: [ALL],no-new-privileges, 256 MB of memory and 0.5 CPU, no host port, and only on the new networkdxos-apps-net. That network isinternal: true(no egress) and holds onlyapisixandpostgresbesides the apps. Every installed app shares it, so apps can reach each other (see Known limits). The manifest cannot change any of this - App database: for a manifest with
database.migrations, install creates the login role and schemaapp_<id>(-becomes_): no superuser, database, role, replication or RLS-bypass right,CONNECTION LIMIT 10, a random password sent to the server only as a SCRAM verifier, and rights on its own schema only. Migrations (*.sql, in file-name order, one transaction per file) run on a connection logged in as the app role withsearch_pathset to its schema, never on the superuser connection, and are recorded inapp_<id>.schema_migrations. Every app table must havehtx_code text NOT NULL, checked after each file and again from a fresh session. The app readsDXOS_APP_DB_URLfromdocker/runtime/<project>/apps/<id>.env(mode 600, git-ignored). A failed install drops a schema and role it created and keeps ones that existed before.--purgedrops the schema (refused, dropping nothing, when an object outside it depends on it), thenDROP OWNED BYand the role, and deletes the env file - Mini-app
hello: about 80 lines of standard-library Python with no database. It greets the user with the name, HTX and role from the token, on one menu item for every role, and its README is the walkthrough for a first mini-app - Mini-app web proxy:
/apps/<id>/...on the web app forwards to installed mini-apps through the gateway, only for ids inplatform.installed_apps(read on every request, so a removed app answers 404 at once, and 503 when the list cannot be read). Protected paths get the user's access token and answer 401 with a sign-in link when the session has expired; public manifest paths get no token and are limited to 10 requests a minute per client IP across every app (429 with a Vietnamese message), with new IPs sharing one bucket once the 10,000-IP table is full. Paths with empty or dot segments or encoded separators answer 400; onlycontent-type,acceptandcontent-length(plus the token) are forwarded, so the browser'scookie,authorizationandx-hasura-*headers never reach the app; onlycontent-typeandlocationcome back, so the app'sset-cookieis dropped, and a redirect that leaves the app answers 502. Every response carriesContent-Security-Policywithscript-src 'none'andX-Content-Type-Options: nosniff. The per-IP limiter of/api/registernow lives inapps/web/src/lib/ip-rate-limit.ts, unchanged DXOS_APP_PUBLIC_LIMIT: the public mini-app limit per minute and IP for thewebcontainer, read by Compose interpolation, default10; a value that is not a positive integer keeps 10. The CIStart Webstep raises it (to 1000), so a Playwright retry cannot hit 429. A demo machine on Docker Desktop should raise it too (for example 300), because Docker Desktop shows every client as one IP and the limit becomes shared by the whole room. Production and the compose default keep 10- Cross-site form posts to mini-apps refused: the web proxy answers 403, without forwarding, to a non-
GETrequest under/apps/whoseOriginheader is neither<scheme>://<Host>of the request nor theAUTH_URLorigin (Origin: nullincluded), or that has noOriginbutSec-Fetch-Site: cross-site, since the proxy attaches the signed-in user's token - Mini-apps in the app shell: each role's menu lists the installed mini-apps whose manifest menu names that role (read on every page load; when the list cannot be read the menu shows no app and the other items stay).
/<role>/apps/<id>/...shows the app in an<iframe sandbox="allow-forms allow-same-origin allow-top-navigation-by-user-activation">(noallow-scripts) on/apps/<id>/..., passes the page query through, adds?theme=light|darkfrom the stored theme choice, and answers 404 when the app is not installed, has no menu entry for the role, or the path has an unsafe segment; when the app list cannot be read the page shows "Dịch vụ dữ liệu đang tạm gián đoạn" with "Thử lại". The service worker never answers/apps/from its cache /dxos-app.css: the shared stylesheet for mini-apps, served without a session. It holds the core tokens (same values asglobals.css, checked by a test) for light, dark anddata-theme, plus styles for text, tables, forms, buttons andbutton.secondary,.notice,.error,.pill. Tables span their card, header row included. Below 640 px each row is stacked as a card: a cell withdata-labelshows that column name next to its value, and a cell without one keeps the card's full width. Apps setdata-themeon<html>from?theme=and keep it across their links and forms, ashelloandtea-tourdo- Mini-app
tea-tour(Đặt tour đồi chè):./dxos install miniapps/tea-touradds "Tour đồi chè" to the manager menu and "Lịch dẫn tour" to the farmer menu. Managers create tours (title, Vietnam-time start, meeting point, 1–50 seats, price in VND shown as250.000 ₫, description) with a guide picked from their HTX's households, read through the gateway with the user's own token (the tour list stays usable when the core does not answer within 5 s), edit an open, upcoming tour (seats never below those booked, checked under the tour's row lock), see each tour's bookings with phone numbers, confirm (only while the tour is open; the confirm locks only that booking's tour) or cancel them, and cancel tours; a confirm or cancel that changes nothing says so. Guests book without signing in at/apps/tea-tour/public/<htx>(name, Vietnamese phone, 1–10 people, note), get an 8-character code and look the booking up with code and phone together; public pages never show another guest's name or phone. A booking locks the tour row, so concurrent bookings never oversell; past, cancelled and other-HTX tours are refused with a Vietnamese message and nothing stored. The guide farmer sees their tours with confirmed guest counts. Its tables carry ARIA table roles anddata-labelon every cell, so they keep their meaning when stacked on phones. Data lives in schemaapp_tea_tour(tours,bookings, both withhtx_code; a booking's foreign key includes its HTX). The app holds at most 8 database connections and answers 503 "Hệ thống đang bận" when none frees within 2 s; it never holds one while waiting for the core - Mini-app tests and CI:
make apps-smokeinstalls and removeshello,tea-tourand the CLI fixtures on a seeded stack (it purges their data, so it refuses to start, with exit 1, when./dxos listshowstea-tourorhelloinstalled): routes 200 with a token and 401 without on the internal port9081, 404 on the published9080, the gateway's 401 for the wrong role, a tour booked end to end, idempotent re-install, rollback of a failing health check, routes kept acrossmake platform-up, 404 after removal,--purge, and finallymake platform-smokeon the app-free stack.tests/e2e/story/tea-tour.spec.tsruns the tour story in the browser (the manager creates a tour with a TC household as guide, a guest books on a 390 px phone, the manager confirms, the guide sees 2 guests) and, withE2E_TEA_TOUR=removed, checks that the menu item is gone and the public page answers 404;screens.spec.tsadds the tea-tour manager, public and guide screens at 1280 and 390 px in light and dark, and also checks overflow and overlap inside the app frame. CI runs the CLI,helloandtea-tourtests, validates every manifest underminiapps/, and in theplatform-smokejob installstea-tour, runs the story and the screens, removes it, runs the removal check, thenmake apps-smoke
Changed#
- Version:
apps/web/package.jsonis1.8.0, the core version the mini-app manifests require (ruling R7) - APISIX route file: apisix now mounts
${DXOS_GATEWAY_FILE:-../platform/gateway/apisix.yaml}. The Makefile and./dxossetDXOS_GATEWAY_FILEto the generated../docker/runtime/<project>/gateway/apisix.yaml; without it (release bundle, a baredocker compose up) apisix reads the tracked base file and serves no app route - Compose:
postgresalso mountsplatform/postgres/init/05-apps.sqland, likeapisix, joinsdxos-apps-net; thedxos-cliservice is added under profiletools
Fixed#
make platform-smokere-run on a seeded stack: two checks ofsmoke-dataops.shcounted every LB reading, including the ones[lifecycle]backfills for the seeded LB parcels in the first run, so any second run failed. They now count only the fixture parcelP-LB-001, whose rows the section deletes first- The gateway could send one mini-app's requests to another after a reinstall: Docker's DNS answers app names with a 600 s TTL and gives a removed app's IP to the next container, and APISIX kept the old answer. After
./dxos remove tea-tour,./dxos install miniapps/helloand a reinstall oftea-tour, tea-tour's requests, with the user's token, reachedhello(CI run 43178558735: creating a tour got hello's 404).platform/gateway/config.yamlnow setsapisix.dns_resolver_valid: 1, so the gateway resolves app names again every second.make apps-smokefirst replays that sequence and checks that 30 requests on new connections all reachtea-tour
Upgrade notes#
- Routes written before the internal-port fix: an app installed from a pre-release build of this branch has a route file without the
9081condition, andgateway-syncrefuses it. Run./dxos remove <id>(it deletes that route file), then./dxos install miniapps/<id>again - Start the stack with make:
make platform-up(ormake up) createsdocker/runtime/<project>/gateway/apisix.yamland setsDXOS_GATEWAY_FILE. When startingwebon its own, pass the same variable (DXOS_GATEWAY_FILE=../docker/runtime/docker/gateway/apisix.yaml docker compose -f docker/docker-compose.yml up -d --build --wait web disease-api), or Compose recreates apisix on the base file and the app routes disappear until the nextmake platform-up - First
make platform-uprecreatespostgresandapisix: their mounts changed (the new init file, the generated route file) and both joindxos-apps-net. The data indocker_pgdatais kept, andplatform-initcreatesplatform.installed_appson the existing database. Never delete thedocker_*volumes - Runtime state per compose project: generated files live under
docker/runtime/<project>/(git-ignored), where<project>is theCOMPOSE_PROJECT_NAMEenvironment variable, defaultdocker. Set the project with that variable;./dxosand the Makefile do not read-pordocker/.env. No app was installed before this release, so nothing needs moving - Release bundle: v1.8.0 does not install mini-apps from the release bundle (no
dxos-cliimage is published); the release stack starts apisix on the base route file as before, with no change to the release steps - Demo: build the
tea-tourimage ahead (install it once, then./dxos remove tea-tour --purge), so./dxos install miniapps/tea-tourtakes about 11–12 seconds. On Docker Desktop, start web for the demo with a higherDXOS_APP_PUBLIC_LIMIT(for example 300), since every phone shares one IP (README, "Chuẩn bị demo")
Known limits#
- Cross-app trust (ruling R24): every installed app shares
dxos-apps-net, and an app decodes the token's claims without verifying the signature (the gateway verifies user requests). Another installed app can therefore call it directly with a forged token, with any HTX and role, and read or change its data. Install only trusted apps. Real per-app isolation (JWT verification or a network per app) is deferred to v1.9 npm run devoutside Docker cannot reach mini-apps: app routes match only onapisix:9081, which the host cannot reach; work on mini-apps with thewebcontainer- Public limit and
X-Forwarded-For: the public mini-app limit trusts the firstX-Forwarded-Forelement and counts per web process, like/api/register; a client can forge the header to get a new bucket. It must move to the gateway or a shared store when web runs more than one instance PUBLICkeepsCONNECTon the other databases (keycloak,postgres,template1) in v1.8.0 (ruling R17): an app role can connect there, and default privileges an app leaves there make--purgefail (the env file is kept) until an admin runsDROP OWNED BY app_<id>in that database- The
--purgedependency guard covers table, type and function dependencies only: an object outside the schema that depends on another kind of app object (for example a core column using an app collation) is dropped byDROP SCHEMA ... CASCADE - Migrations are recorded by file name only, with no checksum: editing an applied file has no effect on an existing install, and an unpurged dev install keeps the old version. A
COMMITinside a migration file breaks its one-transaction-per-file rule (the app's schema only) - Re-installing over an existing app role logs in as that role: a stale env-file password or 10 connections already held make the install fail, safely, with nothing changed
- Soft 404 on a missing app's shell page (ruling R15):
/<role>/apps/<missing>renders the 404 page with HTTP 200, because the role layouts stream their loading state first, like the existing/lot,/qand/htxpages. The proxy/apps/<id>/...answers a real 404, so a removed app is unreachable - A bare
docker compose uphas no app routes: withoutDXOS_GATEWAY_FILE, apisix serves only the base routes, which fails closed /apps/<id>without a trailing slash answers 404 at the gateway; the web proxy always sends/apps/<id>/...- Behind a TLS proxy the proxy's own scheme is
http, so the Origin check relies onAUTH_URLnaming the public URL, as the documented deployment already sets it
1.7.0 - 2026-11-11#
Added#
- Tea leaf disease model:
ai-models/tea_leaf_model.keras(MobileNetV2 transfer learning, 224×224, 8 classes listed inai-models/tea_class_names.txt, 9.2 MB) with Vietnamese labels intea_class_names_vi.json, each marked for officer review.ai-models/tea/holds the reproducible pipeline (train.py,datasets.jsonwith DOIs, download URLs and SHA-256, pinnedrequirements.txt) that runs inpython:3.12.15-slim-bookworm. It is trained on three CC BY 4.0 Mendeley datasets (Kimutai and Förster, Kenya; Islam, Bangladesh; Billah et al., Bangladesh), credited inai-models/ATTRIBUTION.md; no image is committed.ai-models/tea/MODEL_CARD.mdreports the measured numbers: test accuracy 0.8683 on 1,025 images and confidence threshold 0.60, but only 0.12 to 0.35 when one source is held out, and a random-noise image is calledhealthyat 0.988. Accuracy on Thái Nguyên photos is not measured; every result goes to an officer - Tea disease model served:
POST /predict?model=teaondisease-apiuses the tea leaf model next to the general one (still the default; any other model name answers 400). Responses gainmodelanduncertain; a tea result belowTEA_CONFIDENCE_THRESHOLD(default0.60, rejected at startup outside (0, 1]) has null names and keepstop3./healthaddsmodelswith each model's state - Tea disease flow in the web app: a parcel whose crop names
chè/teais diagnosed with the tea model, any other with the general one. An uncertain result is stored asKhông xác định, and every result still goes to the officers; the farmer screen saysĐã gửi cán bộ kỹ thuật xeminstead of presenting a final diagnosis. A 503 from the tea model is an outage (503AI_UNAVAILABLE), never a fallback to the general model - Officer's confirmed diagnosis: the review form has a Tên bệnh đã xác nhận field, pre-filled with the AI name (empty when uncertain).
PUT /api/officer/diseases/[id]/reviewtakesconfirmed_diagnosis, required when approving, and stores it inconfirmed_diagnosis; the farmer history, officer lists, soil-health screen, notification and archived report show it over the AI name - Tea harvest rounds:
POST /api/parcels/[id]/start-round(officer only,TenantGuard.parcel) moves aHARVESTEDparcel toTENDINGand opens the cycleLứa <n>/<year>, numbered within the year in Vietnam time. The status check and the new cycle are one transaction, so a second start, or a start on any other status, is refused with 422 and creates nothing. The officer's household screen has a Bắt đầu lứa mới button on harvested parcels - Journal photo upload:
POST /api/journal/upload(farmer and officer) returns a presigned upload URL valid for 900 seconds and the keypara/<htxCode>/Areas/Journal/<yyyy>/<uuid>-<safe name>, whichPOST /api/journalaccepts asphoto_minio_key. Onlyimage/jpeg,image/pngandimage/webpare accepted; the name is reduced to its last segment without Vietnamese marks or unsafe characters, capped at 100 characters. The farmer journal form's photo upload called this route before it existed; the A3 browser story uploads a photo through it to storage and opens it again - Withdrawal on the farmer dashboard:
Thửa <mã> còn <N> ngày cách lyfor each parcel of the farmer's household whose latest safe harvest date (from journal entries not rejected) is still ahead;Nis whole days, rounded up - Tea demo data:
npm run seed(new script, runsprisma db seed) creates the Tân Cương (TC) and La Bằng (LB) cooperatives with made-up households and tea parcels (Trung du, LDP1, Kim Tuyên). ParcelTC-A3has, relative to the seed run, a fertiliser entry, a spraying entry still under its 7-day withdrawal, a harvested previous round whose lotTC-CHE-A3-001is already exported with a public trace page, and one pending tea disease report. Re-running it changes onlyTCandLBrows (plus the shared market, bulletin and partner rows); the history of the seeded parcels is rebuilt with fresh dates.platform/tests/seed-test.shchecks this on a throwaway database - Tea demo accounts in the realm:
manager_tc,officer_tc,farmer_tc,manager_lb,officer_lb,farmer_lb(passwordTest1234!; managers and officers must set up TOTP). The farmers have fixed ids, which the seed uses to link them to their household - Tea market data:
comtrade_export_syncalso fetches HS0902and stores it asTea;vietnam_market_syncadds a simulated dried tea bud price (Tea,VND/kg). Every price that workflow simulates is now written under the sourceMô phỏng (Toàn quốc)instead of naming a ministry or market portal, and the dashboard price list, the market widget and the chatbot's market context label such pricesgiá mô phỏng; the chatbot and the bulletin prompt must say so too, and the chatbot's context no longer calls its market data "thực tế". The market widget names no source when it has no data. Prices already stored under the old source names are not relabelled - Design system and dark mode:
DESIGN.md(google-labs-code/design.md format) documents the tokens ofapps/web/src/styles/globals.css, which now has a dark value for every colour token, applied underprefers-color-scheme: darkunless the viewer picked light, or underdata-theme="dark". A theme button (Sáng → Tối → Theo hệ thống, stored inlocalStoragekeyopentea-theme) sits in the top bar and on the home and login pages; an inline script sets the stored theme before first paint and does nothing if storage is blocked. Tailwind'sdark:variant follows the same choice, and semantic tokens (bg-danger-subtle,text-ink-secondary, ...) are available as Tailwind colours. Tests check that every light token has a dark value, that text/background pairs reach WCAG AA 4.5:1 in both themes, and thatDESIGN.mdmatchesglobals.css. A colour guard fails on hard-coded colours in*.module.cssand*.tsx; its baseline of files still to convert (74 when it was added) was emptied by the move to tokens below - A3 story and priority screens in the browser:
tests/e2e/story/tea-a3.spec.tsruns "Một ngày của lô chè A3" on the seeded stack with real Keycloak logins: the farmer sees A3's withdrawal and adds a journal entry with a photo uploaded to storage; a tea photo diagnosis goes through the gateway to the tea model (checked in thedisease-apiaccess log) and into the officer queue, where the officer confirms it with a name the farmer then sees; harvest approval and a lot of A3 are refused during the withdrawal; the officer creates and exports a lot ofTC-A2; the public pages/q/<code>of that lot and ofTC-CHE-A3-001show their withdrawal status.tests/e2e/visual/screens.spec.tssaves the priority screens of spec §6.4 (9 pages: the disease review is both the queue and the review form) at 1280×800 and 390×844 in light and dark (36 screenshots undertest-results/screens/) and fails on page-level horizontal overflow, on overlapping visible text, and on a theme button missing from or crowded in the phone top bar. Theplatform-smokeCI job now seeds the demo data, startsdisease-apiwithweb, runs both specs after the core tenant spec and uploads the screenshots as thepriority-screensartifact.make platform-smokealso createssmoke_officer_tc, because the demo officers must set up TOTP first - Home page:
/is now public for signed-out visitors, with a short introduction, a sign-in button and a lot code field that opens the public trace page/q/<code>(signed-in users are still sent to their dashboard). The PWA icons are real 192 and 512 px tea-leaf icons and are served without a session
Changed#
- disease-api dependencies pinned: every package in
apps/disease-api/requirements.txthas an exact version, andtensorflow-cpu(unpinned, no arm64 wheel) is replaced bytensorflow==2.21.0withkeras==3.15.1, so the image also builds on arm64; it is larger than before. The 46-class general model gives the same prediction as with the previously resolved versions. A pytest suite (requirements-dev.txt:pytest,httpx2) covers model selection, the threshold and the general model, and the CI job "Lint FastAPI" now runs it with-W error - Brand: the product is named
OpenTea DX-OSeverywhere (page titles via one title template, sidebar, top bar, login, register and PIN pages, trace pages, PWA manifest and the Keycloak login theme's title), fromapps/web/src/lib/brand.ts. The Keycloak theme directory and realm keep the nameagrimarket - Colours: the accent is now amber (
#b45309, was orange#EA580C); the status, feedback and tertiary text colours are darkened where white or coloured text missed 4.5:1;--font-family-sansuses Be Vietnam Pro instead of an Inter font that was never loaded. The login page uses tokens only - Tea vocabulary: the app no longer speaks of rice. Placeholders, chat suggestions, mock bulletins, the soil-health warning and the seeded market, bulletin and partner rows use tea; the seed no longer attributes made-up figures to real bodies (its FAOSTAT rows and the bulletin's WTO and Sở NN&PTNT sources are gone, and its one demo price is simulated); the menu item
Lịch vụ mùais nowLịch thu hái; a new zone's season defaults toLứa 1/<year>; the default commodity of the bulletin, market widget and market API isChè/Tea(the farmer bulletin page now looks it up by its English name, as the workflows store it, andGET /api/bulletinwithout?commodityreadsTeafor any tea crop of the HTX, such asChè Trung du). The manager dashboard's price list shows the 3 newest tea prices, topped up with the newest other commodities only when fewer than 3 exist. A test fails when a rice word is back in the web source or the seed; its only exceptions are the commodity name maps for Comtrade rice and wheat rows - Demo data and accounts: the
MD2rice cooperative is no longer seeded, the old seed's backfill of households without an HTX is gone, and weather rows are seeded only for the seeded parcels.manager1,officer1andfarmer1are removed from the realm - Smoke and browser tests use their own
smoke_accounts (smoke_manager_tc,smoke_manager_lb,smoke_manager_none,smoke_farmer_tc,smoke_officer_tc);ensure_userrefuses any other name, so tests never reset a demo user's password or TOTP. The A3 story and the screenshots also sign in asfarmer_tc, which has no TOTP step; a login does not change the account. Thetwo-htx.sqlfixture shares theTC/LBprofiles with the seed instead of deleting them, and the household checks are scoped to the fixture rows plus an every-row HTX check - Colour tokens everywhere: every
*.module.cssand*.tsxunderapps/web/srctakes its colours fromglobals.css, so all screens follow the dark theme, and the colour guard's baseline is empty. Text on primary fills uses--color-primary-foregroundand on success or danger fills--color-ink-inverse; the always-dark surfaces (sidebar, bulletin header) use the sidebar tokens. The guard'sexceptionsname the exact fixed colours a file may keep, each with a reason and the number of times it may occur: parcel colours drawn on map tiles, and text in Leaflet popups and controls, whichleaflet.csskeeps white. The lot page's decorative QR preview follows the theme. About 80 variables thatglobals.cssnever declared (--color-surface-border,--text-secondary,--radius-lg, ...) now point at real tokens, so borders, muted text and rounded corners that had fallen back to nothing render as designed;@themenames count as undeclared because Tailwind emits them only when a utility needs them. A test fails on anyvar(--…)thatglobals.cssdoes not declare, apart from four variables set at runtime - QR export rule: every parcel of the lot needs a crop cycle harvested on or before the lot's harvest date (same day counts, in Vietnam time) instead of being in
HARVESTED,TENDINGorHARVEST_APPROVED. A lot of the previous round can be exported while the next round runs, and a parcel harvested only after the lot date is refused. The withdrawal block is unchanged
Upgrade#
- Realm: Keycloak imports the realm only when it is missing, and the Admin Console cannot set a user id, which
farmer_tcandfarmer_lbneed. On an existing stack either (a) delete the realm (Realm settings > Action > Delete) and rundocker compose -f docker/docker-compose.yml restart keycloakso--import-realmimports it again, which also drops users created at runtime; or (b) deletemanager1,officer1andfarmer1, then Realm settings > Action > Partial import ofdocker/keycloak/realm-agrimarket.jsonwith only Users and Overwrite, which replaces themanager_tc,manager_lbandfarmer_tcthe old smoke created and keeps the fixed ids. Overwrite also resets the six demo users' passwords and TOTP, so do it before setting up TOTP for a demo. Never deletedocker_pgdata: the realm lives in itskeycloakdatabase next to all app data - Demo data: run
npm run seedonly on a demo database: it rebuilds the history of theTCandLBparcels with fresh dates. Re-run it before each demo so A3's withdrawal is active again - TOTP: managers and officers set up TOTP at their first login; set it up on the demo phone before the demo (README, "Cài TOTP trước buổi demo")
- Disease diagnosis needs the
disease-apicontainer (docker compose -f docker/docker-compose.yml up -d --build --wait web disease-api);make platform-updoes not start it - Never
down -von the main stack: earlier upgrade notes (1.3.0) suggested recreating the Postgres volume or runningdocker compose down -vonce for n8n. Both deletedocker_pgdata, which holds the Keycloak realm and all app data. UseREINDEX DATABASEfor the collation change and let n8n create its tables in then8nschema (README, "Nâng cấp môi trường dev cũ") - Storage: no change to
docker/.env.localis needed.MINIO_ENDPOINTmay beminioorminio:9000
Fixed#
- web image on arm64:
npm installin the Dockerfile could leave out@next/swc-linux-*-muslwithout an error (npm skips an optional download that fails), and BuildKit then reused that broken layer, sonext buildfailed on arm64 with "Failed to load SWC binary". The install step now fails when the musl SWC binary is missing - Photo uploads from the web app: the storage adapters used
MINIO_ENDPOINTas a host name whiledocker/.env.local.examplesetsminio:9000, so every request ofwebthat touched storage failed withInvalid endPoint: journal photo upload, diagnosis, the farmer's diagnosis history, the officer's disease screens, documents and QR export. Both adapters now accepthostorhost:port. The browser's presignedPUTto SeaweedFS needed no CORS change - Pages hanging after a few clicks in the installed app: the PWA service worker cached every same-origin
/api/GET with NetworkFirst, including the/api/notifications/streamevent stream, which never ends. Each page left an open connection behind, and after a few pages the browser's 6 connections per host were taken: requests hung, then came from the cache after 10 seconds, and form posts never went out. The stream now bypasses the cache (NetworkOnly). Found by the A3 browser story, which failed about one run in six before - Vietnamese status labels on the demo screens: the trace page that the printed QR opens (
/lot/<code>) showed the rawQR_EXPORTED(orREADY) pill and now showsĐã xuất QR,Sẵn sàngorBản nháp; the officer disease queue and review showedPENDINGand now showChờ duyệt; the farmer's diagnosis history mapped a status the reports never take (RESOLVED) and showedCONFIRMED/REJECTEDraw, and now showsChờ duyệt,Đã xác nhậnorBị từ chối. The lot form and the QR export show a refusal without its machine code (WITHDRAWAL_NOT_PASSED:), which the API still returns - Market sources on the manager dashboard: the source box counted price rows instead of sources, called a simulated price "nguồn đã kiểm chứng", and with no data named USDA, WTO and Sở NN&PTNT. It now counts distinct real sources only, names simulated sources on their own line ("Nguồn mô phỏng: …"), and names none when there is no data
- Farmer dashboard weather showed the stored WMO code (for example
3) and now shows its Vietnamese name (U ám) - Phone top bar: the product name broke after the hyphen ("OpenTea DX-" / "OS"); it now stays on one line, slightly smaller at 400 px and below
- Demo lot grade: the seeded lot
TC-CHE-A3-001is gradedLoại 1instead ofGrade 1 - disease-api health check allows 60 seconds for both TensorFlow models to load before failed checks count, so
up --waitdoes not give up on a cold machine - Missing report photos: a disease report whose photo is not in storage (the seeded A3 report, or one quarantined by the scanner) now shows "Không tải được ảnh" in the officer queue, the officer review and the farmer's history instead of a broken image
- e2e session harness: the specs that forge an Auth.js cookie signed it with a fallback secret the Playwright dev server never had, and without
htxCode, so 20 of them landed on/loginor the NO_HTX notice.playwright.config.tssets an e2e-onlyAUTH_SECRETfor the dev server and the specs, and one helper (tests/e2e/helpers/forged-session.ts, HTXTC) replaces the 12 copies - Chatbot market context: its header said the data covered 48 hours while the query reads 30 days; it now says 30 days
- Sidebar profile menu: it sat on
--cardwith white text, so in light mode its links were white on white. It now uses the overlay surface and ink tokens - Journal reject button: the officer's "Từ chối nhật ký" button set its fill from an undefined variable, so it was transparent and its white text was invisible on the white dialog. It is now a danger fill with
--color-ink-inversetext - Exported lot status on the public trace page: the snapshot stored at QR export was read before the export, so it kept
status: 'READY'and the lot's earlier QR image (normally none); the public page then showed a READY pill and no "locked" banner for every lot exported in the app. The snapshot now storesQR_EXPORTEDand the generated QR image. Snapshots already stored withREADYare not rewritten, so lots exported before this fix still show READY on their public page (an exported lot cannot be exported again) - Journal photo keys:
POST /api/journalaccepted anyphoto_minio_keyinsidepara/<htxCode>/, so a farmer could attach any document of their HTX, a manager-only one for example, and receive a signed download URL for it fromGET /api/journal. It now accepts only a file key underpara/<htxCode>/Areas/Journal/(400 otherwise), and the journal list signs only such keys; a row stored with another key comes back without a photo. No legitimate photo is lost: the upload route did not exist before this release - Farmer diagnosis confidence: the result and history showed the 0–1 confidence as a percentage without scaling (
0.988as1.0%), and the low-confidence warning always showed. They now show98.8%and warn only below 70%
1.6.0 - 2026-11-10#
Added#
- Identity-aware core access: the web app keeps the Keycloak access and refresh tokens server-side in the encrypted session cookie and refreshes them in the middleware when under 30 seconds remain; a failed refresh sends the user to
/login./api/auth/sessionexposes neither token - Tenant isolation:
requireTenant()resolves the caller's HTX from thehtx_codeclaim, answering 403NO_HTXwhen it is missing or unknown;TenantGuardanswers 404 before any write by ID on a record of another HTX. Notifications sent to a whole HTX now carryhtx_profile_id - Gateway read adapters: parcels, households, lots, journal entries and disease reports are read through Hasura with the user's token. A core outage gives 503
CORE_UNAVAILABLEand a Vietnamese error page, never a fallback to Prisma - Internal gateway port
9081for thewebcontainer: not limited per IP, JWT and permissions as on9080 - Browser test
tests/e2e/tenant/core-tenant.spec.ts(E2E_CORE=1), run in theplatform-smokeCI job against a realwebcontainer and real Keycloak: isolation between two HTXs, no token in the session endpoint, a live refresh of an expired token, and a Hasura outage
Changed#
- Disease detection and the local LLM go through the gateway with the user's token; the Groq path is unchanged when a key is set. The LLM route is limited per bearer token
- Sessions:
ssoSessionIdleTimeoutandssoSessionMaxLifespanare 8 hours, matching the app session - Accounts: registration and invitations write
htx_code; invited managers and officers must set up TOTP (#18) docker/.env.local.example,.env.example: removedDISEASE_API_URLandOLLAMA_BASE_URL, which no service reads.docker/.env.local.examplealso drops theKEYCLOAK_ISSUERthat Compose overrides and addsAUTH_URL;.env.examplehas noAUTH_URL- Documents are namespaced by HTX: keys are
para/<htxCode>/.... The list, URL and upload routes derive the namespace from the session and answer 404 for anything outside it, including..traversal;certificate_keysoutside it answer 400. The one exception ispara/Archives/Market_Reports/, written by the n8n workflow and holding no tenant data: the list and URL routes may read it, and the document screen shows it without upload
Fixed#
- Migration drift (#7): migrations now produce the database described by
schema.prisma, without dropping any column - Login from the Docker image:
webbuilt theredirect_urifromHOSTNAME(0.0.0.0) and Keycloak refused it; Compose now setsAUTH_URL - Account attributes: Keycloak 24 silently dropped
fullName,phoneandhtxId; the realm now declares them as admin-only - HTX assumed to be the first one: every
htxProfile.findFirst()now reads the caller's HTX - Cross-HTX reads:
schedule/harvest,schedule/unscheduled,weather/forecastand the officer soil-health page returned data of every HTX; they now filter by the caller's HTX - Role frozen at sign-in: the role is read again from each refreshed access token, and is cleared when no recognised role remains
- Keycloak admin credentials on a release: the web app also reads
KEYCLOAK_ADMINandKEYCLOAK_ADMIN_PASSWORD, and refuses to fall back toadmin/adminin production - Self-registration: the middleware no longer answers 401 to the anonymous
POST /api/register; new accounts stay disabled until a manager approves them - Pre-upgrade sessions: in production a session without a refresh token goes to login instead of showing the no-HTX notice
- Silent load failures: the officer journal approval and manager farm-zone screens now say when loading failed
- Anonymous
POST /api/register: limited to 5 requests per IP per 10 minutes (429), and anything other than a validation error answers a generic message instead of the raw error text - Rejected registrations: the household is unlinked before the Keycloak account is deleted, so a failed unlink can be retried and never leaves the phone taken
- Object keys from clients:
POST /api/journalanswers 400 for aphoto_minio_keyoutside the caller's document root, and the journal list signs a stored key only when it is inside that root; other entries come back without a photo. The public certificate route signs a key only inside the document root of the lot's HTX
Upgrade notes#
- Run
migrate(two new migrations:20261109120000_sync_schema_driftand20261109130000_notifications_htx), thenplatform-init, as in the deploy section. - On a running release, after
up -d --no-buildrundocker compose --env-file docker/.env.local -f docker/docker-compose.yml -f docker/docker-compose.release.yml restart hasura apisix. Their compose config is unchanged, so they are not recreated: APISIX keeps listening on 9080 only and Hasura lacks the new relationships, and every list answers 503. - Keycloak imports the realm only on a new database. On a running realm, set SSO Session Idle and SSO Session Max to 8 hours (Realm settings > Sessions) and declare
fullName,phoneandhtxIdas admin-only attributes (Realm settings > User profile). - Assign the
htx_codeattribute to existing accounts in Keycloak, or they receiveNO_HTX. - Old notifications with neither a recipient nor an HTX are no longer shown; n8n system alerts remain visible.
- Rows with a null
htx_profile_id(households, lots) become invisible and unwritable and must be assigned to an HTX (seescripts/backfill-htx-profile-id.sql). - Documents written before this release stay under
para/Projects/,para/Areas/,para/Resources/andpara/Archives/. They are no longer listed and are not moved automatically; copy them topara/<htxCode>/...to use them again. - Certificates of exported lots whose keys are outside
para/<htxCode>/of the lot's HTX now answer 403 on the public page, and such journal photos stop showing. Copy the object into that folder and update the key to use it again. - Set
KEYCLOAK_ADMINas well asKEYCLOAK_ADMIN_PASSWORDindocker/.env.local, or the admin routes answer 500 in production. - Set
AUTH_URLindocker/.env.localwhen the web app is not served fromhttp://localhost:3000, and add that URL to the redirect URIs of thenextjs-webclient. - Known limits:
9081must stay unpublished, because it is not rate limited per IP;workflows/mattermost-push.jsonposts disease and harvest events of all HTXs to one webhook; in production, pre-upgrade cookies go to login;/api/dev-logincookies carry no access token, so core reads fail closed; the write path is protected in the application, not in the database; thePOST /api/registerlimit is per process and trustsX-Forwarded-For, clients behind one proxy or NAT share it and a value that is not a valid IP goes to one sharedunknownbucket, so it must move to the gateway or a shared store whenwebruns more than one instance.
1.5.0 - 2026-11-09#
Added#
- MQTT sensor ingest:
mosquitto(no host port, per-HTX device accounts restricted to their own topics) anddxos-ingestvalidate every message and store it intelemetry.sensor_readings; rejected messages are kept with a reason intelemetry.ingest_rejects.dxos-simulator(profiledemo) publishes demo readings - Data lifecycle and lineage:
dxos-lifecyclemoves readings older than 30 days to Parquet (ZSTD) in thedxos-lakebucket in whole UTC days (the cutoff is floored to midnight UTC, so a row can stay hot for up to about one extra day), verifies SHA-256 and row count before deleting the hot rows, and records each export intelemetry.lifecycle_runsandaudit.events.python -m dxos_dataops queryreads the cold data through thesensor_readings_coldview. Hasura exposes both telemetry tables to managers and officers (scoped byhtx_code) - In-house LLM:
ollamaservesqwen2.5:0.5b(Apache-2.0) behind the gateway atPOST /api/ai/llm/v1/chat/completions(JWT with thedx-os-coreaudience, 30 requests per minute); the Ollama management API is not routed.ollama-initpulls the model and checks its ID - Dataops image: published to GHCR as
opentea-dx-os-dataops(6 images per release withmigrate); CI runs the dataops unit tests - Dependencies: Mosquitto (EPL-2.0), Ollama (MIT),
paho-mqtt(EPL-2.0 OR BSD-3-Clause),duckdb(MIT)
Changed#
- Deploy order:
postgres->platform-init->migrate->platform-init-> the rest ->ollama-init.make platform-upruns it end to end, and the release flow is identical (--profile tools run --rm ollama-initlast) migratemoved intodocker/docker-compose.yml(profiletools), so the same service is used in dev and release
Fixed#
- Hasura started before migrations (#17): it is no longer restarted by the smoke test;
platform-upmigrates first - Prebuilt
migrateimage (#15):apps/web/prisma/Dockerfileshipsprisma@5.22.0, the schema and the migrations; the entrypoint URL-encodesPOSTGRES_PASSWORDwhen it buildsDATABASE_URL - LLM smoke check retries on HTTP 429 and reports failures instead of exiting silently
Upgrade notes#
- Add
DXOS_MQTT_DEVICES(comma list ofHTX_CODE:password) andDXOS_MQTT_INGEST_PASSWORDtodocker/.env.local(seedocker/.env.local.example). The release override makes the broker refuse to start while any of these passwords begins withchange_me. - Re-run
migrateandplatform-init(the postgres image gains04-telemetry.sql); create themosquitto,dxos-ingest,dxos-lifecycleandollamacontainers, then run--profile tools run --rm ollama-init. - Release flow: every
docker composecommand now takes--env-file docker/.env.localbefore-f; without it Compose used the defaults published in this repo. SeaweedFS refuses to start whileMINIO_ACCESS_KEYorMINIO_SECRET_KEYis empty or a placeholder, and Keycloak refuses to start whileKEYCLOAK_ADMIN_PASSWORDis empty,adminor begins withchange_me. Keycloak reads that value only on a new database, so on a running system also change the admin password inside Keycloak. On existing volumes,POSTGRES_PASSWORD,KEYCLOAK_DB_PASSWORDandN8N_ENCRYPTION_KEYin that file must match the values the volumes were initialised with (until now thedocker-compose.ymldefaults). - On a running release stack, restart
hasuraandapisixafterup -d --no-build(docker compose --env-file docker/.env.local -f docker/docker-compose.yml -f docker/docker-compose.release.yml restart hasura apisix): Hasura loads metadata only at start and APISIX keeps the old inode of its route file.make platform-updoes this in dev when the stack is already running. - Known limits: the cold view keeps the first-ingested copy of a duplicated key; Mosquitto saves its state every 60 seconds (
autosave_interval 60), so messages queued in the last 60 seconds can be lost if the broker crashes; a coldmake platform-upis slow because of the Ollama image and the 397 MB model pull;dxos-ingestanddxos-lifecycleshare theagrimarketdatabase account (a least-privilege role is Tier 2).
1.4.0 - 2026-11-09#
Added#
- File quarantine: ClamAV (
clamav) and thedxos-scannerservice scan new objects inagrimarket-docsandagrimarket-private; infected or unscannable (> 50 MiB) objects are copied todxos-quarantine/<bucket>/<key>and removed, with verdicts inaudit.file_scans. The scanner image is published to GHCR asopentea-dx-os-scanner - Audit log: hash-chained, append-only
audit.eventsfed by row triggers on 9 business tables; verify withselect * from audit.verify_chain()
Security#
- ClamAV fails closed on archives: encrypted archives and archives exceeding a scan limit (nesting depth, size, scan time 25 s) are reported as
FOUNDand quarantined instead ofOK. Encrypted documents (for example password-protected PDFs) are still allowed - Scanner re-scans replaced objects: a
cleanrow is only trusted while the object'sLastModifiedis unchanged, so an MD5 (etag) collision cannot hide a replacement; the source object is removed only if its etag still equals the scanned one - Audit chain head can only advance;
verify_chain()proves chain integrity, not capture coverage (a superuser can disable triggers)
Changed#
- Deploy order:
postgres->platform-init->migrate->platform-init(attaches audit triggers to the migrated tables) -> the rest - SeaweedFS starts with
-volume.max=100
Fixed#
- SeaweedFS: a PUT to a second bucket returned HTTP 500 (default limit of 8 volumes, 7 per bucket)
Upgrade notes#
- Re-run
platform-initafterprisma migrate deploy(the postgres image did not change); recreate theseaweedfs,clamavanddxos-scannercontainers. - On an upgraded stack, existing objects over 50 MiB in the watched buckets are moved to
dxos-quarantineduring the first scan rounds.
1.3.0 - 2026-11-08#
Added#
- Contribution tooling: Bilingual issue templates (bug report, feature request), pull request template and
SECURITY.mdwith a private vulnerability reporting policy - Tier 1 API gateway: APISIX on
:9080with JWT validation for/api/data/graphql,/api/workflow/*and/api/ai/disease/* - Hasura data API: read-only GraphQL with row-level permissions scoped by the
htx_codeclaim - PostGIS and pgvector: the Postgres image now ships both extensions and is published to GHCR as
opentea-dx-os-postgres - Platform smoke CI job:
make platform-up+make platform-smokerun in CI (platform-smoke) - Release
migrateservice:--profile tools run --rm migrateapplies Prisma migrations inside the compose network
Security#
- Gateway: strips the client-supplied
x-hasura-admin-secretheader on the GraphQL route (it previously let any authenticated user act as Hasura admin);/api/workflow/*and/api/ai/disease/*now require thedx-os-coreaudience - Release override: Hasura refuses to start while
HASURA_GRAPHQL_ADMIN_SECRETis empty or achange_me*placeholder
Changed#
- Gateway CORS: allows the
x-hasura-rolerequest header and exposesX-Request-Id - Release ports: SeaweedFS S3
:9000stays published (browsers use presigned URLs on it) until storage moves behind the gateway - Hasura JWT issuer is configurable through
KC_PUBLIC_ISSUER - Object storage: MinIO replaced by SeaweedFS S3 on
:9000(network aliasminiokept) - Keycloak: TOTP required for staff, tokens carry the
dx-os-coreaudience and the admin-onlyhtx_codeclaim; thenextjs-webpassword grant is disabled - n8n: tables moved to the Postgres schema
n8n - Images: all service images are pinned to exact tags
- Release override: only
apisix:9080,web:3000,keycloak:8080and SeaweedFS:9000publish host ports; deploy order is postgres,platform-init,migrate, then the rest
Upgrade notes#
- Dev environments: recreate the Postgres volume (or run
REINDEX DATABASE agrimarket;after the alpine to bookworm switch), recreate the Keycloak realm (it is imported only on a fresh database), rundocker compose down --remove-orphans, and (dev only — never on production data)docker compose down -vonce for n8n. MinIO data is not migrated to SeaweedFS.
1.2.0 - 2026-11-08#
Added#
- Tag-driven release pipeline: Pushing a
vX.Y.Ztag runs the full CI quality gate, publishes versionedwebandapiimages to GHCR and creates a GitHub Release with CHANGELOG notes and a deployment bundle - Release compose override:
docker/docker-compose.release.ymlrunswebanddisease-apifrom prebuilt GHCR images instead of building from source - Container images on GHCR:
webandapiimages are published to GitHub Container Registry - Build-from-source guide and dependency register: Documented building without Docker and added
DEPENDENCIES.mdwith third-party licenses
Changed#
- Project identity: Renamed the project to OpenTea DX-OS; copyright, contacts and repository links now point to OpenTea Developers
- README: Rewritten with an architecture diagram, feature overview, setup, testing, release and documentation sections
- Docker edge images:
docker-publish.ymlnow publishesedgeandsha-<commit>images only after the CI Quality Gate passes onmain, using lowercase GHCR image names - License headers: Added MIT license headers to remaining source files
Removed#
- BMAD tooling: Removed
.agent/,.agents/,_bmad/,_bmad-output/anddocs/bmad-workflow-guide.md; project rules now live in the rootAGENTS.md
Fixed#
- Hexagonal architecture: Resolved layer-boundary violations reported in code review
- Use case tests: Fixed TypeScript errors caused by newly injected dependencies
- Git ignore rules: Rewrote a UTF-16 encoded
*.tar.gzentry that made git ignore every new file
1.1.0 - 2026-09-15#
Added#
- Harvest Schedule Calendar: Interactive calendar for scheduling and viewing expected harvest dates
- Vietnamese Localization (Auth): Translated Keycloak login interface labels to Vietnamese for farmers
- Soil Health Dashboard: Soil analysis and pest risk visualization with interactive charts
- Docker Publish CI: Automated Docker image publishing to GitHub Container Registry (GHCR)
Changed#
- Streamlined user onboarding: removed mandatory email requirement for agricultural profiles
- Improved QR traceability public page with snapshot immutability and safety guards
Fixed#
- NextAuth TypeScript compilation issues with generic Route Handlers
- Leaflet SSR hydration mismatches in Map components
1.0.0 - 2026-09-15#
Added#
- Farm Zone Map: GIS mapping with Leaflet.js for digitizing agricultural parcels
- Smart Journal: Farming log tracking with approval workflow and withdrawal days calculation
- QR Lot Traceability: Full lifecycle tracking from seed to harvest with public QR pages
- Disease AI Assistant: Computer vision for crop disease diagnosis via FastAPI
- Audio Bulletin: Automated agricultural news synthesis via n8n and Piper TTS
- Market Chatbot: LLM-powered market intelligence assistant (Groq Llama-3.1)
- Keycloak SSO: Role-based authentication (Manager/Officer/Farmer)
- n8n Data Pipelines: Automated FAOSTAT, Open-Meteo, Frankfurter FX, NASA POWER data sync
- CI/CD Pipeline: GitHub Actions with lint, test, build, Docker smoke test
- DEPENDENCIES.md: Full third-party library listing with license information
- CODE_OF_CONDUCT.md and CONTRIBUTING.md for open-source community
Security#
- All API routes protected with server-side auth checks (getServerSession)
- MinIO access via pre-signed URLs only (no client-side SDK exposure)
0.1.0-alpha - 2026-08-11#
Added#
- Hexagonal Architecture scaffold — Domain / Application / Infrastructure / Presentation layers with sample profile slice (#91)
- Hybrid AI architecture — Migration to Groq cloud API with Ollama local fallback (#52)
- PR Deep Review skill — Adversarial code review automation for CI
Fixed#
- CI: restore package-lock.json, add Zod dependency
- CI: remove BOM from package.json causing Prisma generate JSON parse error
- Remove redundant
CREATE DATABASE agrimarketto fix CI pipeline
0.0.4-alpha - 2026-08-10#
Added#
- Design System — CSS custom properties (design tokens), Google Fonts integration (#89)
- Shared UI components — Button, Badge, Card, Modal, Skeleton with CSS Modules
- Layout shell — AppShell, Sidebar, TopBar, BottomNav responsive components
- Unit tests — Jest config + tests for tokens, Button, Badge, Skeleton, Sidebar
Changed#
- Refactored design system components based on code review findings
Fixed#
- CI: resolve lint, build, and docker-compose errors
0.0.3-alpha - 2026-08-08#
Added#
- n8n data pipelines — FAOSTAT commodity sync, Open-Meteo weather cache, Frankfurter FX rates, market bulletin generation (#87)
- CI/CD workflow for n8n JSON linting
- HTX profile and Lot public pages
0.0.2-alpha - 2026-08-06#
Added#
- Full Prisma schema — All 15+ tables with JSONB multi-currency support (#86)
- Keycloak SSO integration — NextAuth.js v5 + Keycloak OIDC with role-based routing (Manager/Officer/Farmer) (#84)
Fixed#
- Auth: correct relative import paths, remove unused variables
- Routing: remove route groups for role directories to fix build conflict
- CI: update env validation, use
npm installfor cross-platform lockfile
0.0.1-alpha - 2026-08-04#
Added#
- Monorepo structure —
apps/web(Next.js 14) +apps/disease-api(FastAPI) - Docker Compose stack — PostgreSQL 16, Keycloak 24, n8n, Piper TTS, MinIO, Disease API
- CI/CD pipeline (GitHub Actions) — Lint, build, Docker smoke test
- Environment validation script (
scripts/validate-env.sh) - Structure validation script (
scripts/validate-structure.sh)
Fixed#
- Add missing
public/directory for Next.js Docker build - Docker Compose healthchecks and initial Next.js page
0.0.0 - 2026-07-09#
Added#
- Initial project scaffold
- Business Analysis Document (BA) with HPDI architecture
- MIT License
- BMAD Method AI-Native Agile framework initialization
- Story splitting, testing strategy, and dependency mapping for Epics 1–6
- Complete project documentation (PRD, Architecture Spine, UX Design, API Contract)
Ghi chú: Dự án DX-AgriMarket đang trong giai đoạn phát triển ban đầu (pre-release). Phiên bản đầu tiên sẽ chính thức được đánh số v1.0.0 khi hệ thống được triển khai hoàn chỉnh với đầy đủ các tính năng MVP theo PRD.