This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Always reply in Chinese.
ZenTao is a comprehensive, open-source project management software written in PHP that covers the main PM process from product and project management to quality management, documentation management, organization management, and office management. It follows a modular MVC architecture pattern.
- framework/: Core framework classes (control, model, router, helper)
- module/: Modular architecture with each module containing:
control.php- Controller logicmodel.php- Data layer and business logiczen.php- New architecture layer (when present)tao.php- Extended business logic layer (when present)config/- Module-specific configurationlang/- Internationalization filesview/- Traditional view templatesui/- Modern UI componentscss/andjs/- Frontend assets
- lib/: Third-party libraries and utility classes
- config/: Global configuration files
- www/: Web entry point and public assets
- db/: Database schemas and migration scripts
- extension/: Extension system for customization
- Uses MySQL/MariaDB with custom DAO layer in
lib/dao/ - Database schemas in
db/directory with versioned SQL files - Supports multiple database engines including experimental DuckDB support
- Mix of traditional PHP templates and modern UI components
- Uses ZUI framework (custom UI library)
- jQuery-based JavaScript
- CSS organized per module
# Full build process
make all
# Clean build artifacts
make clean
# Common build (core functionality)
make common
# Package for distribution
make package
# Create distribution packages
make pms # Standard package
make ci # CI build with all packagesThe project uses a custom testing framework located in test/:
# Run tests (navigate to test directory first)
cd test
php spider.php
# UI testing configuration available in test/config/config.php- PHP compatibility checks via
misc/compatibility/ - Downgrade scripts for PHP version compatibility in
misc/rector/ - Code minification:
php misc/minifyfront.php
- product/: Product management
- project/: Project management (includes execution/)
- story/: User story management
- task/: Task management
- bug/: Bug tracking
- testcase/: Test case management
- build/: Build management
- user/: User management
- group/: Permission groups
- company/: Organization management
- dept/: Department structure
- git/, gitlab/, gitea/, gogs/: Source control integration
- jenkins/: CI/CD integration
- api/: API management
- webhook/: Webhook support
- report/: Standard reports
- chart/: Charting functionality
- metric/: Metrics calculation
- bi/: Business intelligence
- Main config:
config/config.php - Database settings typically in
config/my.php(not tracked)
- Custom extensions in
extension/custom/ - Configuration extensions in
config/ext/
- Language files in each module's
lang/directory - Supported languages: zh-cn, zh-tw, en, de, fr
- Controllers:
control.php - Models:
model.php - Views:
view/*.html.php - UI Components:
ui/*.html.php - Configurations:
config/*.php - Language files:
lang/{locale}.php
- zen.php: New architecture implementation
- tao.php: Business logic extension layer
- Traditional MVC for legacy code
- Minimum PHP 5.6, supports up to PHP 8.1+
- Uses strict types declaration in newer files
- Extensive use of custom framework classes
- Custom authentication and authorization system
- Input filtering via
lib/filter/ - SQL injection protection through DAO layer
- Built-in caching system in
lib/cache/ - Database query optimization
- File-based session management
- Create module directory structure in
module/ - Implement controller, model, and views
- Add language files for internationalization
- Configure routing if needed
- Add database tables via SQL files in
db/
- Add migration SQL to
db/update*.sql - Update schema in
db/zentao.sql - Test with different database engines if needed
- Add test data to
test/data/ - Create test cases using the custom framework
- Run compatibility checks for PHP versions
This codebase represents a mature, enterprise-level project management system with extensive customization capabilities and multi-language support.