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/frameworks.php b/app/config/frameworks.php index d19262ff57..bd872001b0 100644 --- a/app/config/frameworks.php +++ b/app/config/frameworks.php @@ -44,6 +44,24 @@ return [ ] ] ], + 'react' => [ + 'key' => 'react', + 'name' => 'React', + 'buildRuntime' => 'ssr-22', + 'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'), + 'adapters' => [ + 'static' => [ + 'key' => 'static', + 'buildCommand' => 'npm run build', + 'installCommand' => 'npm install', + 'outputDirectory' => './dist', + 'startCommand' => 'sh helpers/server.sh', + 'bundleCommand' => '', + 'envCommand' => '', + 'fallbackFile' => 'index.html' + ] + ] + ], 'nuxt' => [ 'key' => 'nuxt', 'name' => 'Nuxt', @@ -70,6 +88,24 @@ return [ ] ] ], + 'vue' => [ + 'key' => 'vue', + 'name' => 'Vue.js', + 'buildRuntime' => 'ssr-22', + 'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'), + 'adapters' => [ + 'static' => [ + 'key' => 'static', + 'buildCommand' => 'npm run build', + 'installCommand' => 'npm install', + 'outputDirectory' => './dist', + 'startCommand' => 'sh helpers/server.sh', + 'bundleCommand' => '', + 'envCommand' => '', + 'fallbackFile' => 'index.html' + ] + ] + ], 'sveltekit' => [ 'key' => 'sveltekit', 'name' => 'SvelteKit', diff --git a/app/config/site-templates.php b/app/config/site-templates.php index 64d8cf3729..fbd4732573 100644 --- a/app/config/site-templates.php +++ b/app/config/site-templates.php @@ -79,6 +79,35 @@ const TEMPLATE_FRAMEWORKS = [ 'adapter' => 'static', 'fallbackFile' => null, ], + 'OTHER' => [ + 'key' => 'other', + 'name' => 'Other', + 'installCommand' => 'npm install', + 'buildCommand' => 'npm run build', + 'buildRuntime' => 'ssr-22', + 'adapter' => 'static', + 'fallbackFile' => 'index.html', + ], + 'REACT' => [ + 'key' => 'react', + 'name' => 'React', + 'installCommand' => 'npm install', + 'buildCommand' => 'npm run build', + 'buildRuntime' => 'ssr-22', + 'adapter' => 'static', + 'outputDirectory' => './dist', + 'fallbackFile' => 'index.html', + ], + 'VUE' => [ + 'key' => 'vue', + 'name' => 'Vue.js', + 'installCommand' => 'npm install', + 'buildCommand' => 'npm run build', + 'buildRuntime' => 'ssr-22', + 'adapter' => 'static', + 'outputDirectory' => './dist', + 'fallbackFile' => 'index.html', + ], ]; function getFramework(string $frameworkEnum, array $overrides) @@ -88,6 +117,25 @@ function getFramework(string $frameworkEnum, array $overrides) } return [ + [ + 'key' => 'template-for-onelink', + 'name' => 'Onelink template', + 'useCases' => ['starter'], + 'demoImage' => $url . '/console/images/sites/templates/template-for-onelink.png', + 'frameworks' => [ + getFramework('NUXT', [ + 'providerRootDirectory' => './onelink', + 'buildCommand' => 'npm run generate', + 'outputDirectory' => './dist', + 'adapter' => 'static', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'templates-for-sites', + 'providerOwner' => 'Meldiron', + 'providerVersion' => '0.1.*', + 'variables' => [] + ], [ 'key' => 'starter-for-svelte', 'name' => 'Svelte starter', @@ -129,6 +177,130 @@ return [ ], ] ], + [ + 'key' => 'starter-for-react', + 'name' => 'React starter', + 'useCases' => ['starter'], + 'demoImage' => $url . '/console/images/sites/templates/starter-for-react.png', + 'frameworks' => [ + getFramework('REACT', [ + 'providerRootDirectory' => './', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'starter-for-react', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.1.*', + 'variables' => [ + [ + 'name' => 'VITE_APPWRITE_ENDPOINT', + 'description' => 'Endpoint of Appwrite server', + 'value' => '{apiEndpoint}', + 'placeholder' => '{apiEndpoint}', + 'required' => true, + 'type' => 'text' + ], + [ + 'name' => 'VITE_APPWRITE_PROJECT_ID', + 'description' => 'Your Appwrite project ID', + 'value' => '{projectId}', + 'placeholder' => '{projectId}', + 'required' => true, + 'type' => 'text' + ], + [ + 'name' => 'VITE_APPWRITE_PROJECT_NAME', + 'description' => 'Your Appwrite project name', + 'value' => '{projectName}', + 'placeholder' => '{projectName}', + 'required' => true, + 'type' => 'text' + ], + ] + ], + [ + 'key' => 'starter-for-vue', + 'name' => 'Vue starter', + 'useCases' => ['starter'], + 'demoImage' => $url . '/console/images/sites/templates/starter-for-vue.png', + 'frameworks' => [ + getFramework('VUE', [ + 'providerRootDirectory' => './', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'starter-for-vue', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.1.*', + 'variables' => [ + [ + 'name' => 'VITE_APPWRITE_ENDPOINT', + 'description' => 'Endpoint of Appwrite server', + 'value' => '{apiEndpoint}', + 'placeholder' => '{apiEndpoint}', + 'required' => true, + 'type' => 'text' + ], + [ + 'name' => 'VITE_APPWRITE_PROJECT_ID', + 'description' => 'Your Appwrite project ID', + 'value' => '{projectId}', + 'placeholder' => '{projectId}', + 'required' => true, + 'type' => 'text' + ], + [ + 'name' => 'VITE_APPWRITE_PROJECT_NAME', + 'description' => 'Your Appwrite project name', + 'value' => '{projectName}', + 'placeholder' => '{projectName}', + 'required' => true, + 'type' => 'text' + ], + ] + ], + [ + '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', @@ -170,6 +342,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', @@ -278,54 +491,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', diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index d51a36910c..95702eb336 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -24095,7 +24095,9 @@ "x-example": "nextjs", "enum": [ "nextjs", + "react", "nuxt", + "vue", "sveltekit", "astro", "remix", @@ -24660,7 +24662,9 @@ "x-example": "nextjs", "enum": [ "nextjs", + "react", "nuxt", + "vue", "sveltekit", "astro", "remix", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 5a3cf63fa1..d26cbf0d6d 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -16416,7 +16416,9 @@ "x-example": "nextjs", "enum": [ "nextjs", + "react", "nuxt", + "vue", "sveltekit", "astro", "remix", @@ -16759,7 +16761,9 @@ "x-example": "nextjs", "enum": [ "nextjs", + "react", "nuxt", + "vue", "sveltekit", "astro", "remix", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index bc5850aa78..4fa0961506 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -24592,7 +24592,9 @@ "x-example": "nextjs", "enum": [ "nextjs", + "react", "nuxt", + "vue", "sveltekit", "astro", "remix", @@ -25169,7 +25171,9 @@ "x-example": "nextjs", "enum": [ "nextjs", + "react", "nuxt", + "vue", "sveltekit", "astro", "remix", diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index c5ea60e44a..baafe5ecdd 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -16892,7 +16892,9 @@ "x-example": "nextjs", "enum": [ "nextjs", + "react", "nuxt", + "vue", "sveltekit", "astro", "remix", @@ -17251,7 +17253,9 @@ "x-example": "nextjs", "enum": [ "nextjs", + "react", "nuxt", + "vue", "sveltekit", "astro", "remix", diff --git a/docker-compose.yml b/docker-compose.yml index f4f93da9f2..64aa187667 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -205,7 +205,7 @@ services: appwrite-console: <<: *x-logging container_name: appwrite-console - image: appwrite/console:5.3.0-sites-rc.10 + image: appwrite/console:5.3.0-sites-rc.11 restart: unless-stopped networks: - appwrite