Skip to main content

Application Directory and Element Source Code

JitAi application directories are built based on JAAP (JitAi AI Application Protocol), using standard directory structures to organize element code.

Application Directory Structure

Each application corresponds to an independent folder, with the path rule in the runtime environment being runtime environment directory/organization ID/application ID/application version, for example home/environs/JRE_MWcVmUZjEq/wanyun/MyApp/1_0_0.

Standard Directory Structure Example
MyApp/                     # Application root directory
├── app.json # Application configuration manifest
├── requirements.txt # Python dependency declarations

├── appData/ # Application data storage
├── dist/ # Compiled build artifacts
├── commons/ # Common code library

├── models/ # Data model elements
├── databases/ # Database connection elements
├── caches/ # Cache service elements
└── storages/ # Storage service elements

The dist directory stores build artifacts generated by JitNodes packaging the application. Every time developers modify application element code and save it in JitAi development tools, incremental packaging is automatically triggered.

Element Code Directory Structure

Application directories are composed of element directories, and each element directory also follows JAAP (JitAi AI Application Protocol) with its own composition rules.

Standard Element Directory Structure
element-name/
├── e.json # Element definition manifest
├── config.json # Runtime configuration
├── loader.py # Element loader (non-instance elements)
├── lifecycle.py # Lifecycle
├── xxx.py # Element logic implementation

Application Source Code Export and Import

JitAi provides flexible application export and import functionality, supporting various formats such as source code package export and WeChat MiniProgram export, facilitating application distribution, backup, and module reuse.

Export Source Code Zip Package

In the application list of the Node Console, click the More-Export Application button on the application card to download the application source code zip package.

Source Code Package Features:

  • Contains complete application source code and resource files
  • Preserves application directory structure and configuration information
  • Supports import and continued development on other nodes
  • Facilitates version control and code backup

Export to WeChat MiniProgram

The platform supports exporting applications as WeChat MiniPrograms, with application source code embedded into the WeChat MiniProgram project directory, facilitating secondary development and publishing in the WeChat MiniProgram ecosystem.

WeChat MiniProgram Export Features:

  • Automatically adapts to WeChat MiniProgram directory structure
  • Converts JitAi components to MiniProgram-compatible formats
  • Preserves business logic and data processing functionality
  • Supports MiniProgram-specific lifecycle and APIs

Import Application Source Code Package

Click the Import Application button in the Node Console to import application source code zip packages into the node's default runtime environment and continue development on new nodes.