Initial commit

This commit is contained in:
Zzzz
2026-04-27 18:40:30 +08:00
commit 2120774b05
112 changed files with 12308 additions and 0 deletions
@@ -0,0 +1,73 @@
# Project Requirements From Developer
## Source
Captured on 2026-04-27 during the Trellis bootstrap-guidelines task from
developer-provided project facts.
## Architecture And Stack
- The system uses B/S architecture with a typical layered design.
- The application stack is JSP + Servlet, MySQL, Tomcat, developed in IDEA.
- The layers are presentation, controller, business/service, DAO, and data.
## Data Layer
MySQL is the data layer and stores:
- Book information.
- Book category information.
- Reader information.
- Borrowing records.
- Administrator information.
- Role and permission information.
- System logs.
Core entity tables should include book information, book categories, reader
information, borrowing records, administrators, role permissions, and system
logs. Use primary keys and foreign keys to preserve data integrity.
## DAO Layer
The data access layer uses DAO classes to perform database CRUD. DAOs should own
SQL/database access concerns and should not contain presentation or business
workflow logic.
## Business And Service Layer
The service layer handles:
- Book warehousing/intake.
- Borrowing and returning.
- Inventory status updates.
- Overdue statistics.
- Permission checks.
## Controller Layer
Servlet controllers handle request dispatch, parameter validation, and result
return. Controllers should coordinate request/response flow and call services
for business behavior.
## Presentation Layer
JSP/CSS pages handle page display and user interaction.
The frontend approach is image-first: UI should be designed or generated as
images first, then JSP/CSS pages should restore and implement the image
faithfully.
## Core Modules
- Login and permission management for administrator, librarian, and reader
roles.
- Book information management for create, update, delete, category
maintenance, and inventory status.
- Reader information management for profiles, borrowing eligibility, and
contact information.
- Borrowing and return management for borrow, return, renew, overdue handling,
and automatic collection status updates.
- Book search and statistics for combined search by title, author, category,
and ID, plus borrowing rankings, inventory reports, and overdue reports.
- System maintenance and logs for key operation logs, data backup support, and
exception tracing.
@@ -0,0 +1,42 @@
# Repository Scan
## Scope
Scanned the workspace on 2026-04-27 while bootstrapping Trellis project guidelines.
## Findings
- The workspace root is `/mnt/d/document/mzh`.
- `git status --short --branch` from the workspace root fails with `fatal: not a git repository`; no git metadata is available at this level.
- The only root-level convention file discovered by the bootstrap search is `AGENTS.md`.
- `AGENTS.md` contains Trellis-managed instructions only. It does not describe backend or frontend implementation conventions.
- No app package manifests were found at the workspace root, including `package.json`, `pyproject.toml`, `go.mod`, `Cargo.toml`, or common lockfiles.
- No application source files were found outside Trellis/Codex scaffolding at shallow workspace depth. The current files are Trellis workflow/config/scripts/specs/tasks and Codex agent configuration.
- At initial scan time, existing `.trellis/spec/backend/*.md` and
`.trellis/spec/frontend/*.md` files were unpopulated scaffold templates; they
have since been populated during this bootstrap task.
## Later Developer Decision
The source scan remains accurate as a scan of files on disk, but it no longer
means the project stack lacks a decision. The developer later provided explicit
project requirements in
`.trellis/tasks/00-bootstrap-guidelines/research/project-requirements.md`.
Future agents should combine both facts: application source code does not exist
yet, and the intended stack is JSP + Servlet + MySQL + Tomcat with a layered
B/S architecture.
## Source-Code Evidence Boundary
Because there is no backend or frontend application code in this workspace yet,
the bootstrap specs should distinguish source-code evidence from
developer-provided decisions:
- Backend and frontend conventions are not evidenced by source files yet.
- The project stack and intended architecture are established by the developer:
B/S layered JSP + Servlet + MySQL + Tomcat development in IDEA.
- Future agents should follow the populated `.trellis/spec/` files and
`.trellis/tasks/00-bootstrap-guidelines/research/project-requirements.md`
for stack, module, table, and workflow decisions.
- When new backend/frontend code is introduced, agents should update the
matching `.trellis/spec/` files with concrete examples from that code.