From 67d6404c70a48583ab5136dbc8acc766a4f67fc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Fri, 21 Feb 2025 12:46:44 +0100 Subject: [PATCH] Add further templates --- .env | 2 +- app/config/site-templates.php | 142 +++++++++++++++++++++------------- 2 files changed, 89 insertions(+), 55 deletions(-) diff --git a/.env b/.env index 66bc54aac9..73283cb4ff 100644 --- a/.env +++ b/.env @@ -82,7 +82,7 @@ _APP_EXECUTOR_SECRET=your-secret-key _APP_EXECUTOR_HOST=http://exc1/v1 _APP_FUNCTIONS_RUNTIMES=php-8.0,node-18.0,python-3.9,ruby-3.1 _APP_SITES_RUNTIMES=static-1,ssr-22,flutter-3.24 -_APP_SITES_FRAMEWORKS=sveltekit,nextjs,nuxt,astro,remix,flutter,other # TODO: Angular +_APP_SITES_FRAMEWORKS=sveltekit,nextjs,nuxt,astro,remix,flutter,other,react,vue # TODO: Angular _APP_MAINTENANCE_INTERVAL=86400 _APP_MAINTENANCE_DELAY= _APP_MAINTENANCE_RETENTION_CACHE=2592000 diff --git a/app/config/site-templates.php b/app/config/site-templates.php index ff62bb1727..79d230bcb5 100644 --- a/app/config/site-templates.php +++ b/app/config/site-templates.php @@ -200,18 +200,17 @@ return [ ] ], [ - 'key' => 'starter-for-react-native', - 'name' => 'React Native starter', + 'key' => 'starter-for-vue', + 'name' => 'Vue starter', 'useCases' => ['starter'], - 'demoImage' => $url . '/console/images/sites/templates/starter-for-react-native.png', + 'demoImage' => $url . '/console/images/sites/templates/starter-for-vue.png', 'frameworks' => [ - getFramework('REACT', [ + getFramework('VUE', [ 'providerRootDirectory' => './', - 'fallbackFile' => '+not-found.html', ]), ], 'vcsProvider' => 'github', - 'providerRepositoryId' => 'starter-for-react-native', + 'providerRepositoryId' => 'starter-for-vue', 'providerOwner' => 'appwrite', 'providerVersion' => '0.1.*', 'variables' => [ @@ -241,6 +240,48 @@ return [ ], ] ], + [ + 'key' => 'starter-for-react-native', + 'name' => 'React Native starter', + 'useCases' => ['starter'], + 'demoImage' => $url . '/console/images/sites/templates/starter-for-react-native.png', + 'frameworks' => [ + getFramework('REACT', [ + 'providerRootDirectory' => './', + 'fallbackFile' => '+not-found.html', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'starter-for-react-native', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.1.*', + 'variables' => [ + [ + 'name' => 'EXPO_PUBLIC_APPWRITE_ENDPOINT', + 'description' => 'Endpoint of Appwrite server', + 'value' => '{apiEndpoint}', + 'placeholder' => '{apiEndpoint}', + 'required' => true, + 'type' => 'text' + ], + [ + 'name' => 'EXPO_PUBLIC_APPWRITE_PROJECT_ID', + 'description' => 'Your Appwrite project ID', + 'value' => '{projectId}', + 'placeholder' => '{projectId}', + 'required' => true, + 'type' => 'text' + ], + [ + 'name' => 'EXPO_PUBLIC_APPWRITE_PROJECT_NAME', + 'description' => 'Your Appwrite project name', + 'value' => '{projectName}', + 'placeholder' => '{projectName}', + 'required' => true, + 'type' => 'text' + ], + ] + ], [ 'key' => 'starter-for-nextjs', 'name' => 'Next.js starter', @@ -282,6 +323,47 @@ return [ ], ] ], + [ + 'key' => 'starter-for-nuxt', + 'name' => 'Nuxt starter', + 'useCases' => ['starter'], + 'demoImage' => $url . '/console/images/sites/templates/starter-for-nuxt.png', + 'frameworks' => [ + getFramework('NUXT', [ + 'providerRootDirectory' => './', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'starter-for-nuxt', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.1.*', + 'variables' => [ + [ + 'name' => 'NUXT_PUBLIC_APPWRITE_ENDPOINT', + 'description' => 'Endpoint of Appwrite server', + 'value' => '{apiEndpoint}', + 'placeholder' => '{apiEndpoint}', + 'required' => true, + 'type' => 'text' + ], + [ + 'name' => 'NUXT_PUBLIC_APPWRITE_PROJECT_ID', + 'description' => 'Your Appwrite project ID', + 'value' => '{projectId}', + 'placeholder' => '{projectId}', + 'required' => true, + 'type' => 'text' + ], + [ + 'name' => 'NUXT_PUBLIC_APPWRITE_PROJECT_NAME', + 'description' => 'Your Appwrite project name', + 'value' => '{projectName}', + 'placeholder' => '{projectName}', + 'required' => true, + 'type' => 'text' + ], + ] + ], [ 'key' => 'template-for-event', 'name' => 'Event template', @@ -390,54 +472,6 @@ return [ 'providerVersion' => '0.1.*', 'variables' => [] ], - [ - 'key' => 'nextjs-starter', - 'name' => 'Next.js starter', - 'useCases' => ['starter'], - 'demoImage' => '', - 'frameworks' => [ - getFramework('NEXTJS', [ - 'providerRootDirectory' => './nextjs/starter', - ]), - ], - 'vcsProvider' => 'github', - 'providerRepositoryId' => 'templates-for-sites', - 'providerOwner' => 'appwrite', - 'providerVersion' => '0.2.*', - 'variables' => [], - ], - [ - 'key' => 'nuxt-starter', - 'name' => 'Nuxt starter', - 'useCases' => ['starter'], - 'demoImage' => '', - 'frameworks' => [ - getFramework('NUXT', [ - 'providerRootDirectory' => './nuxt/starter', - ]), - ], - 'vcsProvider' => 'github', - 'providerRepositoryId' => 'templates-for-sites', - 'providerOwner' => 'appwrite', - 'providerVersion' => '0.2.*', - 'variables' => [], - ], - [ - 'key' => 'sveltekit-starter', - 'name' => 'SvelteKit starter', - 'useCases' => ['starter'], - 'demoImage' => '', - 'frameworks' => [ - getFramework('SVELTEKIT', [ - 'providerRootDirectory' => './sveltekit/starter', - ]), - ], - 'vcsProvider' => 'github', - 'providerRepositoryId' => 'templates-for-sites', - 'providerOwner' => 'appwrite', - 'providerVersion' => '0.2.*', - 'variables' => [], - ], [ 'key' => 'astro-starter', 'name' => 'Astro starter',