ContiNew Admin Documentation

repository·dev·Indexed 24 days ago

https://github.com/continew-org/continew-admin

A multi-tenant, high-quality back-office management framework designed for modern development and AI-assisted coding workflows. Built with a technology stack featuring Java 17, Spring Boot 3.3.12, MyBatis Plus, Vue 3, TypeScript, and Arco Design. It includes a high-level CRUD suite for rapid API development, a code generator for frontend and backend, and built-in system features for user access, organization, communication, and system monitoring.

Tokens
4.4K
Snippets
6
Records
19
Agent score
35%

What's inside ContiNew Admin

  1. Overview of built-in system features

    dev

    ContiNew Admin is a multi-tenant management framework that includes a wide range of out-of-the-box business solutions:

    • User & Access Management: User management (import/export, role assignment), Role management (functional and data permissions), Menu management (multi-level menus, dynamic routing), and Tenant management (SaaS architecture).
    • Organization: Department management (tree-based structure).
    • Communication: Message center (system notifications), Notification/Announcement management (scheduled, targeted, or global).
    • System Configuration: Website settings (Logo, favicon), Security settings (password policies, lockout rules), Login settings (captcha), Storage settings (Local or S3-compatible), and Client configuration (token expiration per client type).
    • Operations & Monitoring: Dashboard (data visualization), File management (S3/Local, previewing PDF/Office/Media), Task management (Cron-based scheduled tasks), Log management (Login and Operation logs), and Online user management (session termination).
    • Data & Utilities: Dictionary management (public data labels), Code generation, and Application management (AK/SK for third-party systems).
  2. Overview of ContiNew Admin

    dev

    ContiNew Admin (Continue New Admin) is a high-quality, multi-tenant back-office management system framework designed with a focus on modern UI, design details, and clean code standards. It is optimized for the AI programming era, providing well-structured code that allows AI assistants to learn elegant patterns and generate high-quality code more effectively.

    The framework is designed to be out-of-the-box ready, continuously iterating to provide a comfortable development experience and high extensibility.

  3. ContiNew Admin Core Technology Stack

    dev

    ContiNew Admin is built using a modern, enterprise-grade technology stack. Key components include:

    Frontend

    • Vue 3.5.4: Progressive JavaScript framework.
    • Arco Design 2.57.0: UI framework by ByteDance.
    • TypeScript 5.0.4: Static typing for JavaScript.
    • Vite 5.1.5: Next-generation frontend build tool.

    Backend (Java/Spring Boot)

    • Spring Boot 3.3.12: Core framework (requires Java 17+).
    • Undertow 2.3.18.Final: High-performance web server.
    • Sa-Token + JWT 1.44.0: Lightweight permission and authentication framework.
    • MyBatis Plus 3.5.12: Enhanced MyBatis tool for simplified development.
    • ContiNew Starter 2.15.0: Optimized dependency package containing MyBatis-Plus, SaToken, etc.
    • Dynamic Datasource Starter 4.3.1: For rapid multi-datasource integration.
    • Hikari 5.1.0: High-performance JDBC connection pool.
    • MySQL 8.0.42: Relational database management system.
    • Liquibase 4.27.0: Database version control and migration.
    • JetCache 2.7.8: Unified Java cache system with TTL and two-level cache support.
    • Redisson 3.49.0: Redis client providing distributed tools like locks and rate limiters.
    • Redis 7.2.8: High-performance key-value store.
    • Snail Job 1.5.0: Distributed task retry and scheduling platform.
    • X File Storage 2.2.1: Unified file storage abstraction (Local, FTP, S3, etc.).
    • SMS4J 3.3.4: SMS aggregation framework.
    • Just Auth 1.16.7: Third-party login integration.
    • Fast Excel 1.2.0: High-performance Excel processing for large files.
    • AJ-Captcha 1.3.0: Behavioral CAPTCHA (sliding puzzle, text selection).
    • Easy Captcha 1.6.2: Graphical CAPTCHA (GIF, arithmetic, etc.).
    • Crane4j 2.9.0: Annotation-based field mapping/filling framework.
    • SpEL Validator 0.5.2-beta: Jakarta validation API extension using SpEL.
    • CosID 2.13.0: Distributed ID generator.
    • Graceful Response 5.0.4-boot3: Elegant response handling and error code filling.
    • NextDoc4j 1.1.5: Modern API documentation UI (Swagger UI replacement).
    • OpenFeign 13.5: Declarative REST client.
    • Hutool 5.8.38: Comprehensive Java utility library.
    • Lombok 1.18.36: Annotation-based boilerplate reduction.
  4. Understand the ContiNew Admin Project Structure

    dev

    ContiNew Admin is organized into functional modules. The backend follows a modular approach where each module handles specific business domains. Understanding this hierarchy is essential for locating configuration, business logic, and API endpoints.

    Core Modules

    • continew-server: The deployment and packaging module. It contains the main application entry point (ContiNewAdminApplication.java) and core configurations (logging, SaToken authentication, and environment-specific YAML files).
    • continew-system: Contains core system management business logic, such as department, role, and user management.
    • continew-plugin: A collection of extension modules designed for plugin-based architecture. Includes:
      • continew-plugin-open: Capability opening/API exposure.
      • continew-plugin-tenant: Multi-tenancy management.
      • continew-plugin-schedule: Task scheduling.
      • continew-plugin-generator: Code generation.
    • continew-common: Provides shared utilities, base classes (Controllers, Mappers, Services, Entities), and common configurations (MyBatis Plus, WebSocket, Excel, etc.).
    • continew-extension: Contains specialized extension modules, such as continew-extension-schedule-server for standalone task scheduling services.

    Configuration and Resources

    • Environment Config: Located in continew-server/src/main/resources/config/ (e.g., application-dev.yml, application-prod.yml).
    • Database Migrations: Managed via Liquibase in continew-server/src/main/resources/db/changelog/ using MySQL or PostgreSQL scripts.
    • Templates: Located in continew-server/src/main/resources/templates/ (e.g., for email templates).
  5. Understand the ContiNew branching strategy

    dev

    ContiNew uses a specific branching strategy to manage development and maintenance. Before submitting a Pull Request (PR), identify the correct target branch based on your goal:

    • dev: The development branch used for the next major version (SNAPSHOT). Use this branch for new features or feature optimizations.
    • x.x.x (e.g., v4.1.0): Maintenance branches used for specific version bug fixes. These branches only accept PRs for fixing existing functionality and do not accept new features.
  6. ContiNew Admin Technology Stack

    dev

    ContiNew Admin utilizes a modern and robust technology stack for both backend and frontend development:

    Backend:

    • Runtime: Java 17 / Open JDK 17
    • Framework: Spring Boot 3.3.12
    • ORM: MyBatis Plus
    • Security/Auth: Sa-Token, JustAuth
    • Caching/Distributed: Redisson, JetCache
    • Utilities: Hutool, FastExcel, Crane4j, Spring Doc, CosId

    Frontend:

    • Framework: Vue 3
    • Language: TypeScript (TS)
    • Build Tool: Vite
    • UI Component Library: Arco Design
  7. Generate code using the Code Generator

    dev

    The project includes a code generator that uses templates for both frontend and backend. Once your database tables are designed, you can configure the generator to produce approximately 80% to 95% of the required code, including:

    • CRUD APIs
    • Permission controls
    • Parameter validation
    • Interface documentation (Swagger/OpenAPI)

    The generator supports synchronizing the latest table structures and provides a preview of the generated code.

  8. Integrate ContiNew Starter components via Maven

    dev
    For projects that do not require the full ContiNew Admin framework, you can use ContiNew Starter components. These are standalone backend base components and framework integrations (e.g., Spring Boot Web enhancements, encryption, rate limiting, idempotency, etc.) available in the Maven Central Repository. This allows you to build custom project frameworks faster by simply adding the required dependencies.
  9. Quick Start Guide for ContiNew Admin

    dev

    To get a local instance of ContiNew Admin running, follow these steps:

    1. Clone the repository:
      git clone https://github.com/continew-org/continew-admin.git
    2. Open the project in your preferred IDE (e.g., IntelliJ IDEA or Eclipse).
    3. Configure environment variables or configuration files. You must provide settings for:
      • Data Source: DB_HOST, DB_PORT, DB_USER, DB_PWD, DB_NAME
      • Redis: REDIS_HOST, REDIS_PORT, REDIS_PWD, REDIS_DB
      • Email configuration Note: You can set these directly in your IDE's program launch environment variables.
    4. Run the application. When the startup is successful, the console will display: ContiNew Admin service started successfully. It will also output the API base URL and the API documentation URL.

    For a more detailed walkthrough, refer to the official Quick Start documentation.

    # 1.克隆本项目
    git clone https://github.com/continew-org/continew-admin.git
  10. Backend code formatting and standards

    dev

    To maintain code quality, all contributors must adhere to the following rules:

    • Coding Standards: Follow the Alibaba 《Java开发手册(黄山版)》 (Java Development Manual). Provide clear structures, naming conventions, and complete comments (including interface documentation and parameter examples).
    • Automated Formatting: Before submitting backend code, close all IDE windows and run the following command to trigger the automatic formatting plugin:
      mvn compile
      **Important**: After running `mvn compile`, do not reopen your IDE windows to avoid formatting discrepancies caused by different IDE configurations.
    - **Commit Messages**: Use the [Angular Commit Message Convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular) for all commits.
    
  11. Submit a Pull Request to ContiNew

    dev

    To contribute new features or optimizations, follow these steps:

    1. Fork the project to your personal repository on the hosting platform.
    2. Clone your fork to your local development environment.
    3. Create a new branch from the appropriate maintained branch (e.g., dev). Use a naming convention like feat/newFeature. Do not modify the source branches directly.
    4. Modify code on your new branch, then commit and push to your remote repository.
    5. Create a Pull Request (PR) on the platform, ensuring you select the correct source and target branches. Fill out the PR template accurately.
    6. Sign the CLA (Contributor License Agreement). Ensure the email used in your git commits matches your platform account email. If they differ, fix it locally using:
      git reset --soft HEAD~1

    Re-commit with the correct email

    git push -f

    7. **Wait for review** from maintainers.
    8. **Sync** your local environment with the latest upstream code before starting your next contribution.