> For the complete documentation index, see [llms.txt](https://tech.x2bee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tech.x2bee.com/dev-guide/developer-guide-en/pjt-prepare/quickstart.md).

# Project Structure Standard

This document provides the core information needed to understand the structure of X2BEE projects and their subpackages. It describes project and package names, responsibilities, and directory structures so that development can be performed efficiently.

## Application Service Architecture

The application service is organized into layers. Refer to the architecture diagram in the original document for the visual representation.

## Project Names and Descriptions

| Project             | Description                                                                                                                               |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `x2bee-fo`          | Store Front application project, developed responsively for Mobile and PC.                                                                |
| `x2bee-gw`          | Store Front application API gateway.                                                                                                      |
| `x2bee-api-member`  | Customer application API project.                                                                                                         |
| `x2bee-api-order`   | Order application API project.                                                                                                            |
| `x2bee-api-goods`   | Product application API project.                                                                                                          |
| `x2bee-api-display` | Display application API project.                                                                                                          |
| `x2bee-api-event`   | Event application API project.                                                                                                            |
| `x2bee-api-bo`      | API project for administrator and customer-service applications.                                                                          |
| `x2bee-api-common`  | Common application API project.                                                                                                           |
| `x2bee-bo`          | Administrator Back Office Front project, developed responsively for Mobile and PC.                                                        |
| `x2bee-batch-mbod`  | Member and order batch application project.                                                                                               |
| `x2bee-batch-gddp`  | Product and display batch application project.                                                                                            |
| `x2bee-common`      | Common class project containing base classes and shared utility classes. Entity and DTO classes are managed in their respective projects. |
| `x2bee-api-search`  | Search engine project.                                                                                                                    |

## Package Structure

### `x2bee-common`

* Framework common classes: project-wide classes, utility classes, custom annotations, exception handling, database properties, and security.
* API business logic classes: `Controller`, `Service`, `Dao`, `Entity`, and repository classes.
* Framework logic classes: `advice`, `aop`, `config`, and `security` classes.
* Configuration classes: project settings such as `X2beeApiApplication` and `pom.xml`.

| Path                | Description                                            |
| ------------------- | ------------------------------------------------------ |
| `/src/main/java`    | Java source                                            |
| `com.x2bee.common`  | Package namespace                                      |
| `annotation`        | Annotation definitions                                 |
| `aop`               | Site, MyBatis, and database configuration AOP          |
| `bizmessages`       | NCP message transmission classes                       |
| `constant`          | Constant definitions                                   |
| `context`           | Convenience classes for the Spring application context |
| `encrypt`           | Encryption and decryption classes                      |
| `entity`            | Common entity beans                                    |
| `exception`         | Exception definitions                                  |
| `filter`            | Servlet request filter classes                         |
| `formatter`         | Data type format and conversion classes                |
| `interceptor`       | Controller interceptor classes                         |
| `mail`              | Mail transmission classes                              |
| `masking`           | Masking-related classes                                |
| `messageconverter`  | JSON message conversion classes                        |
| `mybatis`           | MyBatis classes                                        |
| `properties`        | Properties processing classes                          |
| `propertyeditor`    | Grid String-to-Timestamp classes                       |
| `redis`             | Redis classes                                          |
| `rest`              | Convenience classes for REST API calls                 |
| `routingdatasource` | Routing data source classes                            |
| `service`           | Stopword-processing classes                            |
| `token`             | Authentication-token processing classes                |
| `tree`              | List-to-tree conversion classes                        |
| `upload`            | File-upload classes                                    |
| `util`              | Utility class definitions                              |
| `xss`               | XSS-processing classes                                 |

### `x2bee-api.{msa}`

The Java structure contains common infrastructure, application controllers and services, repositories for read-only and read-write databases, request/response DTOs, entities, constants, and enums. Resources contain MSA configuration, MyBatis mapper XML files, email templates, and localized message files.

### `x2bee-api-bo`

The Back Office API follows the same application structure and separates read-only and read-write repositories for order, display, and event databases.

### `x2bee-batch-mbod` / `x2bee-batch-gddp`

Batch projects contain application classes, job configuration, services, repositories, DTOs, entities, constants, and enums. Resources contain configuration, MyBatis mapper XML files, and localized message files.
