336 Commits
Author SHA1 Message Date
pnoker 12dded2225 chore(repo): clear the remaining third-party boot warnings
- springdoc: declare api-docs/swagger-ui enabled explicitly; the boot
  reminder only fires on unset properties, so the intent-declaring
  values keep behavior identical and quiet all six services
- netty: add the macos dns native resolver to the gateway so the
  resolver does not log an error at boot on mac dev machines (the
  no-classifier jar bundles every arch and is inert on linux)
- hibernate-validator HV000271: spring-cloud-gateway 4.3.0 still uses
  container-level @Valid on its List properties. logger-level rules
  cannot suppress it because spring boot's logging re-init installs a
  second loggercontext that resets them, so drop the exact message
  with a turbo filter attached to every context loading this config;
  the class documents the upstream trigger for removal

live verification: five services plus gateway boot with zero warn and
zero error lines, virtual driver included; salt/login probe 200
2026-09-18 18:02:11 +08:00
pnoker 83fe17bd28 fix(gateway): exclude load-balancer autoconfiguration noise
reactiveloadbalancer is intentionally absent from the gateway; loading
the no-load-balancer-client autoconfiguration only emits a
typenotpresent introspection warning at boot
2026-09-18 09:49:25 +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 1fa2d6f0cf docs(comments): fill the real comment gaps across the repository
A comment-health audit driven by an AST scanner (regex scanners kept
false-positiving on annotation-separated javadoc; the AST pass with
constructor and @Override-implementation exemptions is what produced a
trustworthy worklist) ended with a much smaller true gap than the raw
numbers suggested: class-level javadoc is already at 100% repository-wide.

What actually gets filled here:

- AnalyticsModel: all 30 nested records of the S19 analytics facet get
  maintainer-voice javadoc (the @Schema descriptions serve the API side;
  these serve code readers).
- The whole entity/ext family (29 files, 47 nested classes): every
  Content/Ui/Validation/Security/AppliesTo/Template/Dedup/... schema
  class states what it actually holds — read from the fields, not
  templated.
- Adapter families: the @Bean methods of all six MQ adapters, all four
  TSDB adapters and the three DB dialect adapters get one-line
  maintainer docs (what binds to what, what is overridable).
- Nested support types across data/agentic/constant/public/facade:
  NotifyBindKey, CacheTuning, Credential, dashboard VOs' Item/BucketVO,
  ExpireListener (plus its null-doc placeholder javadoc replaced with a
  real contract), agentic chat/stream VOs' choice/delta/usage shapes,
  tool-context records, RequestHeader envelopes, FleetSummary,
  visualization Type/Scale codes.
- PointValueSampleConverter's boundary methods now state the port-side
  contract (quality default injection point, batch order preservation).

Comment drift fixed: the class javadoc of the can/mqtt/opc-da driver
skeletons claimed "see TODO markers in method bodies" — those markers
do not exist; the claims are corrected to plain work-in-progress notes.
The genuine TODOs (zigbee API verification, lwm2m lookup, ethernet-ip
CIP framing, CAN JNI) stay: they mark real unimplemented behavior.

Vendored-code boundary: the opc-da module carries a ported
org.openscada library (46 files, package org.openscada.*). Its trivial
accessors stay bare on purpose — filler comments on get/set pairs are
exactly the kind of noise this pass exists to remove — but the
non-obvious JIStruct wire-decoder methods (getStruct/fromStruct
FILETIME + three DO wrappers) now document the COM bridge shape.

Gates: full-repo compile green; data/model/constant/agentic/public
test suites green.
2026-08-24 21:23:39 +08:00
pnoker 51f0efd2d9 style(javadoc): document non-override public methods 2026-08-19 00:05:58 +08:00
hongyuan.zhang 6b37cb5ccd docs(readme): refresh module documentation 2026-08-11 22:58:30 +08:00
pnoker 50c6de9438 docs: rewrap project guides and README files
Prose rewrapping and table reflow from a project-wide markdown pass;
no content changes. Also reverts two formatter mistakes: restores
MD5(password) in dc3-web/AGENTS.md and drops spurious spaces after
CJK punctuation in README.zh.md / README.ja.md.

Covers root guides (AGENTS/CONTRIBUTING/SECURITY/README.*), module
READMEs across dc3-api/center/common/driver/e2e/gateway, the nginx
guide, dc3/doc/{README,TITLE}.md, and dc3-web docs.
2026-08-09 18:44:55 +08:00
pnokerandClaude fe28d41803 refactor(config): drop redundant YAML blocks covered by shared profile bases
Remove configuration duplicated verbatim by the auto-activated shared profile bases: the dc3-center-manager gRPC channel in several drivers, the management.* block in center/gateway services, the gateway swagger-ui.path, duplicate logging sub-packages, and dead dc3.driver.mqtt config in dc3-center-data (no dc3-common-mqtt dependency). spring.env/spring.group are kept (consumed by RabbitmqEnvironmentConfig/WebFluxSecurityConfig/HmacAuthConfig). Effective configuration unchanged; validated via YAML parse + Maven process-resources.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-16 19:45:16 +08:00
pnoker d18bf4d03d style: fix table alignment and whitespace in README files 2026-06-26 13:17:38 +08:00
pnoker a8ba610df3 docs(gateway): correct routing table and service addressing
Replace the non-existent ekuiper route with agentic, add the OAuth2/MCP
routes, and describe static addressing (no Nacos) and the actual profile
configuration.
2026-06-22 16:49:18 +08:00
pnoker 51a3847205 feat(openapi): wire up springdoc OpenAPI docs and fix security chain loading
Make the REST API documentation actually reachable end-to-end:

- Upgrade springdoc to 3.0.3 (Spring Boot 4 / Spring Framework 7 compatible)
  and pin swagger-core 2.2.47 to resolve the Spring AI conflict.
- Register SpringDocConfig and WebFluxSecurityConfig as @AutoConfiguration so
  they load (they sit in io.github.pnoker.common.config, which centers do not
  component-scan); add the global OpenAPI info + X-Auth security schemes.
- Add per-module GroupedOpenApi beans (auth/manager/data/agentic) and gateway
  aggregation routes + swagger-ui.urls for a single federated Swagger UI.
- Fix the security chain: guard WebFluxSecurityConfig off the gateway, supply a
  permissive default PermissionProvider, register the @perm bean, and correct
  the token-path whitelist (base-path is stripped before the chain).
- Whitelist doc paths; disable docs in the production profile.
- Register swagger-ui webjar resources (default static mappings are disabled).
2026-06-09 15:49:54 +08:00
Vickey 918b3d5e8e feat: update pom version to 2026.5.22 2026-05-26 00:30:11 +08:00
pnoker 5a3ab1440a test: improve backend test coverage governance 2026-05-19 18:19:12 +08:00
pnoker 7f5da1a0f8 chore: bump version to 2026.5.18 across all modules 2026-05-18 00:24:22 +08:00
pnoker 994ccba991 docs: update READMEs and project documentation
Refresh module READMEs, AGENTS.md, CONTRIBUTING.md, and dc3/doc/
guides to reflect the unified Dockerfile, consolidated compose stacks,
and updated build instructions.
2026-05-17 19:03:21 +08:00
pnoker 105c63603e build: consolidate per-service Dockerfiles into unified multi-target build
Replace 14 individual Dockerfiles with a single unified Dockerfile at
the repo root using multi-stage BuildKit targets. Maven build runs
inside the builder stage so no host JDK is required.
2026-05-17 19:02:03 +08:00
pnoker 996518186a build: bump version to 2026.5.17
Update parent version and dc3.version from 2026.5.5 to 2026.5.17
across all Maven modules.
2026-05-17 19:01:44 +08:00
pnoker 7c853ac8bc chore: correct @since tag to project inception date
Update @since from 2022.1.0 to 2016.10.1 and @version from 2026.5.5
to 2026.5.17 across all Java source files to reflect the actual
project start date.
2026-05-17 19:01:28 +08:00
Vickey c18427bf7e refactor(config): use per-service port variables from .env.example
Replace shared SERVER_PORT/GRPC_SERVER_PORT with per-service
DC3_GATEWAY_PORT, DC3_AUTH_PORT, DC3_AUTH_GRPC_PORT, etc. in
application.yml and Dockerfiles. Prevents port conflicts when
loading the same env file for multiple local services.
2026-05-10 01:49:05 +08:00
pnoker e47299a327 chore: remove format and format-check targets from Makefile 2026-05-07 23:55:32 +08:00
pnoker db456d61fe style: apply spring-javaformat 0.0.47 and fix checkstyle violations
- Apply Spring Java Format to all 1087 Java source files
- Fix star imports (java.lang.annotation, org.quartz, java.util.concurrent, etc.)
- Fix missing trailing newlines across codebase
- Fix redundant public modifiers on interface methods
- Fix multiple variable declarations
- Fix if-statements missing braces in JsonUtil, RegexUtil, RequestUtil
2026-05-07 16:53:16 +08:00
pnoker 95c40b2387 chore: bump version to 2026.5.5
Roll every pom, per-module README, Spring banner, and @version /
@since javadoc tag from 2026.4.30 to the new 2026.5.5 release line.
2026-05-05 00:56:09 +08:00
pnoker 30e1b8f5ff chore: remove unused Nacos, eKuiper and LoadBalancer dead config
- Remove eKuiper route from application-gateway.yml (no dc3-center-ekuiper module exists)
- Remove Nacos service discovery config from all pro/pre profiles across
  gateway, auth, data, manager, and single modules (no Nacos dependency in pom)
- Remove Nacos logger entries from logback.xml
- Remove spring-cloud-starter-loadbalancer dependency from dc3-common-gateway pom
  (only needed for lb:// URIs which are no longer used)
2026-05-01 01:38:49 +08:00
pnoker d39553d2dd refactor(gateway): extract shared routes and gRPC config to application-gateway.yml
- Move all route definitions and gRPC channel config into application-gateway.yml
  (loaded via the gateway profile) to eliminate duplication across environments
- Route URIs use ${GATEWAY_ROUTE_*_URI} env variables with http:// defaults
- dev/test profiles: only contain environment-specific logging settings
- pro/pre profiles: only contain Nacos service discovery configuration
- Reduces 4 profile files from ~55 lines each to ~15 lines, net -132 lines
2026-05-01 01:26:25 +08:00
pnoker 84a5758fc5 fix(gateway): clean up dead code, invalid config, and improve error handling
1. Convert GatewayInitRunner from empty ApplicationRunner to @Configuration,
   remove duplicate registration from spring.factories (kept in AutoConfiguration.imports)
2. Remove invalid server.servlet.context-path from application.yml (WebFlux ignores it)
3. Separate error responses: UnAuthorizedException → 401, unexpected errors → 500
4. Wrap JsonUtil.parseObject in checkValid with try-catch to handle malformed token
2026-05-01 01:11:24 +08:00
pnoker 652f01763b feat: add API management endpoint and enhance auth query capabilities
- Add ApiController for API CRUD operations
- Add API_URL_PREFIX constant to AuthConstant
- Enhance ApiServiceImpl.fuzzyQuery with apiCode, serviceName, apiTypeFlag,
  enableFlag and null-safe tenantId conditions
- Add enableFlag field to UserQuery and UserServiceImpl.fuzzyQuery
- Add /api/v3/auth/api/** route to all gateway environment configs
2026-05-01 00:51:40 +08:00
Vickey 2141322897 feat: enhance query conditions to check for tenantId and add Resource, Role, and RoleUser controllers 2026-04-30 17:05:52 +08:00
Vickey 200beeaa71 chore: update version to 2026.4.30 in multiple files 2026-04-30 16:06:30 +08:00
pnoker a38ec90601 feat: add gRPC client configuration and exception handling for ResponseStatusException 2026-04-29 19:02:37 +08:00
pnoker 1a52a12b23 fix: downgrade JRE version in Dockerfile from 25 to 21 2026-04-29 16:25:23 +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 dfc43149be feat(gateway): migrate auth filter chain to Facade and trim dependencies
FilterService previously exposed raw gRPC DTOs (GrpcRTenantDTO,
GrpcRUserLoginDTO) on its interface, leaking protocol into the gateway
filter. This commit:

- Reshapes FilterService signatures to return facade BOs (FacadeTenantBO,
  FacadeUserLoginBO) and renames methods for consistency
  (getTenantDTO -> getTenant, getLoginDTO -> getUserLogin, getUserDTO -> getUser)
- Rewrites FilterServiceImpl to inject Tenant/User/UserLogin/TokenFacade
  instead of four @GrpcClient stubs; TokenFacade returns a plain boolean
- Updates AuthenticGatewayFilter to use the new types
- Drops dc3-api-auth and grpc-client-spring-boot-starter from
  dc3-common-gateway (no longer directly referenced); facade-grpc brings
  them in transitively when gateway app runs in grpc mode
- dc3-gateway declares facade-grpc and pins dc3.facade.mode=grpc
2026-04-27 19:46:44 +08:00
pnoker e87cff607e fix: correct JAVA_OPS syntax and update Maven command in Dockerfile 2026-04-19 14:07:19 +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 72376a67b4 refactor: optimize dc3-gateway and dc3-common-gateway
- Fix <inceptionYear> from '2016-2022' to '2016' in dc3-gateway/pom.xml
- Fix <scm> connection/developerConnection to use scm:git: prefix
- Fix trailing slash in auth_route_token URI in application-test.yml
- Fix @ComponentScan basePackages: 'io.github.pnoker.common.gateway.*' -> 'io.github.pnoker.common.gateway'
- Refactor AuthenticGatewayFilter: replace @Resource field injection with constructor injection
- Refactor AuthenticGatewayFilter: move getUserDTO() call outside headers lambda
- Refactor AuthenticGatewayFilter: distinguish UnAuthorizedException (warn) from unexpected errors (error+stacktrace)
- Extract writeErrorResponse() helper to eliminate duplicated response-building code
2026-04-18 01:29:08 +08:00
pnoker e57793ec5f chore: bump version to 2026.4.18.3 and optimize pom.xml dependencies
- Bump all module versions from 2025.11.1 to 2026.4.18.3
- Remove orphaned dc3-common-influx dependency and property from root pom.xml
- Standardize dependency comment style in dc3-common/pom.xml
- Merge gRPC dependency groups into single section in dc3-common-api
- Restructure Spring Integration MQTT and Eclipse Paho groups in dc3-common-mqtt
- Fix incorrect comment 'DC3 Common Exception' to 'DC3 Common Related' in dc3-common-postgres
- Add missing blank line before </dependencies> in dc3-common-driver
- Remove stray blank line in root pom.xml dependencyManagement
2026-04-18 01:05:30 +08:00
zzi666 b86044708c chore: upgrade base image to dc3-jdk:2025.9 and translate javadoc comments to English 2026-01-06 21:20:54 +08:00
Vickey 0e419bab05 feat: update pom 2025-11-11 13:22:24 +08:00
zzi666 21eaa5da34 refactor: remove unused files, standardize code comments and documentation across modules 2025-10-27 10:15:25 +08:00
zzi666 73fe41091e refactor: standardize descriptions, comments, and documentation across POM files and Protobuf definitions 2025-10-24 20:07:28 +08:00
zzi666 989a931c2f fix: standardize comment language in POM files 2025-10-24 15:45:02 +08:00
Vickey a9e8d05631 feat: update version 2025-10-05 17:16:37 +08:00
Vickey 35bee1a858 feat(common): add virtual thread executor bean and switch web module from undertow to netty 2025-09-12 11:38:03 +08:00
Vickey 7302107c56 chore: bump all module versions to 2025.9.2 2025-09-11 17:02:24 +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
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 022bab4fbd chore: switch license declaration from Apache-2.0 to AGPL-3.0 across all poms 2025-08-26 22:16:35 +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