ZenTao Reborn: A NestJS + Vue3 Full-Stack Replica With 58 Tables, 229 APIs, and Source-Verified State Machines
A full, tested implementation of a mature development management system is now open source under MIT, giving teams a reference for state machines, RBAC with data scoping, and real-time collaboration that have been validated against ZenTao's PHP source. The permission drift gate and shared contract package are directly applicable to any full-stack project wrestling with frontend/backend contract decay.
A developer has open-sourced a full-stack reconstruction of ZenTao, the long-running R&D management tool, using NestJS 11 on the backend and Vue 3.5 with Element Plus on the frontend. The monorepo replicates the original system's business logic at source-code level: every state transition rule is traced to ZenTao's PHP code, with 58 MySQL tables, 229 Swagger-verified endpoints, and 221 permission points.
A shared TypeScript contract package with zero runtime dependencies keeps front and back ends in sync: enums, a state transition authority table, permission constants, socket contracts, and error codes all live there. The backend uses three guards—JWT for identity, PermissionsGuard for actions, DataScopeGuard for data visibility—with permission data sourced from the DB and cached in Redis. A drift-check script fails CI if shared constants and DB permissions diverge.
The kanban treats columns as status and drag as a server-side action, using Socket.IO with eventId idempotency and optimistic updates. Testing combines 62 Vitest unit tests, 130 plain HTTP assertion scripts that boot a real MySQL/Redis stack, and 7 Playwright E2E cases; the assertion scripts are positioned as reproducible acceptance evidence rather than framework reports. The write-up also documents eight real pitfalls, from ESM import suffixes to silent DTO stripping.
Reconstructing a 20-year-old system like ZenTao surfaces edge cases that greenfield designs miss; the author credits source-level reading over documentation for rules like version-based review trimming and effort-driven status migration.
The separation of JWT identity, action permission, and data scope, with the DB as single source and a drift-check gate, directly addresses the common failure of forgotten reseeding after enum changes.
Plain HTTP assertion scripts serve as acceptance evidence that runs identically in local and CI environments, trading framework reporting for a deterministic exit-code tally.
The project's stance that documentation is the context contract for AI collaboration, with append-only ADRs and traced business rules, is directly relevant to teams using AI-assisted development.