code: private void doExport(final String fileName) throws FrameworkException {
  
  		// collect all nodes etc that belong to the frontend (including files)
  		// and export them to the given output file
  		final Set<RelationshipInterface> rels = new LinkedHashSet<>();
  		final Set<NodeInterface> nodes        = new LinkedHashSet<>();
  		final Set<String> filePaths           = new LinkedHashSet<>();
  		final App app                         = StructrApp.getInstance();
  
  		try (final Tx tx = app.tx()) {
  
  			// collect folders that are marked for export
  			for (final Folder folder : app.nodeQuery(Folder.class).and(StructrApp.key(Folder.class, "includeInFrontendExport"), true).getAsList()) {
  
  				collectDataRecursively(app, folder, nodes, rels, filePaths);
  			}
  
  			// collect pages (including files, shared components etc.)
  			for (final Page page : app.nodeQuery(Page.class).getAsList()) {
  
  				collectDataRecursively(app, page, nodes, rels, filePaths);
  			}
  
  			SyncCommand.exportToFile(fileName, nodes, rels, filePaths, true);
  
  			tx.success();
  		}
  	}
docs: ----- private methods -----