Commit Graph
85 Commits
Author SHA1 Message Date
pnoker f301e41c6e style: apply consistent formatting to docs, config, and root files
Line wrapping, table alignment, blank line consistency across config.mts,
i18n, locale JSONs, FAQ, quickstart, frontend/development guides,
superpowers plans, README variants, and PR template.
2026-06-28 19:57:58 +08:00
pnokerandClaude 2198d7fffe chore: merge iot-dc3-web frontend into monorepo
Merge the standalone iot-dc3-web repository into iot-dc3 as dc3-web/,
creating a single monorepo with unified versioning, CI/CD, and release
process.

- subtree-add iot-dc3-web under dc3-web/ with full commit history
- relocate nginx configs and SSL certs to dc3/dependencies/
- merge CI workflows (ci-backend.yml, ci-web.yml, docker-ci-web.yml)
- merge Issue/PR templates and dependabot config
- host frontend docs under docs/zh/frontend/
- share .husky/ hooks via root-level package.json (pnpm)
- unify versioning: single dc3/bin/tag.sh (vYYYY.M.P) for the whole repo
- update Dockerfile, docker-compose.yml, Makefile for new paths
- remove redundant directories from dc3-web/ (.claude, .github, dc3, docs, bin)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-28 14:43:22 +08:00
pnoker b8d4169e15 test(ci): fix timezone-fragile test and scope coverage check to aggregate job 2026-06-26 20:28:45 +08:00
pnoker 2ba4f73b7d docs: add PR and issue templates 2026-06-26 14:31:34 +08:00
pnoker dd3ee73fb8 ci: drop release branch, rewire triggers to develop/main and v* tags 2026-06-26 14:23:13 +08:00
pnoker 0f0eac8c29 ci: manage docs npm deps via dependabot; scope codeql security-events:write to job level 2026-06-24 19:19:48 +08:00
pnoker 181c947fe7 ci(docs): point pnpm/action-setup at docs/package.json for packageManager 2026-06-24 16:22:01 +08:00
pnoker 2030eab432 ci(docs): build on Node 22 and use packageManager pnpm (fix node:sqlite / pnpm Node>=22.13 requirement) 2026-06-24 16:19:49 +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 c3b7934670 ci(security): audit controller authorization 2026-06-10 20:37:48 +08:00
Vickey 00433f67a4 build: align docs build scripts and CI pnpm version
- add docs:dev/docs:build/docs:preview scripts and refresh the package
  description
- bump CI pnpm to 11.2.2 and build docs via pnpm run build
2026-06-09 18:15:12 +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 14faabedc7 style: apply consistent formatting across GitHub workflows, docs and common modules 2026-05-19 00:15:07 +08:00
Vickey 9e9c1dc2e8 docs(site): switch documentation framework from MkDocs Material to VitePress
The MkDocs Material site felt visually dated. Switch to VitePress to
get a fresher default theme (the same one Vue, Vite, Pinia and
Element Plus use) and align the docs toolchain with the project's
Node ecosystem.

- Replace mkdocs.yml/requirements-docs.txt with package.json
  (pnpm scripts), pinned vitepress 1.5+, and pnpm-lock.yaml.
- Add docs/.vitepress/config.mts: zh-CN, /iot-dc3/ base, cleanUrls,
  per-section sidebars, local search with Chinese UI strings, edit
  link, light/dark theme labels in Chinese.
- Rewrite docs/index.md as layout: home with hero, six feature
  cards, and platform/architecture/license blocks underneath.
- docs/assets/ -> docs/public/ rename (VitePress static-asset
  convention). This rename was already absorbed by an unrelated
  upstream commit; only the architecture page reference is updated
  to /images/architecture-cn.png.
- Convert MkDocs snippets to VitePress <!--@include:-->:
  - community/{contributing,code-of-conduct,security} pull repo-root
    governance files,
  - development/changelog and guide/usage pull the docker-ci-
    referenced dc3/doc/{CHANGE,USAGE}.md.
- Wrap R<T> in inline code in architecture/modules.md so the Vue
  parser does not treat it as an unclosed HTML tag.
- Rewrite .github/workflows/docs.yml: pnpm/action-setup@v4 +
  setup-node@v4 (pnpm cache) + pnpm install --frozen-lockfile +
  pnpm docs:build + upload-pages-artifact (docs/.vitepress/dist)
  + deploy-pages. Trigger paths include docs/, package.json,
  pnpm-lock.yaml, governance files, and the two dc3/doc/ files
  referenced via include.
- Update .gitignore: drop /site/ and the Python-only venv entries,
  add docs/.vitepress/{cache,dist}/ and a Node/pnpm section.
- Adjust dc3/doc/README.md wording to mention VitePress include
  syntax instead of MkDocs snippets.

Verification: pnpm install + pnpm docs:build pass locally (5.44s);
the include-based pages (community/contributing, development/
changelog, guide/usage) render content from their source files; all
per-section sidebars resolve.
2026-05-18 19:53:58 +08:00
pnoker bca6d7aedc docs(site): scaffold MkDocs Material documentation site with GitHub Pages CI
Set up an end-to-end documentation site so contributors and users have
a unified, searchable, and publishable entry point for project docs.

- Add mkdocs.yml: Chinese-first language, light/dark palette, tabbed
  navigation, indexed sections, glightbox for diagrams, and
  pymdownx.snippets so community pages can pull from root governance
  files (CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md) without
  duplicating content.
- Add requirements-docs.txt pinning mkdocs-material and
  mkdocs-glightbox.
- Build the docs/ skeleton: index, quickstart, guide, architecture,
  development, modules, community. Migrate the seven generic manuals
  from dc3/doc/ (QUICKSTART, ENVIRONMENT, LOGGING, TROUBLESHOOTING,
  MODULES, DRIVER-AUTHORING, TESTING) and rewire their cross-doc
  links. CHANGE.md, TITLE.md, and USAGE.md stay in dc3/doc/ because
  docker-ci.yml depends on them; the docs site references them via
  mkdocs snippets to keep a single source of truth.
- Add .github/workflows/docs.yml that builds with --strict on push to
  release and deploys via actions/deploy-pages.
- Rewrite dc3/doc/README.md as a migration pointer to the new site
  and to the three retained release-flow files.

Verification: mkdocs build --strict passes locally; snippets render
correctly; GitHub Pages already enabled in workflow mode via gh api.
2026-05-18 18:36:00 +08:00
pnoker 1dd6599999 ci: move Maven build into Docker BuildKit builder stage
Remove host-side JDK setup and Maven build step from the CI workflow.
The unified Dockerfile now handles Maven build internally via BuildKit
caching, so the runner only needs Docker.
2026-05-17 19:02:12 +08:00
pnoker 9123b480f4 test(e2e): stabilize infrastructure harness 2026-05-14 21:29:08 +08:00
Vickey efd26c645b ci: add unit, integration and e2e workflows with makefile targets
Wire the test toolchain into developer-facing entry points and CI:

- Makefile gains test, test-it, test-e2e and coverage targets; the help
  banner advertises them alongside the existing build commands so
  contributors do not need to memorise the underlying mvn invocations.
- A new Test workflow runs three sequenced jobs: unit (mvn test, skipping
  the integration phase), integration (mvn verify, skipping unit phase,
  running with TESTCONTAINERS_REUSE_ENABLE=true), and a final coverage
  job that downloads both jacoco .exec artifacts and rebuilds the
  aggregate report from dc3-coverage.
- A new E2E workflow runs make test-e2e on develop/release/main pushes
  and on manual dispatch, with a 90 minute timeout that accommodates
  cold compose start-up plus the full critical path battery.
- The existing CI workflow keeps its fast-fail compile job unchanged so
  PR feedback latency stays low; tests are now owned exclusively by
  the new Test workflow.
2026-05-13 13:08:28 +08:00
Vickey 469d290631 revert(ci): restore custom CodeQL workflow 2026-05-10 09:38:05 +08:00
Vickey cbcbbe6bc4 chore(ci): remove custom CodeQL workflow in favor of default setup
The repository has default CodeQL enabled in GitHub settings, which
conflicts with an advanced configuration workflow and causes SARIF
upload failures.
2026-05-10 09:36:22 +08:00
pnoker 7d68495f3a ci: add security quality checks 2026-05-09 20:00:40 +08:00
pnoker 57f4512b21 ci: harden github workflows 2026-05-09 18:57:30 +08:00
pnoker a45f2f5ec1 fix(container): include agentic compose service 2026-05-09 18:49:52 +08:00
pnoker b0176bd9a1 fix: downgrade JDK version from 25 to 21 in Dockerfile and related configurations 2026-04-29 16:26:24 +08:00
pnoker c5a9feeeb9 feat: add .env file for Docker Compose configuration and update usage instructions 2026-04-29 10:27:57 +08:00
pnoker ea17c86387 chore: update version to 2026.4.19 across all modules and adjust branch settings in codeql.yml 2026-04-19 13:45:21 +08:00
pnoker d102e18b00 chore: fix inceptionYear and scm connection in all pom.xml
- Fix <inceptionYear> from '2016-2022' to '2016' in 20 pom.xml files
- Fix <scm> connection/developerConnection to use scm:git: prefix in 22 pom.xml files
2026-04-18 01:31:07 +08:00
zzi666 d4d379a17a refactor: standardize and translate comments across driver modules for consistency and clarity 2025-10-28 15:45:52 +08:00
Vickey de6a29d5a9 feat: update docker-ci.yml 2025-10-05 17:22:49 +08:00
Vickey 106096249c build: upgrade base image references to dc3-jdk:2025.9 and fix codeql.yml matrix indentation 2025-09-11 16:53:42 +08:00
pnoker bd83f0574b ci: add CodeQL workflow for actions and java-kotlin analysis 2025-09-10 19:13:49 +08:00
Vickey c4283a5f42 ci: fix bilingual release notes layout in docker-ci workflow 2025-08-30 15:44:42 +08:00
Vickey c1f78f5706 ci: add bilingual collapsible sections to GitHub release notes output 2025-08-30 15:27:17 +08:00
Vickey 19d7c64794 ci: add docker-ci workflow with release notes generation and GitHub release step 2025-08-30 15:00:35 +08:00
Vickey 5e6a169ca4 ci: fix yaml indentation for maven build and docker steps in docker-ci workflow 2025-08-30 14:29:41 +08:00
Vickey e14edec817 ci: switch workflow trigger branch pattern to dc3.release.* 2025-08-30 14:24:04 +08:00
Vickey 7d369d4408 ci: reorganize workflow step indentation and move doc files to dc3/doc directory 2025-08-30 14:23:04 +08:00
pnoker 39ab355fe3 docs(ci): add architecture image to release TITLE.md 2025-08-29 17:02:00 +08:00
pnoker fdb7474975 docs(ci): change release title from h1 to h2 in TITLE.md 2025-08-29 17:00:51 +08:00
pnoker af99c8a9e3 docs(ci): simplify release title heading level in TITLE.md 2025-08-29 16:59:40 +08:00
pnoker a01a90f7b4 ci: add github actions workflow title documentation 2025-08-29 16:24:38 +08:00
pnoker 12b82efbaf ci: remove inline release notes generation from docker-ci workflow 2025-08-27 17:41:21 +08:00
pnoker d154247cc7 docs(ci): update workflow changelog 2025-08-27 17:39:30 +08:00
pnoker 66230917b1 docs(ci): update workflow changelog 2025-08-27 17:38:33 +08:00
pnoker 4d4fca9024 ci: expand usage documentation for docker-ci workflow 2025-08-27 17:36:14 +08:00
pnoker 9b9a470182 docs(ci): update workflow changelog entries 2025-08-27 17:17:57 +08:00
pnoker 1a0254602c ci: add initial changelog file for github actions workflows 2025-08-27 17:13:19 +08:00
pnoker b41bf5b266 ci: remove inline usage/quick-start section from docker-ci release notes 2025-08-27 17:04:32 +08:00
pnoker fb10774b4d ci: add usage documentation for docker-ci workflow 2025-08-27 17:01:29 +08:00
Vickey b868cfc5e2 ci: change docker workflow trigger tag from dc3.develop.* to dc3.release.* 2025-08-24 01:28:12 +08:00