fuzhengwei/chatbot-api
49.9
Weak · 22 September 2026
901
lines of production code
Java
primary language
7
measurements over time
What this system is
This system is a Java-based chatbot service that automatically answers community questions using AI. It periodically fetches unanswered queries from external platforms like Zhihu Star and generates responses via the OpenAI API. The application is containerized with Docker and structured using Domain-Driven Design principles with Spring Boot.
Features
Added Dockerfile and deployment scripts for containerized Java application
The repository now includes a Dockerfile that builds an OpenJDK 8-based image for the chatbot-api application, along with build.sh and start.sh shell scripts to facilitate building the Docker image and running the container with configurable environment parameters for API keys and cookies.
(repo-wide) · high confidence
Added Spring Boot application entry point for the chatbot API
A new Spring Boot application class, ApiApplication, has been added to serve as the entry point for the chatbot API service. This change enables the application to be launched as a standalone Spring Boot application, facilitating the integration of the knowledge base and ChatGPT features within the DDD project structure.
chatbot-api-interfaces/src/main/java · medium confidence
Added domain services for ChatGPT and Zhihu Star (Zsxq) integrations
The chatbot-api-domain module now includes new domain services and data models to support AI-driven responses. This includes an \IOpenAI\ interface and \OpenAI\ service implementation that calls the OpenAI API (via a proxy at open.aiproxy.xyz) to generate answers using the text-davinci-003 model. Additionally, a \ZsxqApi\ service and associated model classes (e.g., \UnAnsweredQuestionsAggregates\, \Topics\) have been added to fetch unanswered questions from the Zhihu Star (Zsxq) platform, enabling the system to retrieve and answer community questions.
chatbot-api-domain · high confidence
Added property utility for Spring Boot 1.x and 2.x compatibility
A new PropertyUtil class was added to the chatbot-api-common module. It provides a unified way to resolve environment properties by detecting the Spring Boot version at runtime and using reflection to support both Spring Boot 1.x (via RelaxedPropertyResolver) and 2.x (via Binder) APIs, ensuring the chatbot service can run on either version.
chatbot-api-common · medium confidence
Added scheduled task execution for automated question answering
The chatbot application now supports automated, scheduled answering of unaddressed questions from external platforms (e.g., Zhihu, OpenAI). A new \TaskRegistrarAutoConfig\ reads configuration for multiple task groups, each defining a cron schedule, API keys, and a \silenced\ flag. The \ChatbotTask\ implementation periodically fetches unanswered questions, generates AI responses, and posts them back, with logic to respect a \silenced\ configuration to control whether replies are actually sent.
chatbot-api-application · high confidence
Initialize DDD infrastructure package structure
The chatbot-api-infrastructure module now includes a base package definition for the DDD (Domain-Driven Design) infrastructure layer. This establishes the foundational package structure for the application's infrastructure components.
chatbot-api-infrastructure · high confidence
Test coverage
Added unit and integration tests for chatbot API interfaces
Added new test classes in the chatbot-api-interfaces module to verify API interactions. ApiTest provides low-level HTTP client tests for the ZhiShiXing (Knowledge Planet) API and OpenAI ChatGPT endpoints, including base64 decoding and JSON payload handling. SpringBootRunTest provides integration tests that load the Spring context to exercise the domain services IZsxqApi and IOpenAI, specifically testing the flow of querying unanswered questions and submitting answers via ChatGPT.
chatbot-api-interfaces/src/test · high confidence
Dependencies
Initial DDD project structure with Spring Boot 2.3.5
The project was initialized as a multi-module Maven build using Spring Boot 2.3.5. The dependency management defines versions for libraries including Fastjson (1.2.58), Commons Lang3 (3.8), JUnit (4.12), WebDriverManager (5.0.3), Selenium (3.141.59), Apache HttpClient (4.5.14), HttpMime (4.5.10), TestNG, json-lib (2.2.3), and Hutool (5.8.10).
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 50 → 50 (-0.6)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 100 (-0.1)
- Architecture 100 → 86 (-14.3)
- Maturity 50 → 43 (-7.1)
- Readiness 27 → 32 (+5.3)
- Security 88 → 89 (+0.7)
Resolved (12)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- Duplicated block (6 lines × 2) (chatbot-api-domain/src/main/java/cn/bugstack/chatbot/api/domain/ai/service/OpenAI.java)
- Medium IaC: CKV_DOCKER_3 (Dockerfile)
- Medium IaC: CKV_DOCKER_4 (Dockerfile)
- Medium IaC: CKV_DOCKER_6 (Dockerfile)
- No exposed public API
- Scanner failed to run — not a clean result
- Secret: openai-api-key (chatbot-api-interfaces/src/main/resources/application.yml)
- Secret: openai-api-key (chatbot-api-interfaces/src/main/resources/application.yml)
- Test reliability not included
- single-maintainer — knowledge-concentration (bus factor) risk
New (16)
- Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
- Duplicated block (42 lines × 2) (chatbot-api-domain/src/main/java/cn/bugstack/chatbot/api/domain/zsxq/model/vo/Owner.java)
- Duplicated block (6 lines × 2) (chatbot-api-domain/src/main/java/cn/bugstack/chatbot/api/domain/ai/service/OpenAI.java)
- Medium IaC: WD-DOCKER-0003 (Dockerfile)
- No ADRs found
- No direct assertions: answer (chatbot-api-interfaces/src/test/java/cn/bugstack/chatbot/api/test/ApiTest.java)
- No direct assertions: base64 (chatbot-api-interfaces/src/test/java/cn/bugstack/chatbot/api/test/ApiTest.java)
- No direct assertions: query_unanswered_questions (chatbot-api-interfaces/src/test/java/cn/bugstack/chatbot/api/test/ApiTest.java)
- No direct assertions: test_chatGPT (chatbot-api-interfaces/src/test/java/cn/bugstack/chatbot/api/test/ApiTest.java)
- No direct assertions: test_openAi (chatbot-api-interfaces/src/test/java/cn/bugstack/chatbot/api/test/SpringBootRunTest.java)
- No direct assertions: test_zsxqApi (chatbot-api-interfaces/src/test/java/cn/bugstack/chatbot/api/test/SpringBootRunTest.java)
- Scanner failed to run — not a clean result
- Scanner failed to run — not a clean result
- Secret: openai-api-key (chatbot-api-interfaces/src/main/resources/application.yml)
- Secret: openai-api-key (chatbot-api-interfaces/src/main/resources/application.yml)
- Test project verifies nothing: chatbot-api-interfaces (chatbot-api-interfaces/src/test/java/cn/bugstack/chatbot/api/test/ApiTest.java)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
fuzhengwei/chatbot-api was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 22 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit bf18036a66a745ac64f1a16208cca34127b8b407 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-90d5d2fe38ee.