diff --git a/Cargo.lock b/Cargo.lock
index 4c9b8ce4a36..d8469af6d49 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1407,6 +1407,17 @@ dependencies = [
"winapi 0.3.9",
]
+[[package]]
+name = "displaydoc"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.64",
+]
+
[[package]]
name = "distance"
version = "0.4.0"
@@ -6579,6 +6590,7 @@ dependencies = [
"wasmer-wasix",
"wasmer-wast",
"webc",
+ "zip",
]
[[package]]
@@ -7671,3 +7683,18 @@ name = "zeroize"
version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d"
+
+[[package]]
+name = "zip"
+version = "1.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c700ea425e148de30c29c580c1f9508b93ca57ad31c9f4e96b83c194c37a7a8f"
+dependencies = [
+ "arbitrary",
+ "crc32fast",
+ "crossbeam-utils 0.8.19",
+ "displaydoc",
+ "flate2",
+ "indexmap 2.2.6",
+ "thiserror",
+]
diff --git a/lib/backend-api/src/query.rs b/lib/backend-api/src/query.rs
index 8a76b27b5ad..8ac41cdc69c 100644
--- a/lib/backend-api/src/query.rs
+++ b/lib/backend-api/src/query.rs
@@ -12,7 +12,8 @@ use wasmer_config::package::PackageIdent;
use crate::{
types::{
self, CreateNamespaceVars, DeployApp, DeployAppConnection, DeployAppVersion,
- DeployAppVersionConnection, DnsDomain, GetCurrentUserWithAppsVars, GetDeployAppAndVersion,
+ DeployAppVersionConnection, DnsDomain, GetAppTemplateFromSlugVariables,
+ GetAppTemplatesQueryVariables, GetCurrentUserWithAppsVars, GetDeployAppAndVersion,
GetDeployAppVersionsVars, GetNamespaceAppsVars, GetSignedUrlForPackageUploadVariables, Log,
LogStream, PackageVersionConnection, PublishDeployAppVars, PushPackageReleasePayload,
SignedUrl, TagPackageReleasePayload, UpsertDomainFromZoneFileVars,
@@ -55,6 +56,36 @@ pub async fn fetch_webc_package(
webc::compat::Container::from_bytes(data).context("failed to parse webc package")
}
+/// Fetch app templates.
+pub async fn fetch_app_template_from_slug(
+ client: &WasmerClient,
+ slug: String,
+) -> Result