Skip to content

Instantly share code, notes, and snippets.

@line-o
Last active March 26, 2026 18:09
Show Gist options
  • Select an option

  • Save line-o/d3ae325d9a9bcf92121be4b5c3f50cbd to your computer and use it in GitHub Desktop.

Select an option

Save line-o/d3ae325d9a9bcf92121be4b5c3f50cbd to your computer and use it in GitHub Desktop.
repository layouts

XAR package repository layout (gulp)

my-app/                       # repository root
├── .git/                     # git files
├── package.json              # npm project metadata + build scripts
├── package-lock.json         # npm lock file
├── .gitignore                # files that should not be in version control (node_modules, ...)
├── gulpfile.js               # Build orchestration, defines tasks like build XAR, watch and deploy files
├── ...                       # other settings files (prettierrc, xstrc, existdb.json, ...)
├── app/                      # All source files that will be used to create the app 
│   ├── expath-pkg.xml        # EXPath package descriptor (name, version, dependencies) - not present if template is used
│   ├── expath-pkg.xml.tmpl   # EXPath package descriptor template with placeholders for name, version, dependencies, ...
│   ├── repo.xml              # eXist descriptor (type=application, target, permissions) - not present if template is used
│   ├── repo.xml.tmpl         # eXist descriptor template with placeholders for version, etc.
│   ├── collection.xconf      # Lucene full-text and range index configuration and trigger definitions
│   ├── controller.xq         # URL routing (at package root, NOT in content/)
│   ├── prepare.xq            # Runs before package contents are stored
│   ├── finish.xq             # Runs after installation (setup collections, indexes, etc.)
│   ├── icon.png              # App icon (shown in Dashboard launcher) [optional]
│   ├── icon.svg              # App icon as vector graphics [optional]
│   ├── api.json              # OpenAPI spec (if using Roaster)
│   ├── modules/              # Application XQuery modules
│   │   ├── config.xqm        # App configuration (paths, context) [optional]
│   │   ├── api.xq            # Roaster API entry point (if using Roaster)
│   │   └── ...               # Other app-specific modules
│   ├── templates/            # Jinks/HTML templates
│   │   ├── page.html         # Base page template
│   │   └── partials/         # component templates [optional]
│   ├── resources/            # Static assets
│   │   ├── css/
│   │   ├── js/
│   │   └── images/
│   └── data/                 # App data (articles, content, etc.)
├── build/                    # Intermediary build directory to assemble package contents 
├── dist/                     # Output folder for build artifacts 
└── spec/                     # All Test related resources
    ├── fixtures/             # Test fixtures needed for testing (snapshots, binaries, ...)
    └── tests/                # Test files (XQSuite, Cypress, etc.)

XAR package repository layout (maven)

my-app/                               # repository root
├── .git/                             # git files
├── xar-assembly.xml                  # XAR package definition for the maven plugin; will be used to create expath-pkg.xml, repo.xml, exist.xml 
├── pom.xml                           # maven dependencies
├── .gitignore                        # files that should not be in version control (node_modules, ...)
├── ...                               # other settings files (prettierrc, xstrc, existdb.json, ...)
├── src/                              # Maven source folder;
│   ├── main/                         # All source files that will be used to create the app
│   │   ├── java/                     # All Java classes of the app
│   │   └── xar-resources/            # All other resources that make up the application
│   │       ├── collection.xconf      # Lucene full-text and range index configuration and trigger definitions
│   │       ├── controller.xq         # URL routing (at package root, NOT in content/)
│   │       ├── prepare.xq            # Runs before package contents are stored
│   │       ├── finish.xq             # Runs after installation (setup collections, indexes, etc.)
│   │       ├── icon.png              # App icon (shown in Dashboard launcher) [optional]
│   │       ├── icon.svg              # App icon as vector graphics [optional]
│   │       ├── api.json              # OpenAPI spec (if using Roaster)
│   │       ├── modules/              # Application XQuery modules
│   │       │   ├── config.xqm        # App configuration (paths, context) [optional]
│   │       │   ├── api.xq            # Roaster API entry point (if using Roaster)
│   │       │   └── ...               # Other app-specific modules
│   │       ├── templates/            # Jinks/HTML templates
│   │       │   ├── page.html         # Base page template
│   │       │   └── partials/         # component templates [optional]
│   │       ├── resources/            # Static assets
│   │       │   ├── css/
│   │       │   ├── js/
│   │       │   └── images/
│   │       └── data/                 # App data (articles, content, etc.)
│   └── test/                         # All Test related resources
│       ├── fixtures/                 # Test fixtures needed for testing (snapshots, binaries, ...)
│       └── tests/                    # Test files (XQSuite, Cypress, etc.)
└── target/                           # Maven output folder for build artifacts 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment