HomeDocs
Skip to main content

Directory Structure

A MiniApp Mini Program consists of an app descriptor and multiple page descriptors, each describing a specific page of the Mini Program.

Directory Structure of a Mini Program

.
├── pages // Pages of the Mini Program
│ ├── index.css // Page-specific stylesheet
│ ├── index.dlt // Page-specific template
│ ├── index.js // Page-specific logic
│ └── index.json // Page-specific configuration
├── app.css // Global stylesheet for the Mini Program
├── app.js // Global logic for the Mini Program
└── app.json // Global configuration for the Mini Program

Main Components

The main components of a Mini Program are three files that must be located in the project's root directory, as follows:

FileRequiredPurpose
app.jsYesLogic for the Mini Program
app.jsonYesGlobal configuration for the Mini Program
app.cssNoGlobal stylesheet for the Mini Program

Page Components

Each individual page in a Mini Program is composed of four files:

FileRequiredPurpose
.jsYesPage-specific logic
.dltYesPage-specific template
.jsonNoPage-specific configuration
.cssNoPage-specific stylesheet

Note: For ease of development and to reduce configuration, the four files describing a page must have the same file name and path.

Allowed Uploadable Files In the project directory, the following files are compiled, making them inaccessible after upload: .js, app.json, .dlt, and *.css (for pages configured in app.json). In addition, only files with extensions listed in the whitelist can be uploaded. Files not listed in the whitelist can be accessed in the development tool but cannot be uploaded. The whitelist includes:

  1. png
  2. jpg
  3. jpeg
  4. gif
  5. svg
  6. json
  7. cer
  8. mp3
  9. aac
  10. m4a
  11. mp4
  12. wav
  13. ogg
  14. silk
  15. wasm
  16. br
  17. cert
Privacy agreementDeveloper agreementcontact us: developer_service.mi@transsion.com © 2024 MiniApp. All Rights Reserved.