Could you please provide the code structure diagram?

Viewed 287

Sorry for my English.The previous docs page has a detailed introduction to the front-end and back-end code structure, and how to add new APIs, but the current docs page does not provide.So could you please provide more detailed instructions such as code structure diagram? For example, a screenshot of the previous document page.This gives peopele a better understanding of the code.

3 Answers

Thanks your feedback. We're still in the process of updating our documentation and will add this part of the original.

Backend

.
├── cmd (main binary)
├── configs (default configuration)
├── docs (swagger documentation)
├── i18n (International translation)
├── internal
      ├── base (Basic component without service attributes)
            ├── conf (Configuration)
            ├── constant (constant)
            ├── data (database/cache)
            ├── handler (request/response handler)
            ├── middleware (http middleware)
            ├── pager (Pagination)
            ├── reason (error reason key use to translator)
            ├── server (http server)
            ├── translator (translator for translate international)
            └── validator (validator for validate request)
      ├── cli (binary commands)
      ├── controller (request handler controller for user)
      ├── controller_backyard (request handler controller for admin)
      ├── entity (all entity about database table)
      ├── install (installation related)
      ├── migrations (upgrade related)
      ├── repo (database/cache operations)
      ├── router (http router)
      ├── schema (request/response schema)
      └── service (business logic)
├── pkg (tools or third party)
└── ui (frontend)

Frontend

.
├── cmd
├── configs
├── docs
├── i18n
      ├── en_US.yaml (basic language file)
      ├── i18n.yaml (language list)
├── internal
├── ...
└── ui (front-end project starts here)
      ├── build (built results directory, usually without concern)
      ├── public (html template for public)
      ├── scripts (some scripting tools on front-end project)
      ├── src (almost all front-end resources are here)
            ├── assets (static resources)
            ├── common (project information/data defined here)
            ├── components (all components of the project)
            ├── hooks (all hooks of the project)
            ├── i18n (Initialize the front-end i18n)
            ├── pages (all pages of the project)
            ├── router (Project routing definition)
            ├── services (all data api of the project)
            ├── stores (all data stores of the project)
            ├── utils (all utils of the project)
            ├── plugins (UI Plugin Development & Debugging Directory)

ui (front-end project starts here)
├── build (built results directory, usually without concern)
├── public (html template for public)
├── scripts (some scripting tools on front-end project)
├── src (almost all front-end resources are here)
├── assets (static resources)
├── common (project information/data defined here)
├── components (all components of the project)
├── hooks (all hooks of the project)
├── i18n (Initialize the front-end i18n)
├── pages (all pages of the project)
├── router (Project routing definition)
├── services (all data api of the project)
├── stores (all data stores of the project)
├── utils (all utils of the project)
├── plugins (UI Plugin Development & Debugging Directory)