[Open Source] An automated Web platform for system design and code generation, providing code automation capabilities.

Open SourceProcess Management
2026-06-28 03:40 2 次浏览 • 0 次下载 0KB
[Open Source] An automated Web platform for system design and code generation, providing code automation capabilities.

1. Project Overview

Youran Automated Code Platform

This is an automated web platform featuring system design and code generation capabilities. Using this platform can significantly improve developer productivity.

2. Open Source License

Licensed under Apache-2.0

3. Screenshots

Page Screenshots

Project Management 

Incremental Preview 

Field Management 

ER Diagram 

Code Preview 

Template List 

Custom Charts 

4. Feature Overview

Java frontend and backend code generation [incremental generation], with frontend and backend separation. The backend uses spring-boot, mybatis, mapstruct, swagger, and easyexcel. The frontend uses vue-admin-template. Supports one-to-many and many-to-many relationships, with customizable Freemarker code templates.

The following features are included:

  1. ★★★ Git-based incremental code generation. See README.md for the underlying principles: Supports generating code directly to remote Git repositories and regenerating code after metadata changes (only the differences are generated).
  2. ★★★ Custom Templates: If the built-in code templates do not meet your requirements, you can develop your own exclusive code templates based on your team's technology stack.
  3. ★★★ Custom Charts: Based on existing entities, you can configure custom detail tables and aggregate tables, configure ECharts charts, and display multiple charts together on a single dashboard.
  4. ★ Reverse Engineering: If you have already completed your application's database table structure design, please use theReverse Engineeringfeature to import table creation SQL statements into the project, automatically generating entities and fields.
  5. Many-to-Many Relationships: Supports establishing many-to-many relationships between two entities. A relationship table will be generated in MySQL. You can configure whether either entity holds a reference to the other. The entity holding the reference will automatically generate functionality for maintaining the relationship.
  6. Foreign Key Associations: When adding a field, you can specify whether it is a foreign key. Foreign key fields must reference the primary key of another entity, enablingOne-to-OneorOne-to-Manyrelationships.
  7. Cascading Extensions: Cascading fields can be configured on foreign key fields or many-to-many entities. These fields can be used as query conditions for the associated entity and can also be displayed in query results.
  8. Entity ER Diagrams: On the entity list page, select multiple related entities and click theView ER Diagrambutton to generate an entity relationship diagram.
  9. Code Preview: Browse generated code online without downloading it. You can also preview the differences between newly generated code and the previous version after metadata changes.
  10. Can generate Excel import and export functionality (based on easyexcel), with an option to enable or disable the Lombok plugin.
  11. Project SharingOptional Features: You need to integrate your company's own unified login system, after which you can share the project with team members for collaborative maintenance. This feature is disabled by default.

[Git Incremental Code Generation] is the core feature of this system.

For example: You have already implemented extensive business logic based on the generated code. Suddenly, your requirements change, and you need to add several fields or a new table. In this situation, usingGit Incremental Code Generationcan significantly reduce repetitive manual work. The specific steps are as follows:

  1. Update the metadata on the Code Automation Platform.
  2. On the project list page, click the buttonCommit to Git
  3. Return to your code's master branch and execute the following Git operation: fetch
  4. Merge the remote auto branch into the current branch.
Prerequisite!!! You must enable the following option in the project configuration before manually modifying any code:Enable Git Repository. The auto branch must never be deleted, and no code development should be performed on the auto branch.

This feature supports repeated execution of the "Modify Metadata" and "Generate Code" operations. It is recommended that you use this platform for incremental code generation throughout the entire software iteration cycle.

5. Tech Stack

Installation Steps

Step 1: Environment and Configuration

  1. Install the required dependencies yourself: MySQL database and JDK 8.
  2. Download and extract the ZIP installation package.
  3. Create the tables in MySQL in advance. The SQL script is located at: /schema/init.sql in the installation package.
  4. Modify the database configuration in the configuration file: /conf/application-local.yml

Step 2: Startup

Startup script: /bin/startup.cmd

System access URL:

  • http://localhost:8088


When accessing the system for the first time, you need to import the built-in code templates:

  • Java backend template: Source code ZIP archive
  • Vue frontend template: Source code ZIP archive

Usage instructions

1. Recommended ApproachRecommended(Design the models in this project and synchronize the code to Git.)

  1. Create an empty repository on a code hosting platform such as GitLab or GitHub.
  2. Create a project on this platform and enter the Git repository URL.
  3. Create entities [Required]
  4. Create entity fields [Required]
  5. Create other metadata [Optional]
  6. ExecuteCommit to Git

2. Traditional ApproachNot Recommended(Perform reverse engineering after designing the database table structure.)

  1. Design the database table structure in advance.
  2. Create a project on this platform and execute reverse engineering using your SQL table creation statements.Reverse Engineering
  3. Adjust field properties (reverse engineering imports only limited field information, so some properties are assigned default values).
  4. Generate Code

Getting Started Example

This is a simple project example. You only need to download the project's metadata file and follow the steps below. With just a few clicks, you can preview the generated code.

  1. Project Management -> Import Metadata
  2. Project Management -> Actions -> Edit -> Select Code Template
  3. Project Management -> Use Template -> Code Preview

Terminology

  1. Project: A project represents an independent application system. A complete Java Web system can be generated based on a single project.
  2. Entity: An entity corresponds to a business table in the database and a complete set of CRUD operations. Entities can also have relationships such as 'one-to-many' and 'many-to-many'.
  3. Field: A field here refers to both a field in a database business table and a field in a Java entity class. Each field has numerous configurable properties.
  4. Enumeration: It is recommended to define groups of constants that rarely change as enumerations. Corresponding enum classes will be generated in the Java code.
  5. Index: An index in a MySQL business table.
  6. Many-to-Many Relationship: A relationship between two entities. An intermediate table is generated to store the IDs of both entities.

Generated Results Showcase

#1
资源直链https://gitee.com/caixiaoge/youran
去下载
星河码客

发现和分享优质开源项目,传承互联网精神,为开发者服务。

关于本站

联系我们

微信/广告合作:ITcloub (备注星河码客)

免责声明:本站资源版权归原作者所有,仅供学习与交流。如有侵权,请通过「关于我们 - 侵权投诉」联系删除。

Powered by Nuxt · Deployed on Cloudflare