Project Specification
This document introduces project development specifications and standard specifications for build artifacts.
Development Project Specifications
In the project development process, a good project structure is crucial. It helps developers quickly locate issues, reduce project complexity, and improve development efficiency.
Frontend Development Specifications
When developing frontend, please follow the directory structure specifications below. All frontend project files need to be placed in the web directory under the project root:
web/
├── index.html # Main entry HTML file
└── build.sh # Build scriptweb/
├── index.html # Main entry HTML file
├── package.json # Project dependencies and script configuration
├── public/ # Static resources directory
├── src/ # Source code directory
│ ├── assets/ # Static resources
│ ├── components/ # Components directory
│ ├── App.vue # Root component
│ ├── main.js # Application entry file
│ └── style.css # Global styles
├── vite.config.js # Vite configuration file
├── yarn.lock # Yarn package manager lock file
└── build.sh # Build scriptweb/
├── index.html # Main entry HTML file
├── public/ # Public resources folder
│ └── vite.svg # Vite icon
├── src/ # Source code directory
│ ├── assets/ # Static resources
│ ├── components/ # Components directory
│ ├── App.jsx # Root component
│ ├── main.jsx # Application entry file
│ └── style.css # Global styles
├── vite.config.js # Vite configuration file
├── yarn.lock # Yarn package manager lock file
└── build.sh # Build scriptBackend Development Specifications
When developing backend, please use the following directory structure. All backend project files need to be stored in the backend directory:
backend/
├── app/
│ ├── consts/ # Constant definitions (status codes, config items, etc.)
│ ├── i18n/ # Internationalization module (supports Chinese and English by default)
│ ├── middlewares/ # Middleware (authentication, request interception, etc.)
│ ├── schemas/ # Input validation (Pydantic or custom rules)
│ ├── services/ # Core business logic processing
│ ├── utils/ # Utility modules (logging, RPC calls, etc.)
├── config.yaml # Application configuration file (logging, port, meta info, etc.)
├── install.sh # Installation script (Redis, dependencies, etc.)
├── main.py # Application entry, contains service registration and startup logic
├── Makefile # Compile/package command definitions
├── requirements.txt # Python dependency list (optionally use Poetry)Complete Project Structure
The complete application project directory structure should look like this:
my-gmssh-app/
├── web/ # Frontend directory
│ ├── index.html # Main entry HTML file
│ └── build.sh # Build script
├── backend/ # Backend directory
│ ├── app/
│ │ ├── consts/ # Constant definitions
│ │ ├── i18n/ # Internationalization module
│ │ ├── middlewares/ # Middleware
│ │ ├── schemas/ # Input validation
│ │ ├── services/ # Core business logic
│ │ └── utils/ # Utility modules
│ ├── config.yaml # Application configuration file
│ ├── install.sh # Installation script
│ ├── main.py # Application entry
│ ├── Makefile # Compile/package commands
│ └── requirements.txt # Python dependencies
├── Makefile # Project root build script
└── .gitignore # Git version control ignore fileApplication Artifact Specifications
To ensure application consistency and standardization, we need to use the following directory structure to organize build artifacts.
Build Artifact Deployment Specifications
When executing Makefile builds, please deploy build artifacts according to the following rules:
- Backend build artifacts: Place in
app/bindirectory, main executable must be namedmain - Frontend build artifacts: Place in
app/wwwdirectory, main entry file must be namedindex.html
Important Note
If your backend service type is socket service, the generated socket file must be placed in the tmp directory and named app.sock, otherwise the application will not run properly.
omc/
├── app/ # Application directory
│ ├── bin/ # Executable files directory
│ │ └── main # Main application executable
│ └── www/ # Web static resources directory
│ └── index.html # Frontend entry page
├── config/ # Configuration files directory
├── data/ # Data storage directory
├── logs/ # Log files directory
└── tmp/ # Temporary files directoryApplication Deployment Path
After the application package is approved and listed, the user-downloaded application will be stored at the following path on the server:
/.__gmssh/plugin/{org-name}/{app-name}/Where {org-name} and {app-name} will be replaced with actual organization and application information.
