diff --git a/app/config/templates/site.php b/app/config/templates/site.php index 6989cc026d..7f8951d0f9 100644 --- a/app/config/templates/site.php +++ b/app/config/templates/site.php @@ -183,13 +183,15 @@ return [ 'variables' => [] ], [ - 'key' => 'lynx-starter', - 'name' => 'Lynx Starter', - 'tagline' => 'Sample application built with Lynx, a cross-platform framework focused on performance.', + 'key' => 'playground-for-lynx', + 'name' => 'Lynx playground', + 'tagline' => 'A basic Lynx website without Appwrite SDK integration.', + // When we add Lynx with Appwrite SDK, use following tagline for it: + // 'tagline' => 'Sample application built with Lynx, a cross-platform framework focused on performance.', 'score' => 1, // 0 to 10 based on looks of screenshot (avoid 1,2,3,8,9,10 if possible) 'useCases' => [UseCases::STARTER], - 'screenshotDark' => $url . '/images/sites/templates/lynx-starter-dark.png', - 'screenshotLight' => $url . '/images/sites/templates/lynx-starter-light.png', + 'screenshotDark' => $url . '/images/sites/templates/playground-for-lynx-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/playground-for-lynx-light.png', 'frameworks' => [ getFramework('LYNX', [ 'providerRootDirectory' => './lynx/starter', @@ -1108,15 +1110,14 @@ return [ 'providerVersion' => '0.1.*', 'variables' => [] ], - // TODO: Remove astro starter eventually, or add all frameworks's starters [ - 'key' => 'astro-starter', - 'name' => 'Astro starter', - 'tagline' => 'Sample application built with Astro, a content-driven web framework.', + 'key' => 'playground-for-astro', + 'name' => 'Astro playground', + 'tagline' => 'A basic Astro website without Appwrite SDK integration.', 'score' => 1, // 0 to 10 based on looks of screenshot (avoid 1,2,3,8,9,10 if possible) 'useCases' => [UseCases::STARTER], - 'screenshotDark' => $url . '/images/sites/templates/astro-starter-dark.png', - 'screenshotLight' => $url . '/images/sites/templates/astro-starter-light.png', + 'screenshotDark' => $url . '/images/sites/templates/playground-for-astro-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/playground-for-astro-light.png', 'frameworks' => [ getFramework('ASTRO', [ 'providerRootDirectory' => './astro/starter', @@ -1125,17 +1126,17 @@ return [ 'vcsProvider' => 'github', 'providerRepositoryId' => 'templates-for-sites', 'providerOwner' => 'appwrite', - 'providerVersion' => '0.2.*', + 'providerVersion' => '0.3.*', 'variables' => [], ], [ - 'key' => 'remix-starter', - 'name' => 'Remix starter', - 'tagline' => 'Sample application built with Remix, a React meta-framework.', + 'key' => 'playground-for-remix', + 'name' => 'Remix playground', + 'tagline' => 'A basic Remix website without Appwrite SDK integration.', 'score' => 1, // 0 to 10 based on looks of screenshot (avoid 1,2,3,8,9,10 if possible) 'useCases' => [UseCases::STARTER], - 'screenshotDark' => $url . '/images/sites/templates/remix-starter-dark.png', - 'screenshotLight' => $url . '/images/sites/templates/remix-starter-light.png', + 'screenshotDark' => $url . '/images/sites/templates/playground-for-remix-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/playground-for-remix-light.png', 'frameworks' => [ getFramework('REMIX', [ 'providerRootDirectory' => './remix/starter', @@ -1144,7 +1145,201 @@ return [ 'vcsProvider' => 'github', 'providerRepositoryId' => 'templates-for-sites', 'providerOwner' => 'appwrite', - 'providerVersion' => '0.2.*', + 'providerVersion' => '0.3.*', + 'variables' => [], + ], + [ + 'key' => 'playground-for-nextjs', + 'name' => 'Next.js playground', + 'tagline' => 'A basic Next.js website without Appwrite SDK integration.', + 'score' => 1, // 0 to 10 based on looks of screenshot (avoid 1,2,3,8,9,10 if possible) + 'useCases' => [UseCases::STARTER], + 'screenshotDark' => $url . '/images/sites/templates/playground-for-nextjs-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/playground-for-nextjs-light.png', + 'frameworks' => [ + getFramework('NEXTJS', [ + 'providerRootDirectory' => './nextjs/starter', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'templates-for-sites', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.3.*', + 'variables' => [], + ], + [ + 'key' => 'playground-for-flutter', + 'name' => 'Flutter playground', + 'tagline' => 'A basic Flutter website without Appwrite SDK integration.', + 'score' => 1, // 0 to 10 based on looks of screenshot (avoid 1,2,3,8,9,10 if possible) + 'useCases' => [UseCases::STARTER], + 'screenshotDark' => $url . '/images/sites/templates/playground-for-flutter-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/playground-for-flutter-light.png', + 'frameworks' => [ + getFramework('FLUTTER', [ + 'providerRootDirectory' => './flutter/starter', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'templates-for-sites', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.3.*', + 'variables' => [], + ], + [ + 'key' => 'playground-for-vite', + 'name' => 'Vite playground', + 'tagline' => 'A basic Vite website without Appwrite SDK integration.', + 'score' => 1, // 0 to 10 based on looks of screenshot (avoid 1,2,3,8,9,10 if possible) + 'useCases' => [UseCases::STARTER], + 'screenshotDark' => $url . '/images/sites/templates/playground-for-vite-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/playground-for-vite-light.png', + 'frameworks' => [ + getFramework('VITE', [ + 'providerRootDirectory' => './vite/starter', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'templates-for-sites', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.3.*', + 'variables' => [], + ], + [ + 'key' => 'playground-for-angular', + 'name' => 'Angular playground', + 'tagline' => 'A basic Angular website without Appwrite SDK integration.', + 'score' => 1, // 0 to 10 based on looks of screenshot (avoid 1,2,3,8,9,10 if possible) + 'useCases' => [UseCases::STARTER], + 'screenshotDark' => $url . '/images/sites/templates/playground-for-angular-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/playground-for-angular-light.png', + 'frameworks' => [ + getFramework('ANGULAR', [ + 'providerRootDirectory' => './angular/starter', + 'outputDirectory' => './dist/starter/browser', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'templates-for-sites', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.3.*', + 'variables' => [], + ], + [ + 'key' => 'playground-for-analog', + 'name' => 'Analog playground', + 'tagline' => 'A basic Analog website without Appwrite SDK integration.', + 'score' => 1, // 0 to 10 based on looks of screenshot (avoid 1,2,3,8,9,10 if possible) + 'useCases' => [UseCases::STARTER], + 'screenshotDark' => $url . '/images/sites/templates/playground-for-analog-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/playground-for-analog-light.png', + 'frameworks' => [ + getFramework('ANALOG', [ + 'providerRootDirectory' => './analog/starter', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'templates-for-sites', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.3.*', + 'variables' => [], + ], + [ + 'key' => 'playground-for-svelte', + 'name' => 'Svelte playground', + 'tagline' => 'A basic Svelte website without Appwrite SDK integration.', + 'score' => 1, // 0 to 10 based on looks of screenshot (avoid 1,2,3,8,9,10 if possible) + 'useCases' => [UseCases::STARTER], + 'screenshotDark' => $url . '/images/sites/templates/playground-for-svelte-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/playground-for-svelte-light.png', + 'frameworks' => [ + getFramework('SVELTEKIT', [ + 'providerRootDirectory' => './sveltekit/starter', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'templates-for-sites', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.3.*', + 'variables' => [], + ], + + [ + 'key' => 'playground-for-react', + 'name' => 'React playground', + 'tagline' => 'A basic React website without Appwrite SDK integration.', + 'score' => 1, // 0 to 10 based on looks of screenshot (avoid 1,2,3,8,9,10 if possible) + 'useCases' => [UseCases::STARTER], + 'screenshotDark' => $url . '/images/sites/templates/playground-for-react-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/playground-for-react-light.png', + 'frameworks' => [ + getFramework('REACT', [ + 'outputDirectory' => './build', + 'providerRootDirectory' => './react/starter', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'templates-for-sites', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.3.*', + 'variables' => [], + ], + + [ + 'key' => 'playground-for-vue', + 'name' => 'Vue playground', + 'tagline' => 'A basic Vue website without Appwrite SDK integration.', + 'score' => 1, // 0 to 10 based on looks of screenshot (avoid 1,2,3,8,9,10 if possible) + 'useCases' => [UseCases::STARTER], + 'screenshotDark' => $url . '/images/sites/templates/playground-for-vue-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/playground-for-vue-light.png', + 'frameworks' => [ + getFramework('VUE', [ + 'providerRootDirectory' => './vue/starter', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'templates-for-sites', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.3.*', + 'variables' => [], + ], + [ + 'key' => 'playground-for-nuxt', + 'name' => 'Nuxt playground', + 'tagline' => 'A basic Nuxt website without Appwrite SDK integration.', + 'score' => 1, // 0 to 10 based on looks of screenshot (avoid 1,2,3,8,9,10 if possible) + 'useCases' => [UseCases::STARTER], + 'screenshotDark' => $url . '/images/sites/templates/playground-for-nuxt-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/playground-for-nuxt-light.png', + 'frameworks' => [ + getFramework('NUXT', [ + 'providerRootDirectory' => './nuxt/starter', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'templates-for-sites', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.3.*', + 'variables' => [], + ], + [ + 'key' => 'playground-for-react-native', + 'name' => 'React Native playground', + 'tagline' => 'A basic React Native website without Appwrite SDK integration.', + 'score' => 1, // 0 to 10 based on looks of screenshot (avoid 1,2,3,8,9,10 if possible) + 'useCases' => [UseCases::STARTER], + 'screenshotDark' => $url . '/images/sites/templates/playground-for-react-native-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/playground-for-react-native-light.png', + 'frameworks' => [ + getFramework('REACT', [ + 'providerRootDirectory' => './react-native/starter', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'templates-for-sites', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.3.*', 'variables' => [], ], ]; diff --git a/docker-compose.yml b/docker-compose.yml index 037d71ed44..75e544a91b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -942,7 +942,7 @@ services: appwrite-browser: container_name: appwrite-browser - image: appwrite/browser:0.2.2 + image: appwrite/browser:0.2.4 networks: - appwrite diff --git a/public/images/sites/templates/lynx-starter-dark.png b/public/images/sites/templates/lynx-starter-dark.png deleted file mode 100644 index 017b00907f..0000000000 Binary files a/public/images/sites/templates/lynx-starter-dark.png and /dev/null differ diff --git a/public/images/sites/templates/lynx-starter-light.png b/public/images/sites/templates/lynx-starter-light.png deleted file mode 100644 index 0ffb0cfa43..0000000000 Binary files a/public/images/sites/templates/lynx-starter-light.png and /dev/null differ diff --git a/public/images/sites/templates/playground-for-analog-dark.png b/public/images/sites/templates/playground-for-analog-dark.png new file mode 100644 index 0000000000..7a1d1d77ef Binary files /dev/null and b/public/images/sites/templates/playground-for-analog-dark.png differ diff --git a/public/images/sites/templates/playground-for-analog-light.png b/public/images/sites/templates/playground-for-analog-light.png new file mode 100644 index 0000000000..69d2efb753 Binary files /dev/null and b/public/images/sites/templates/playground-for-analog-light.png differ diff --git a/public/images/sites/templates/playground-for-angular-dark.png b/public/images/sites/templates/playground-for-angular-dark.png new file mode 100644 index 0000000000..91a77137d3 Binary files /dev/null and b/public/images/sites/templates/playground-for-angular-dark.png differ diff --git a/public/images/sites/templates/playground-for-angular-light.png b/public/images/sites/templates/playground-for-angular-light.png new file mode 100644 index 0000000000..91a77137d3 Binary files /dev/null and b/public/images/sites/templates/playground-for-angular-light.png differ diff --git a/public/images/sites/templates/astro-starter-dark.png b/public/images/sites/templates/playground-for-astro-dark.png similarity index 100% rename from public/images/sites/templates/astro-starter-dark.png rename to public/images/sites/templates/playground-for-astro-dark.png diff --git a/public/images/sites/templates/astro-starter-light.png b/public/images/sites/templates/playground-for-astro-light.png similarity index 100% rename from public/images/sites/templates/astro-starter-light.png rename to public/images/sites/templates/playground-for-astro-light.png diff --git a/public/images/sites/templates/playground-for-flutter-dark.png b/public/images/sites/templates/playground-for-flutter-dark.png new file mode 100644 index 0000000000..9b239ff767 Binary files /dev/null and b/public/images/sites/templates/playground-for-flutter-dark.png differ diff --git a/public/images/sites/templates/playground-for-flutter-light.png b/public/images/sites/templates/playground-for-flutter-light.png new file mode 100644 index 0000000000..9b239ff767 Binary files /dev/null and b/public/images/sites/templates/playground-for-flutter-light.png differ diff --git a/public/images/sites/templates/playground-for-lynx-dark.png b/public/images/sites/templates/playground-for-lynx-dark.png new file mode 100644 index 0000000000..7697b3bea4 Binary files /dev/null and b/public/images/sites/templates/playground-for-lynx-dark.png differ diff --git a/public/images/sites/templates/playground-for-lynx-light.png b/public/images/sites/templates/playground-for-lynx-light.png new file mode 100644 index 0000000000..655d810d10 Binary files /dev/null and b/public/images/sites/templates/playground-for-lynx-light.png differ diff --git a/public/images/sites/templates/playground-for-nextjs-dark.png b/public/images/sites/templates/playground-for-nextjs-dark.png new file mode 100644 index 0000000000..9569a416de Binary files /dev/null and b/public/images/sites/templates/playground-for-nextjs-dark.png differ diff --git a/public/images/sites/templates/playground-for-nextjs-light.png b/public/images/sites/templates/playground-for-nextjs-light.png new file mode 100644 index 0000000000..d048c17a8a Binary files /dev/null and b/public/images/sites/templates/playground-for-nextjs-light.png differ diff --git a/public/images/sites/templates/playground-for-nuxt-dark.png b/public/images/sites/templates/playground-for-nuxt-dark.png new file mode 100644 index 0000000000..bea04f1cf9 Binary files /dev/null and b/public/images/sites/templates/playground-for-nuxt-dark.png differ diff --git a/public/images/sites/templates/playground-for-nuxt-light.png b/public/images/sites/templates/playground-for-nuxt-light.png new file mode 100644 index 0000000000..006e366a9f Binary files /dev/null and b/public/images/sites/templates/playground-for-nuxt-light.png differ diff --git a/public/images/sites/templates/playground-for-react-dark.png b/public/images/sites/templates/playground-for-react-dark.png new file mode 100644 index 0000000000..6873d5632e Binary files /dev/null and b/public/images/sites/templates/playground-for-react-dark.png differ diff --git a/public/images/sites/templates/playground-for-react-light.png b/public/images/sites/templates/playground-for-react-light.png new file mode 100644 index 0000000000..79dc16ffdb Binary files /dev/null and b/public/images/sites/templates/playground-for-react-light.png differ diff --git a/public/images/sites/templates/playground-for-react-native-dark.png b/public/images/sites/templates/playground-for-react-native-dark.png new file mode 100644 index 0000000000..0e20806edc Binary files /dev/null and b/public/images/sites/templates/playground-for-react-native-dark.png differ diff --git a/public/images/sites/templates/playground-for-react-native-light.png b/public/images/sites/templates/playground-for-react-native-light.png new file mode 100644 index 0000000000..12829d47d6 Binary files /dev/null and b/public/images/sites/templates/playground-for-react-native-light.png differ diff --git a/public/images/sites/templates/playground-for-remix-dark.png b/public/images/sites/templates/playground-for-remix-dark.png new file mode 100644 index 0000000000..092e96da32 Binary files /dev/null and b/public/images/sites/templates/playground-for-remix-dark.png differ diff --git a/public/images/sites/templates/playground-for-remix-light.png b/public/images/sites/templates/playground-for-remix-light.png new file mode 100644 index 0000000000..f2ef9a9baf Binary files /dev/null and b/public/images/sites/templates/playground-for-remix-light.png differ diff --git a/public/images/sites/templates/playground-for-svelte-dark.png b/public/images/sites/templates/playground-for-svelte-dark.png new file mode 100644 index 0000000000..90ac7f96aa Binary files /dev/null and b/public/images/sites/templates/playground-for-svelte-dark.png differ diff --git a/public/images/sites/templates/playground-for-svelte-light.png b/public/images/sites/templates/playground-for-svelte-light.png new file mode 100644 index 0000000000..90ac7f96aa Binary files /dev/null and b/public/images/sites/templates/playground-for-svelte-light.png differ diff --git a/public/images/sites/templates/playground-for-vite-dark.png b/public/images/sites/templates/playground-for-vite-dark.png new file mode 100644 index 0000000000..35dfb354d9 Binary files /dev/null and b/public/images/sites/templates/playground-for-vite-dark.png differ diff --git a/public/images/sites/templates/playground-for-vite-light.png b/public/images/sites/templates/playground-for-vite-light.png new file mode 100644 index 0000000000..f06fab0470 Binary files /dev/null and b/public/images/sites/templates/playground-for-vite-light.png differ diff --git a/public/images/sites/templates/playground-for-vue-dark.png b/public/images/sites/templates/playground-for-vue-dark.png new file mode 100644 index 0000000000..7df0dfd555 Binary files /dev/null and b/public/images/sites/templates/playground-for-vue-dark.png differ diff --git a/public/images/sites/templates/playground-for-vue-light.png b/public/images/sites/templates/playground-for-vue-light.png new file mode 100644 index 0000000000..850e7ba9b8 Binary files /dev/null and b/public/images/sites/templates/playground-for-vue-light.png differ diff --git a/public/images/sites/templates/remix-starter-dark.png b/public/images/sites/templates/remix-starter-dark.png deleted file mode 100644 index 47c0cc0394..0000000000 Binary files a/public/images/sites/templates/remix-starter-dark.png and /dev/null differ diff --git a/public/images/sites/templates/remix-starter-light.png b/public/images/sites/templates/remix-starter-light.png deleted file mode 100644 index 73c2d12625..0000000000 Binary files a/public/images/sites/templates/remix-starter-light.png and /dev/null differ diff --git a/src/Appwrite/Platform/Tasks/Screenshot.php b/src/Appwrite/Platform/Tasks/Screenshot.php index 79593ab39b..3a9c9a64f5 100644 --- a/src/Appwrite/Platform/Tasks/Screenshot.php +++ b/src/Appwrite/Platform/Tasks/Screenshot.php @@ -224,8 +224,12 @@ class Screenshot extends Action $idLight = ''; $idDark = ''; - if ($templateId === 'starter-for-react-native') { - Console::warning("React Native template takes long to build, increasing waiting time ..."); + $slowTemplates = [ + 'starter-for-react-native', + 'playground-for-react-native' + ]; + if (\in_array($templateId, $slowTemplates)) { + Console::warning("Build for this template is slow, increasing waiting time ..."); $attempts = 180; // 15 min } diff --git a/tests/e2e/Services/Sites/SitesCustomServerTest.php b/tests/e2e/Services/Sites/SitesCustomServerTest.php index 1775995216..eea93a7e0d 100644 --- a/tests/e2e/Services/Sites/SitesCustomServerTest.php +++ b/tests/e2e/Services/Sites/SitesCustomServerTest.php @@ -1511,7 +1511,7 @@ class SitesCustomServerTest extends Scope public function testSiteTemplate(): void { - $template = $this->getTemplate('astro-starter'); + $template = $this->getTemplate('playground-for-astro'); $this->assertEquals(200, $template['headers']['status-code']); $template = $template['body'];