Home
Relevant source files
The following files were used as context for generating this wiki page:- pom.xml
- zheng-admin/src/index.html
- zheng-cms/pom.xml
- zheng-cms/zheng-cms-admin/pom.xml
- zheng-cms/zheng-cms-web/pom.xml
- zheng-ui/zheng-cms-web/index.html
- zheng-ui/zheng-cms-web/news/index.html
- zheng-ui/zheng-cms-web/blog/index.html
- zheng-ui/zheng-cms-web/qa/index.html
- zheng-ui/zheng-cms-web/topic/index.html
- zheng-cms/zheng-cms-admin/src/main/java/com/zheng/cms/admin/controller/manage/CmsTopicController.java
Introduction
The zheng project is a comprehensive, multi-module enterprise-level application suite built with Java and Maven. The project is composed of several distinct but interconnected subsystems, including a User Permission Management System (UPMS), a Content Management System (CMS), a Payment system, a User Center, and more. This modular architecture allows for separation of concerns and independent development and deployment of different functionalities.
The system exposes two primary interfaces: a powerful, unified backend administration panel (zheng-admin) for managing all subsystems, and a public-facing web portal (zheng-cms-web) for the Content Management System. The admin panel provides features like SSO, session management, and fine-grained access control, while the CMS portal is responsible for rendering content such as articles, blogs, and Q&A to end-users.
Sources: pom.xml:18-31, zheng-admin/src/index.html:260-269, zheng-ui/zheng-cms-web/index.html
Project Architecture
Module Structure
The zheng project is organized as a parent Maven project with multiple sub-modules. This structure is defined in the root pom.xml file.
The diagram below illustrates the high-level module organization within the zheng project.
Sources: pom.xml:18-31, zheng-cms/pom.xml:21-30
The following table describes the purpose of the main modules:
| Module | Description | Source |
|---|---|---|
zheng-admin | Provides the unified backend administration UI. | zheng-admin/src/index.html |
zheng-upms | User Permission Management System for RBAC and SSO. | zheng-admin/src/index.html:108 |
zheng-cms | Content Management System, containing modules for the admin, web UI, and RPC services. | zheng-admin/src/index.html:112, zheng-cms/pom.xml |
zheng-pay | Payment Management System. | zheng-admin/src/index.html:116 |
zheng-ucenter | User Center Management System. | zheng-admin/src/index.html:120 |
zheng-oss | Object Storage Management System. | zheng-admin/src/index.html:124 |
zheng-common | A library of common utilities and base classes used across modules. | pom.xml:20 |
Build Profiles
The project utilizes Maven profiles to manage different build configurations for various environments. This allows for environment-specific properties, such as database connections or API endpoints.
dev(default)testprod
Sources: zheng-cms/zheng-cms-web/pom.xml:43-61, zheng-cms/zheng-cms-admin/pom.xml:44-62
Zheng Administration (zheng-admin)
The zheng-admin module is a single-page application that serves as the central control panel for the entire zheng suite. It offers a unified interface for managing various subsystems.
Sources: zheng-admin/src/index.html
System Switching
A key feature of the admin panel is the ability to seamlessly switch between managing different systems without logging out. This is handled by a dropdown menu in the header.
The diagram below shows the flow for a user switching between management systems.
Sources: zheng-admin/src/index.html:100-129
The available systems for management are:
| System ID | System Name | Title | Icon |
|---|---|---|---|
| 1 | zheng-upms-server | 权限管理系统 (Permission Management) | zmdi-shield-security |
| 2 | zheng-cms-admin | 内容管理系统 (Content Management) | zmdi-wikipedia |
| 3 | zheng-pay-admin | 支付管理系统 (Payment Management) | zmdi-paypal-alt |
| 4 | zheng-ucenter-home | 用户管理系统 (User Management) | zmdi-account |
| 5 | zheng-oss-web | 存储管理系统 (Storage Management) | zmdi-cloud |
Sources: zheng-admin/src/index.html:108-127
Core Features
The admin panel's homepage outlines its primary capabilities, which are centered around the User Permission Management System (UPMS).
- System & Organization Management: CRUD operations for systems and organizations.
- User & Role Management: CRUD operations for users and roles.
- Resource & Permission Management: CRUD operations for resources and permissions.
- Permission Allocation: Assigning permissions to roles and users.
- Single Sign-On (SSO): Unified user authentication and authorization.
- Session Management: Distributed user session control.
- Log Management: Recording user login and operational logs.
Sources: zheng-admin/src/index.html:262-269
Zheng CMS Web Portal (zheng-cms-web)
The zheng-cms-web module is the public-facing frontend for the Content Management System. It uses Thymeleaf for server-side template rendering to display dynamic content from the backend.
Sources: zheng-ui/zheng-cms-web/index.html, zheng-ui/zheng-cms-web/topic/index.html:2
Page Structure and Navigation
All pages in the CMS portal share a consistent layout:
- Header (
<nav>): A fixed-top navigation bar containing:- The site logo (
zhengCMS). - Dynamically generated main menu items.
- A search dropdown.
- Login/Register links for guests.
- A user profile dropdown for authenticated users, with links to personal sections like "My Blog," "My Questions," and account settings.
- The site logo (
- Content (
<div class="container">): The main body where page-specific content is rendered. - Footer (
<footer>): A fixed footer with copyright information.
Sources: zheng-ui/zheng-cms-web/index.html:40-107, zheng-ui/zheng-cms-web/index.html:113-115
Content Types
The CMS is designed to handle various types of content, organized into distinct sections. Each section has its own index page, category/tag views, and detail pages.
| Content Type | Base URL | Description | Source Files |
|---|---|---|---|
| News | /news | Displays news articles, which can be browsed by category or tag. | zheng-ui/zheng-cms-web/news/index.html |
| Blog | /blog | Displays blog posts, browsable by category or tag. | zheng-ui/zheng-cms-web/blog/index.html |
| Q&A | /qa | A question-and-answer section. Users can view questions and post answers. | zheng-ui/zheng-cms-web/qa/index.html |
| Topic | /topic | Curated collections of content presented as a single topic page. | zheng-ui/zheng-cms-web/topic/index.html |
| Page | /page | Renders generic, static-like pages with a title and content. | zheng-ui/zheng-cms-web/page/index.html |
| Search | /search | Displays search results for a given keyword. | zheng-ui/zheng-cms-web/search/index.html |
User Interaction
The portal provides interactive features, particularly for authenticated users. A key interaction is the ability to contribute content, such as answering a question or commenting on an article.
The following sequence diagram shows the process of a user submitting an answer to a question.