Application structure
Application structure is a set of directories and files that define the application. The structure is based on the JetQuery platform and is used to create, deploy, and manage applications.
Getting Started
- All components should be stored in the
/componentsfolder. - All pages should be located in the
/pagesfolder. - In the
/pagesfolder, plain HTML files can also be placed. - Customization of routes is possible, referring to the section on creating routes.
- Files with disallowed extensions will result in a 404 error. Allowed extensions include
".css", ".html", ".js", ".pdf", ".json", ".ico", ".woff", ".woff2", ".ttf", ".otf", ".jpg", ".png", ".svg", ".webp", ".gif". - Files in
/pagesand/componentsmust have unique names. - Component should be named with a
v_prefix, for example,v_test_component.js.
Path Conventions
The general structure of API paths is as follows:
/api/{{area}}/{{module}}/{{action}}
{{area}}- Represents thecore,srs,erp,crm, etc.{{module}}- Represents the specific module such asaccount,system,apps,connections,storage,filesetc.{{action}}- Represents the action to be performed, such asbrowse,delete,update,create, etc.
Optional query parameters
app_name=optional application context, with the default being the current user.ptoken=optional API TOKENpscope=optional parameter for the parent scope (used in SRS).paanda=recoveryoptional recovery mode all application ui is disabled and only recovery ui is shown.paanda=bundleoptional debug mode all application ui is disabled and only debug ui is shown.pmode=trueoptional hide top menu/navigation component
Application directory Structure
/api/*- internal api/assets/*- Includes CSS, JS, fonts, and other assets not managed by the system/assets/images- images/assets/css- css/assets/js- js
/db- Database files scripts for data and business objects/css- CSS files managed by the system for compression, bundling, and automations./js- JavaScript files managed by the system for compression, bundling, and automations./js/!body- JavaScript files to be included in the body of the HTML file/js/!head- JavaScript files to be included in the head of the HTML file/js/*- all other files
/components- Vue components managed by the system for compression, bundling, and automations. Registered by name, directory structure is ignored, component name must be unique/pages- User interface pages/templates- Templates/srs- API definitions/global.xml- global definition, all other files are inherited from this file
Note
Files in /css /js /components /pages directories are processed by the server and minified. Name must be unique across each directory and subdirectory.
Note
Files in /js directory are not processed by the server and are served as is.
| HTML | |
|---|---|
Special files you my find in the root directory
list.txt,data.zip- autogenerated temporary files/.vscode/settings.json- Visual Studio Code configuration file required for local development.gitignore- git ignore fileindex.html- autogenerated file for local development