79 Commits
Author SHA1 Message Date
pnoker 2d565f4a2d fix(deploy): require deployment-specific secrets everywhere
the historical defaults dc3.security.key.2026.io.github.pnoker and
io.github.pnoker.dc3 are public in this repository, so any deployment
that never overrode them shipped a known hmac signing key

- app/scale/swarm compose: fail fast (${var:?}) when dc3_security_key
  or auth_hmac_secret is unset; dev compose keeps a clearly-marked
  dev-only default
- helm production/default values and k8s secret.env ship empty values:
  pre/pro startup rejects blank and known-default hmac keys, forcing
  --set-string or an existingsecret; document the per-key failure mode
  honestly instead of overpromising startup rejection for both
- dev env files: rotate both keys to machine-generated dev-only values
  and add throwaway rs256 material for local oauth flows
- fix the chart maintainer email to a syntactically valid address
2026-09-18 09:48:54 +08:00
pnoker 72e315ea96 style(db): normalize initdb formatting and order ddl before seeds
Join 1242 keyword-split statement lines (COMMENT/CREATE/ALTER/LOAD), move the dc3_identity_audit_log table section and the schema fingerprint INSERT so every script orders DDL before seed data, and drop one duplicated COMMENT ON COLUMN. Statement multiset verified identical apart from the intended dedup. The canonical fingerprint changes to e81e3562... and is synchronized via schema_fingerprint.py --sync into the embedded ddl_hash and all four distribution points; existing initialized databases require re-initialization (flag day).
2026-09-03 09:02:47 +08:00
pnoker 66aab58f20 build: standardize repository tooling and quality gates 2026-09-02 20:51:10 +08:00
pnoker eae86b58fc refactor(storage)!: unify platform persistence on reactive postgresql
- migrate auth, manager, data, and agentic persistence to R2DBC
- hard cut pagination, facade, gateway, web, and CLI contracts
- remove legacy database and TSDB adapters and document validation gates

BREAKING CHANGE: platform persistence now requires PostgreSQL 18 with TimescaleDB and the new reactive API contracts.
2026-09-01 22:03:16 +08:00
pnoker 865e6352f0 feat(gateway): expose oauth flag via compose; keep legacy header ctor
- gateway container env passes DC3_GATEWAY_OAUTH_ENABLED/JWKS_URL so
  deployments can turn RS256 verification on without image changes
- PrincipalHeader regains a 7-arg constructor delegating scopes=null,
  keeping ~15 existing call sites compiling against the new field
2026-09-01 22:03:15 +08:00
pnoker 11640cf6ac build: deploy dc3-db artifacts and document store selection env
- include dc3-db in the make deploy artifact set alongside common/mq/tsdb
- sample DC3_DB_TYPE/DC3_TSDB_TYPE and external-store ports in .env.example
- expose mysql/mariadb/tdengine/influxdb/iotdb/jaeger in the compose stacks
- update AGENTS.md module map and module-ownership guidance
- add the missing AGPL header to the oracle driver service
2026-08-25 19:27:57 +08:00
pnoker 3c19f31652 feat(deploy): ship all 36 drivers and isolate their SQLite outboxes
- add ble, can, dlt645, dnp3, iec61850, kafka, knx, lorawan, mbus, redis, and zigbee to the k8s driver list, kustomization, helm values, and compose service stacks
- regenerate k8s driver deployments and preserve the listening-virtual ports in the generator
- replace the per-driver named volumes with one shared driver_data volume isolated by mount path, matching the scale/swarm stacks
- correct scaling docs: compose scale/swarm drivers stay at one replica because replicas would share one SQLite outbox file
2026-08-25 12:06:22 +08:00
pnoker 956de3dd38 feat(driver)!: enforce lease-fenced durable telemetry
Use PostgreSQL leases and fencing for distributed ownership, require a durable SQLite outbox before RabbitMQ publication, and make Data Center ingestion transactional and idempotent.

BREAKING CHANGE: drivers require mandatory durable outbox configuration and use lease-aware ownership and telemetry contracts.
2026-08-18 00:50:57 +08:00
pnoker def5c34378 build(driver): register eight new drivers in pom dockerfile and compose 2026-08-17 20:11:19 +08:00
pnoker 7bf615b3b1 feat(driver): configure driver buffer and mount container volume
28 driver application.yml add dc3.driver.buffer; Dockerfile each stage adds dc3/data dir and VOLUME; docker-compose main/dev add driver_data named volume
2026-07-26 00:13:31 +08:00
Henry Zhang 72a5fceac0 chore: consolidate CI, docs, and issue templates (#99)
* ci(dependabot): add cargo ecosystem, groups, and clean up stale docker directories

* docs(ai): add spring-ai-deep-dive cross-references in en and zh indexes

* docs(community): add english FAQ and frontend developer guide

* chore(issue-templates): translate all templates to english

* ci(docker): add 20 missing driver images to Dockerfile, compose, and Makefile

* fix(docs): remove Vue template syntax from panorama SVGs so they render

* docs(ai): add spring-ai-deep-dive pages in en and zh
2026-06-28 23:42:04 +08:00
Vickey 5131b37568 build(deploy): add postgres/rabbitmq dependency assets and regenerate openapi snapshots 2026-06-19 16:49:01 +08:00
pnoker 1811d4f8ff fix: support reactive wildcard permissions 2026-06-12 11:26:23 +08:00
pnoker ec68f0cb7c feat(rabbitmq): expose tls configuration 2026-06-11 18:03:30 +08:00
pnoker 7a2cc9b8fa chore(compose): streamline environment defaults 2026-06-11 15:04:01 +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
pnoker cb423056c7 security(auth): enable HMAC gateway-to-service signing by default
Set AUTH_HMAC_SECRET default to "io.github.pnoker.dc3" across .env
templates, compose files, and Java config properties so that X-Auth-User
header signing is active out of the box without manual configuration.
2026-05-19 23:15:34 +08:00
pnoker b9b2a47732 feat(docker): add web frontend and consolidate compose stacks
Add dc3-web frontend service to docker-compose.yml with nginx reverse
proxy as the sole user-facing entry point. Remove backend port mappings
since web now proxies to gateway.

Merge docker-compose-elasticsearch.yml and docker-compose-grafana.yml
into a single docker-compose-optional.yml that includes EMQX, ELK+APM,
and Prometheus+Grafana stacks.
2026-05-17 19:02:52 +08:00
pnoker 7847bffbd8 fix(agentic): preserve reasoning through tool loop 2026-05-17 00:59:46 +08:00
pnoker 285ed9273f feat(agentic): configure fallback provider and profile activation 2026-05-11 18:57:53 +08:00
pnoker d65fc715ff build(deploy): add agentic memory and tool-calling env variables to docker-compose
Expose AGENTIC_MEMORY_ENABLED, AGENTIC_TOOL_CALLING_ENABLED,
AGENTIC_MEMORY_MAX_MESSAGES, and AGENTIC_ATTACHMENT_STORAGE_PATH
in development and production compose files, with defaults in dev.env.

Also mark OpenAI base-url config as deprecated in application-agentic.yml.
2026-05-11 00:44:44 +08:00
Vickey 9d7e238eb1 refactor(config): update default AI model to deepseek-v4-flash and agentic env variables 2026-05-10 21:43:58 +08:00
Vickey 0e92643d54 feat(config): add AUTH_HMAC_SECRET to all deployment configurations
The HMAC signing feature was dormant because no deployment config
set the shared secret. Add AUTH_HMAC_SECRET to .env.example, dev
env files, both compose stacks (all 12 services), and document it
in ENVIRONMENT.md.
2026-05-10 01:48:51 +08:00
pnoker 6cf9b43c30 docs(env): align runtime environment variables 2026-05-09 20:14:16 +08:00
pnoker 8fa1f0c152 refactor(container): deduplicate aliyun compose stacks 2026-05-09 18:49:52 +08:00
pnoker a45f2f5ec1 fix(container): include agentic compose service 2026-05-09 18:49:52 +08:00
pnoker ca38651909 feat: add .env file for Docker Compose configuration and update usage instructions 2026-04-21 01:11:59 +08:00
pnoker e33dcc1573 fix: update Docker images to version 2026.5 across all docker-compose files 2026-04-20 03:16:30 +08:00
Vickey a9e8d05631 feat: update version 2025-10-05 17:16:37 +08:00
Vickey 7302107c56 chore: bump all module versions to 2025.9.2 2025-09-11 17:02:24 +08:00
Vickey 2051d42847 refactor(common): remove hutool dependency and replace usages with native utilities 2025-09-11 14:57:02 +08:00
Vickey 8cc7365293 build: bump all module versions to 2025.6.6 and update compose image tags 2025-08-26 22:38:53 +08:00
Vickey 64c6f911fe chore: replace Apache-2.0 license headers with AGPL-3.0 in compose files and gateway config 2025-08-26 22:03:42 +08:00
Vickey f415207088 build: bump project version to 2025.6.5 across all modules 2025-07-15 14:58:51 +08:00
Vickey 31a6a275ed build: bump project version to 2025.6.4 across all modules 2025-07-15 12:01:43 +08:00
Vickey 886b212793 build: bump project version to 2025.6.1 across all modules 2025-06-21 16:21:18 +08:00
Vickey 877be41317 build: bump project version to 2025.6.0 and remove unused job/register dependencies 2025-06-09 15:48:22 +08:00
Vickey 6898041ab5 feat(docker): add APM agent env vars and dc3-apm service to all Dockerfiles and compose files 2025-05-06 21:19:03 +08:00
Vickey b01412f460 chore(docker): change NODE_ENV from dev to test in all Dockerfiles and compose files 2025-05-06 16:55:20 +08:00
Vickey a0ed920ba2 feat(compose): split db stack into docker-compose-db.yml and expand dev/aliyun services 2025-05-06 01:11:46 +08:00
pnoker 083a7e748c chore(docker): standardize string quotes and add new compose files
Standardized the use of double quotes in docker-compose files for consistency. Added new docker-compose files for optional and Aliyun configurations to support different deployment environments.
2025-04-25 20:46:30 +08:00
pnoker 43e78d6a40 build(compose): add Aliyun mirror compose files for dev and grafana stacks 2025-04-21 19:19:08 +08:00
Vickey 3bd3717bac build(docker): bump base image version in all Dockerfiles and slim docker-compose.yml 2025-03-05 01:13:36 +08:00
Vickey 0f13d020b0 feat(compose): add docker-compose-grafana.yml with full Grafana service definition 2025-02-09 13:38:47 +08:00
zzi666 4d5e7e166a refactor(driver): rename attribute config fields and clean up attribute builders 2025-02-07 01:33:14 +08:00
pnoker 722b6e396a refactor(common): switch MybatisGenerator datasource to postgres and extend GroupBO fields 2024-12-09 12:23:24 +08:00
pnoker 559d78fa78 fix(config): fix postgres JDBC URL connection params and add missing default constants 2024-12-09 11:48:24 +08:00
pnoker 834a30bf86 feat(common): add postgres datasource support to auth MybatisGenerator 2024-12-05 11:09:10 +08:00
pnoker 198820c2ec feat(dc3): extend docker-compose-dev with additional services and port mappings 2024-12-04 21:10:50 +08:00
pnoker 9faa287480 build: restructure Dockerfiles and compose files for all services 2024-12-04 19:49:38 +08:00