Individual application development scaffolding based on domain-driven design (DDD) and supporting SaaS platforms.

Website online experience | | Swagger | | front open source framework

The micro service version: https://gitee.com/xtoon/xtoon-cloud

Why open source

At the beginning of the project or MVP stage, it is suggested to develop the application with DDD single framework, and then transform it into microservice version according to different elastic requirements of the domain. Personally, IT is not recommended to start microservices, because services are divided very carefully, which will only increase the cost and risk of development. Personally, I think we should choose a reasonable framework and program to ensure that the later can be quickly and low-cost from monomer to microservices. This is exactly the original intention of our open source DDD-based Xtoon framework. At present, both individual application version and micro-service version have been released, hoping to bring some value to developers who practice DDD and micro-service. Thank you!

Why xtoon-boot

  • Solve the pain point of writing procedural and transaction code, resulting in the late maintenance logic confusion and high maintenance cost;
  • Boundary specification is easy to maintain, core business logic cohesion in the domain, low coupling, high cohesion, easy long-term maintenance;
  • The basic online is DDD theory is rarely about how to land, XTOon-boot provides a complete landing program and enterprise level hand frame;
  • The framework provides core modules such as system management and organizational structure.
  • Multi-tenant SaaS platform;

Technical communication

If you have any questions or suggestions, you can ISSUE or add groups (QQ: 130950009), exchange technology, share experience. If you fix some bugs, or add some new features, please feel free to contribute code, thank you very much ~ more support ⭐Star.

Technology selection

  • Springboot
  • Apache Shiro
  • Mybatis-plus
  • Swagger
  • Hibernate-validator
  • Alibaba Druid
  • Element-ui

The main module

  1. Login and registration: account number, mobile phone number verification login, tenant registration;
  2. User management: Add users, assign roles, disable users, etc.
  3. Role management: adding, viewing, and maintaining roles;
  4. Menu management: tree menu management, menu and button permissions can be configured;
  5. Tenant management: tenant list, disable, etc.
  6. Log management: Record operation logs record and query operation logs.

The project structure

Xtoon - boot ├ ─ a db database SQL script │ ├ ─ xtoon - common public module │ │ │ └ ─ Java │ ├ ─ domain field generic class │ └ ─ util utility class │ ├ ─ xtoon - API interface module │ │ │ ├ ─ web │ │ ├ ─ common interface generic class │ │ ├ ─ util interface tools │ │ └ ─ controller controller class │ └ ─ resources │ ├ ─ static. The swagger │ swagger file ├─ ├─ Java │ ├─ Application │ ├─ ├─ Java │ ├─ Application │ ├─ ├─ ├─ Java │ ├─ Application │ ├─ ├─ Java │ ├─ Application │ ├─ ├─ ├─ Java │ ├─ ├─application │ ├─ ├─ ├─ ├─ Java │ ├─ ├─ ├ ─ assembler DTO classes │ │ ├ ─ command command into the ginseng │ │ ├ ─ DTO DTO │ │ └ ─ impl application interface implementation │ ├ ─ domain domain layer (core) │ │ ├ ─ model domain model │ │ ├ ─ service Field service │ │ ├ ─ check specification specification │ │ └ ─ external external interface (coating) │ └ ─ infrastructure infrastructure layer │ ├ ─ persistence persistence class │ └ ─ external external service classes │ ├─ Xtoon-org Organization management sub-area │Copy the code

The core ideas

Hexagonal theory

Data driven versus domain driven

Layered architecture

  • User Interface Layer (or presentation layer)

Responsible for displaying information to users and interpreting user instructions. The user can be another computer system, not necessarily the person using the user interface

  • The application layer

Define the tasks the software is supposed to accomplish and direct objects that express domain concepts to solve the problem. The work that this layer is responsible for is of great importance to the business, and it is also a necessary channel to interact with the application layer of other systems. The application layer should be as simple as possible, containing no business rules or knowledge, but only coordinating tasks and assigning work to domain objects in the next layer to make them cooperate with each other. It does not reflect the state of the business situation, but it can have another state that shows the progress of a task to the user or program

  • Domain layer (or model layer)

Responsible for expressing business concepts, business state information, and business rules. Although the technical details of preserving the business state are implemented by the infrastructure layer, the state reflecting the business state is controlled and used by this layer. The domain layer is the core of business software

  • Infrastructure layer

Provide common technical capabilities for the layers above: messaging for the application layer, persistence mechanisms for the domain layer, drawing screen components for the user interface layer, and so on. The infrastructure layer can also support interaction patterns between the four layers through an architectural framework