159 Commits
Author SHA1 Message Date
pnokerandClaude Opus 4.8 5f1ab36ade docs(site): apply verification fixes to remaining driver and foundation pages
Source-checked corrections from the verification pass that were not captured
in the prior commit: mqtt default broker (dc3-rabbitmq:1883), snmp/can/http/
ble/zigbee command vs point attribute read sources and honest capability
labels, opc-ua/opc-da/modbus-rtu/fins/listening-virtual wording, and the
fieldbus/iot-protocols foundations chapters. Bilingual, all within drivers/
and foundations/, no scope creep.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 12:55:41 +08:00
pnokerandClaude Opus 4.8 c291c6f0aa docs(site): fix factual issues flagged by independent source verification
Apply source-checked corrections across driver and foundations pages:
- mqtt/snmp/can/http/ble/zigbee/listening-virtual: command-attribute vs
  point-attribute read sources, default broker (dc3-rabbitmq:1883, not EMQX
  localhost:31883), dead driver-level properties, capability matrix alignment
  (CAN write ✓→—), and honest skeleton/partial labels.
- aiot: MCP catalog refresh is manual (POST /mcp/tool/catalog/refresh), not
  scheduled PT5M; AGENTIC_MEMORY_ENABLED dual default clarified.
- edge-cloud: connection/state management sits on the data center, not the
  manager center; soften the four-centers ↔ four-capabilities 1:1 wording.
- security: salt is stateless (no server-enforced 5-min timeout);
  DC3_SECURITY_KEY has a "must exist" startup check but no weak-value rejection.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 12:42:07 +08:00
pnokerandClaude Opus 4.8 4b190c1d43 docs(site): translate .vitepress code comments to English and calm hero animations
Convert all Chinese code comments under docs/.vitepress (config + theme +
components) to English; UI string literals (zh DICT values, nav labels,
uiLabels) are kept verbatim. Soften the home hero motion for a calmer feel:
slower logo wave (omega 1.0→0.6, sway 6→4.5), gentler particle convergence
(inward 120-200→70-120 px/s, fewer/slower dots), slower wave plane (0.5→0.3).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 11:28:32 +08:00
pnokerandClaude Opus 4.8 dbe4d6bc83 docs(site): link data-plane, auth-rbac and ai hubs to their foundations chapters
Add foundations back-links (data-plane → time-series, auth-rbac → security,
ai → aiot) to complete the theory-to-implementation loop across both locales.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 11:28:32 +08:00
pnokerandClaude Opus 4.8 93b111e3fb docs(site): deepen all 28 driver pages and add foundations back-links
Rewrite every protocol driver page (zh+en) into a four-section structure
— protocol background, attribute config, troubleshooting, and how it lands
in DC3 — cross-linked to the foundations network-layer chapters and the
driver capability matrix. Implementation status is verified against each
driver's source and labeled honestly (skeleton: ethernet-ip, iec104, dlms,
can, zigbee; partial: fins, mqtt, lwm2m, virtual). Add foundations
back-links from the concepts and drivers hubs to close the theory↔practice
loop.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 11:04:07 +08:00
pnokerandClaude Opus 4.8 0a33fb47d9 docs(site): add IoT foundations pillar — four-layer knowledge woven with DC3
Add the Foundations pillar (nav position 2) as a structured IoT primer
organized by the classic four-layer reference architecture (perception,
network, platform, application) plus cross-cutting security. One overview
(2.0) with a bespoke FourLayers SVG mapping each layer to its DC3
implementation, and eight chapters (sensing, identification, fieldbus,
iot-protocols, edge-cloud, data-pipeline, aiot, security), bilingual and
fully original. Every chapter closes with a verified "in IoT DC3" section
and cross-links into the product docs. Add the sixth homepage card.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 23:48:00 +08:00
pnokerandClaude Opus 4.8 147368a7ee docs(site): fix language switcher, restyle mermaid, add bespoke flow diagrams
Drop the gate "Languages" locale so the switcher shows only zh/en; keep the
/ redirect gate for no-JS fallback. Deepen the global mermaid theme (softer
on-brand palette, rounded nodes, cleaner edges) so all 156 diagrams read
cleaner. Add a reusable .dc3-diagram palette and three hand-built SVG
components (DataPlane, CommandPlane, AuthFlow) replacing the keystone
diagrams on the data-plane, command-plane and auth-rbac pages, bilingual
and theme-aware.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 23:18:57 +08:00
pnokerandClaude Opus 4.8 cfd5a2a857 docs(site): refine top nav into five pillars, add glossary and driver matrix
Collapse the flat 10-section navigation into five pillars (Overview,
Architecture, Connectivity, Operations, Develop) plus a Community dropdown,
via a pillar model in config.mts. Legacy dirs (modules, guide, ai,
automation, device-onboarding) aggregate into pillars through multi-path
sidebars and longest-prefix matching, with zero file moves and zero dead
links. Adds a bilingual glossary and driver capability matrix, and aligns
the homepage feature cards.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 21:07:54 +08:00
pnokerandClaude Opus 4.8 1701413a4d docs(site): add IA-refresh spec and P0 plan
Design and task breakdown for collapsing the flat 10-section nav into
professional pillars and adding an IoT foundations knowledge pillar.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 21:07:54 +08:00
pnoker d06037ee17 docs(site): fix browser title; add hero wave background and converging particle field
- title: add config `title: 'IoT DC3'` so the browser tab reads "IoT DC3"
  (inner pages ":title | IoT DC3") instead of the default "VitePress".
- hero: full-bleed background particle field that converges clockwise toward the
  logo from all directions (HeroParticles), plus a pseudo-perspective wave
  point-grid underlay (HeroWaves); both pure 2D canvas, layered under the hero
  content (waves z0 < particles z1 < content z2).
2026-06-25 16:59:40 +08:00
pnoker f6990019be docs(site): live hero logo, unified architecture component, grouped sidebar
- hero: rebuild the homepage logo as a live canvas particle system faithfully
  reconstructed from logo.svg (54 dots, solid #1296db) instead of a static image;
  the dots animate with a clockwise, inward-converging wave along the three spiral
  arms — no whole-image rotation, no extra particles or glow haze.
- architecture: render the homepage/architecture diagram via a single
  theme-reactive Architecture.vue component (renamed from Dc3Architecture.vue);
  drop the static SVG/HTML drawings.
- cleanup: remove ~23MB of unused images (legacy/ 167 files, architecture-cn.png,
  iot-dc3-architecture-{zh,en}.svg, diagrams/iot-dc3-architecture.html).
- sidebar: group drivers/concepts/architecture into collapsible sections;
  fix a pre-existing dead-link bug in cross-section link generation.
- nav: brand-blue site title.
- chore: bump packageManager to pnpm@11.9.0.
2026-06-25 15:30:22 +08:00
pnoker e61b620399 docs: fix tenant-isolation fiction + data-plane schema/compression + MCP endpoint
Whole-site QA pass (concepts + drivers + architecture + operation + home) with adversarial verification against source. Fixed:
- Remove fabricated 'MyBatis-Plus tenant-line interceptor auto-appends WHERE tenant_id' (no such interceptor exists; isolation is controller-layer requireTenant/filterTenant) across architecture/index, auth-rbac, modules, tenant concept (zh+en).
- data-plane: add dc3_history schema qualifier + compression (7d) / retention (180d) lifecycle policies (zh+en).
- operation/index: MCP endpoint is gateway-root POST /mcp, not /api/v3/agentic/mcp (zh+en).
Concept pages (9), drivers (28), services/domain-model/command-plane/device-onboarding/data-commands/alarms verified accurate against source.
2026-06-25 10:54:07 +08:00
pnoker c470de529e docs(drivers): add bilingual reference pages for all 28 drivers + catalog
Per-driver onboarding pages (protocol intro, driver/point/command config tables, collection & health, minimal example, pitfalls), config tables taken verbatim from each driver application.yml. Drivers catalog + 'Drivers' nav entry. Adversarial pass verified every attribute row against the yml and corrected behavioral drift (JDBC executeQuery path, dlms fail-fast, listening-virtual name-based parse, modbus-rtu per-device connection, opc-ua auto cert, fins 16-bit read, etc.).
2026-06-24 21:43:13 +08:00
pnoker 77273d2b24 docs(concepts): add 9 bilingual core-concept reference pages
Device, Driver, Profile (thing model), Point, PointValue, Command, Event, Tenant, Attribute&Config — each grounded in source BOs + maintainer design docs, beginner-friendly with analogies, cross-linked. Field tables/enums/table names/APIs verified against source (adversarial pass caught & fixed design-doc drift: dc3_event_history not _record, EventLevelEnum LOW/MEDIUM/HIGH/CRITICAL, tenant isolation is controller-layer not a DB interceptor).
2026-06-24 21:19:40 +08:00
pnoker 11d2d0176f docs(home): add recolored logo hero image (azure gradient + soft glow), floating instead of bordered card 2026-06-24 19:40:09 +08:00
pnoker 64035dd72a docs(site): switch base to / for docs.dc3.site custom domain (fix icon/lang-redirect paths) 2026-06-24 19:06:16 +08:00
pnoker 85d7f300d7 fix(docs): transparent home navbar so hero title isn't occluded; restore doc-page header divider to match sidebar 2026-06-24 17:22:33 +08:00
pnoker a6846212fc docs(site): logo-blue retheme, grouped sidebar, frosted header, flat cards; relocate vitepress project under docs/
Theme: brand palette to logo azure (#1296db family) with AA-tuned links, neutralized backgrounds/shadows, per-section sidebar group headers with pill active state, borderless frosted nav, flat translucent feature cards; mermaid + theme-color recolored to blue.

Build: move package.json/pnpm-lock/pnpm-workspace/node_modules under docs/; scripts to 'vitepress dev/build/preview'; CI docs.yml uses working-directory docs + cache-dependency-path docs/pnpm-lock.yaml.
2026-06-24 16:12:03 +08:00
pnoker 8c0f1b00ac docs: overhaul site with bilingual i18n, mermaid, and expanded guides 2026-06-23 19:34:22 +08:00
pnoker 9aa6a425d8 docs(iot-dc3): refresh multilingual README with sharper AI-native positioning and design principles
- Replace slogan with capability-oriented messaging across en/zh/ja/vi
- Add design principles section (Facade, DO/BO/VO, tenant isolation)
- Add contributors badge
- Fix Japanese blockquote rendering breakage
2026-06-23 14:33:07 +08:00
pnoker 91643afed5 docs: refine x-dc3-ai standard and annotation-rollout specs 2026-06-22 12:08:11 +08:00
Vickey 5131b37568 build(deploy): add postgres/rabbitmq dependency assets and regenerate openapi snapshots 2026-06-19 16:49:01 +08:00
pnoker d66ce3e8e5 docs(mcp): add SP2 x-dc3-ai annotation rollout spec 2026-06-19 07:33:48 +08:00
pnoker 7e103e1db1 refactor(auth): reorganize MCP tool quality mapping and annotation validation 2026-06-19 07:00:49 +08:00
Vickey 1ec51b3aff test(auth): tighten x-dc3-ai proof to annotation conversion only
Remove the misleading hand-built model segment that adds extensions then asserts
the serialized JSON. That pattern proves nothing about swagger-core's annotation
pipeline (you're asserting a map you just inserted by hand).

Keep the focused test: read @Operation annotation via reflection, call
AnnotationsUtils.getExtensions(...) which IS swagger-core's real annotation→map
conversion, and assert both the x-dc3-ai key and its riskLevel=HIGH content.

End-to-end emission into /v3/api-docs is verified separately (Task 8).
2026-06-19 00:27:52 +08:00
Vickey af7f99c526 docs(mcp): add x-dc3-ai standard and parse-pipeline spec and plan 2026-06-19 00:16:10 +08:00
pnoker cba2d54780 docs: align Make command references with new compose shortcuts
Update READMEs, guides, USAGE and the stack-test skill to use the
up-<stack>[-<registry>] targets in place of the removed dev-* commands.
2026-06-18 18:42:28 +08:00
pnoker 35d985e2f3 build: add compose shortcut targets and drop commit-msg lint hook
Generate <op>-<stack>[-<registry>] compose shortcuts and test/coverage
targets in the Makefile, remove the install-hooks target and the
.githooks commit-msg linter, and document the design.
2026-06-18 18:42:20 +08:00
Vickey cc29d53904 docs: mark identity and mcp design proposals as landed
- update identity-principal-service-account design to reflect implemented behavior
- align mcp-server design with authoritative implementation details
2026-06-18 14:06:12 +08:00
pnoker 0feba780ee feat: update pom version 2026-06-13 11:15:32 +08:00
pnoker 7dacc47056 docs(auth): document principal and mcp architecture
Update auth, gateway, architecture, quickstart, changelog, and superpowers design documents for the Principal identity model and OAuth-backed MCP server.
2026-06-12 21:20:41 +08:00
pnoker 2d255c18be feat: add yuce docs 2026-06-12 11:26:23 +08:00
pnoker 1811d4f8ff fix: support reactive wildcard permissions 2026-06-12 11:26:23 +08:00
pnoker f75003b030 docs(design): add Gateway MCP server design proposal
- Add mcp-server.md: full design for exposing OpenAPI interfaces as MCP
  tools through the gateway, covering architecture, database model,
  permission control (reusing dc3_resource/dc3_role_resource_bind),
  HTTP vs gRPC analysis, dynamic tool refresh, and observability
- Register MCP Service in VitePress sidebar config
- Add entry to design index page
2026-06-12 02:07:43 +08:00
pnoker b674385904 docs: update documentation and README
Refresh architecture, development, operations, and quickstart docs.
Update multi-language README files.
2026-06-11 00:31:34 +08:00
Vickey 69e5fbe0ac docs: restructure documentation and archive engineering notes
Separate the public docs (how to understand, deploy, and use IoT DC3) from
engineering material (design drafts, analyses, roadmaps, legacy operation
screenshots):

- add an internal archive area with its own nav, grouping design,
  analysis, strategy, backlog, and legacy-operation sections
- migrate design, operation (data/device/driver/template), analyses, and
  todo notes into the archive, preserving history
- refresh public docs: README (en/zh/ja/vi), operation guides
  (agentic/concepts/data-commands/device-onboarding), architecture,
  development, guide, quickstart, and modules
- promote the project overview to README.ai.md at the repo root
2026-06-09 18:15:04 +08:00
Vickey 8a2a87f96c docs(openapi): add API documentation guide, export tooling, and conventions
- Add docs/development/api-documentation.md describing the Swagger UI layout,
  per-center grouping, auth headers, and production exposure.
- Add a `make openapi` target + dc3/bin/export_openapi.sh to snapshot each
  center's OpenAPI JSON from a running stack.
- Update AGENTS.md: OpenAPI/Swagger conventions, and correct the enum-suffix
  examples (multi-valued sets use *TypeEnum, not *FlagEnum).
2026-06-09 15:52:46 +08:00
pnoker 55605d66a9 docs: update project documentation and guidance files 2026-06-05 22:41:02 +08:00
Vickey 27bcf1383b fix: address code review — security, thread safety, performance, and null safety
Security (CRITICAL):
- KeyUtil: read JWT signing key from DC3_SECURITY_KEY env/property
- UserPasswordServiceImpl: read default password from DC3_SECURITY_DEFAULT_PASSWORD env
- KeyLoader: read OPC-UA keystore password from OPCUA_KEYSTORE_PASSWORD env
- WebFilterConfig: return 401 on malformed X-Auth-User header
- AlgorithmConstant: document deprecated hardcoded constants

Thread safety (HIGH):
- Fix TOCTOU races in 4 driver connectors (computeIfAbsent)
- Fix PlcS7 lock leak, OpcUa connect timeout (5s)
- CoapClientManager: synchronize setURI to prevent URI race
- PointValueJob, MqttScheduleJob: add @DisallowConcurrentExecution
- SystemHealthServiceImpl: preserve interrupt flag
- WindowSampleBuffer: local AtomicInteger → int

Performance (MEDIUM):
- EntityStateExpiryScanner: batch alarm saves (saveBatch)
- ImportDeviceServiceImpl: batch config saves
- ResourceRegistrySyncServiceImpl: batch-load nodes, eliminate N+1 COUNTs
- DriverSenderServiceImpl: debug-gate hot-path logging
- PointServiceImpl: stream().count() → size()

Null safety (LOW):
- RegexUtil: null guards on isName/isPhone/isMail/isPassword/isHost
- HostUtil: null-check getNetworkInterfaces() return
- TimeUtil: log parse failures instead of silent null

Infrastructure:
- Add spring-boot-starter-cache + @EnableCaching CacheConfig
- Replace embedded modbus4j/plc-s7 jars with external Maven dependencies
- Add dc3-driver-modbus-rtu module
2026-05-26 08:40:25 +08:00
Vickey 918b3d5e8e feat: update pom version to 2026.5.22 2026-05-26 00:30:11 +08:00
Vickey d5b6ea6f79 feat: format & style 2026-05-25 21:53:50 +08:00
Vickey dedb03fe74 feat: add command/event attribute configuration system
Introduce CommandAttribute/EventAttribute with config variants:
- REST controllers, MyBatis mappers, services, and DAL managers
- gRPC client/server builders and proto message definitions
- DTOs, BOs, DOs, VOs for type-safe data transfer layer

fix: add explicit ::text casts in json_build_object parameters

PostgreSQL cannot infer parameter types inside json_build_object()
calls. Add ::text casts to #{stateExtType} and #{stateDescription}
to resolve "could not determine data type of parameter $10" errors.

refactor: restructure driver gRPC client and metadata layer

- Rename GrpcStubConfig to DriverClientStubConfig with dedicated DTOs
- Extract attribute builders from inline gRPC conversion logic
- Consolidate driver metadata, register service, and command handling
- Update device state heartbeat and command result event handling

docs: add multilingual architecture diagram and sync READMEs

- Translate architecture SVG into zh, ja, vi variants
- Update README architecture image references per language
- Add missing service-level shortcut sections to ja/vi READMEs
2026-05-25 00:00:00 +08:00
Vickey fd3af64634 feat: add layered architecture diagram and reposition project narrative
- Add IoT DC3 layered architecture diagram (SVG + HTML viewer)
  with Application / Management / Data / Driver layers,
  Security & Load and Platform & System sidebars,
  Data→Driver connection flows, and color-coded sections
- Reposition README descriptions across all languages (en, zh, ja, vi)
  and pom.xml to AI-ready narrative: "Connects devices, collects
  data organized for AI, and orchestrates the closed loop"
- Add README.ai.md with Chinese multi-paragraph AI narrative
  and closed-loop flowchart
- Optimize package.json metadata (name, license, scripts)
2026-05-24 13:35:57 +08:00
Vickey b5ab016cab chore: format MyBatis XML headers, SQL indentation and docs tables 2026-05-24 01:35:12 +08:00
pnoker f0d0c7913c feat: add event alarm trigger, E2E contract tests, and docs
Add EVENT target type to AlarmTargetTypeFlagEnum, wire event report
into the alarm rule pipeline, add RabbitMQ contract E2E tests for
command call and event report, and create design documentation.
2026-05-23 19:16:01 +08:00
Vickey e8b2eb908b docs: mark Phase 1 device-profile single-ownership tasks as done 2026-05-23 17:16:16 +08:00
Vickey 84a33daef4 docs: mark Phase 1 (Device↔Profile 1:1) as done 2026-05-23 15:12:52 +08:00
Vickey cf2ffb0194 docs: update thing-model design with Phase 1 implementation plan 2026-05-23 08:20:48 +08:00
Vickey c6b70c1665 docs: update point-command.md status to reflect P0-P3 implementation
Correct stale [TODO] markers in §0, §1.3, §3, §4.1, §4.5, §4.7
to [DONE] matching the actual code delivered.
2026-05-22 23:49:10 +08:00
Vickey c556c6a0b8 feat: complete point command P0-P2 rebuild — DTO, lock, validation, API
P0: Replace content JSON-string with sealed PointCommandPayload + record DTOs.
P0: Accept write() boolean return, suppress echo on failure.
P1: Return commandId from POST endpoints, add RESTful GET /{commandId}.
P1: Add driver-online check via EntityStateMapper, PointCommandValidator.
P2: Add DeviceLockManager for per-device serialized command execution.
P3: Add POST /list API with pagination, commandId idempotency support.
2026-05-22 23:36:38 +08:00