From b34a553c3b005cf512ac7d2f0cfc7043e42dfc8d Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Sat, 13 Dec 2025 19:37:32 +0530 Subject: [PATCH] added new files for cloud compat --- app/config/platform.php | 25 +++ app/config/sdks.php | 479 ++++++++++++++++++++++++++++++++++++++++ app/init/constants.php | 3 + 3 files changed, 507 insertions(+) create mode 100644 app/config/platform.php create mode 100644 app/config/sdks.php diff --git a/app/config/platform.php b/app/config/platform.php new file mode 100644 index 0000000000..bd4f082380 --- /dev/null +++ b/app/config/platform.php @@ -0,0 +1,25 @@ + System::getEnv('_APP_DOMAIN', 'localhost'), + 'consoleHostname' => System::getEnv('_APP_CONSOLE_DOMAIN', System::getEnv('_APP_DOMAIN', 'localhost')), + 'hostnames' => array_filter(array_unique([ + System::getEnv('_APP_DOMAIN', 'localhost'), + System::getEnv('_APP_CONSOLE_DOMAIN', 'localhost'), + ])), + 'platformName' => APP_EMAIL_PLATFORM_NAME, + 'logoUrl' => APP_EMAIL_LOGO_URL, + 'accentColor' => APP_EMAIL_ACCENT_COLOR, + 'footerImageUrl' => APP_EMAIL_FOOTER_IMAGE_URL, + 'twitterUrl' => APP_SOCIAL_TWITTER, + 'discordUrl' => APP_SOCIAL_DISCORD, + 'githubUrl' => APP_SOCIAL_GITHUB, + 'termsUrl' => APP_EMAIL_TERMS_URL, + 'privacyUrl' => APP_EMAIL_PRIVACY_URL, + 'websiteUrl' => 'https://' . APP_DOMAIN, +]; \ No newline at end of file diff --git a/app/config/sdks.php b/app/config/sdks.php new file mode 100644 index 0000000000..6f8dc68f48 --- /dev/null +++ b/app/config/sdks.php @@ -0,0 +1,479 @@ + [ + 'key' => APP_PLATFORM_CLIENT, + 'name' => 'Client', + 'description' => 'Client libraries for integrating with Appwrite to build client-based applications and websites. Read the [getting started for web](https://appwrite.io/docs/getting-started-for-web) or [getting started for Flutter](https://appwrite.io/docs/getting-started-for-flutter) tutorials to start building your first application.', + 'enabled' => true, + 'beta' => false, + 'sdks' => [ + [ + 'key' => 'web', + 'name' => 'Web', + 'version' => '21.5.0', + 'url' => 'https://github.com/appwrite/sdk-for-web', + 'package' => 'https://www.npmjs.com/package/appwrite', + 'enabled' => true, + 'beta' => false, + 'dev' => false, + 'hidden' => false, + 'family' => APP_PLATFORM_CLIENT, + 'prism' => 'javascript', + 'source' => \realpath(__DIR__ . '/../sdks/client-web'), + 'gitUrl' => 'git@github.com:appwrite/sdk-for-web.git', + 'gitRepoName' => 'sdk-for-web', + 'gitUserName' => 'appwrite', + 'gitBranch' => 'dev', + 'changelog' => \realpath(__DIR__ . '/../../docs/sdks/web/CHANGELOG.md'), + 'demos' => [ + [ + 'icon' => 'react.svg', + 'name' => 'Todo App with React JS', + 'description' => 'A simple Todo app that uses both the Appwrite account and database APIs.', + 'source' => 'https://github.com/appwrite/todo-with-react', + 'url' => 'https://appwrite-todo-with-react.vercel.app/', + ], + [ + 'icon' => 'vue.svg', + 'name' => 'Todo App with Vue JS', + 'description' => 'A simple Todo app that uses both the Appwrite account and database APIs.', + 'source' => 'https://github.com/appwrite/todo-with-vue', + 'url' => 'https://appwrite-todo-with-vue.vercel.app/', + ], + [ + 'icon' => 'angular.svg', + 'name' => 'Todo App with Angular', + 'description' => 'A simple Todo app that uses both the Appwrite account and database APIs.', + 'source' => 'https://github.com/appwrite/todo-with-angular', + 'url' => 'https://appwrite-todo-with-angular.vercel.app/', + ], + [ + 'icon' => 'svelte.svg', + 'name' => 'Todo App with Svelte', + 'description' => 'A simple Todo app that uses both the Appwrite account and database APIs.', + 'source' => 'https://github.com/appwrite/todo-with-svelte', + 'url' => 'https://appwrite-todo-with-svelte.vercel.app/', + ], + ] + ], + [ + 'key' => 'flutter', + 'name' => 'Flutter', + 'version' => '20.3.2', + 'url' => 'https://github.com/appwrite/sdk-for-flutter', + 'package' => 'https://pub.dev/packages/appwrite', + 'enabled' => true, + 'beta' => false, + 'dev' => false, + 'hidden' => false, + 'family' => APP_PLATFORM_CLIENT, + 'prism' => 'dart', + 'source' => \realpath(__DIR__ . '/../sdks/client-flutter'), + 'gitUrl' => 'git@github.com:appwrite/sdk-for-flutter.git', + 'gitRepoName' => 'sdk-for-flutter', + 'gitUserName' => 'appwrite', + 'gitBranch' => 'dev', + 'changelog' => \realpath(__DIR__ . '/../../docs/sdks/flutter/CHANGELOG.md'), + ], + [ + 'key' => 'apple', + 'name' => 'Apple', + 'version' => '13.5.0', + 'url' => 'https://github.com/appwrite/sdk-for-apple', + 'package' => 'https://github.com/appwrite/sdk-for-apple', + 'enabled' => true, + 'beta' => false, + 'dev' => false, + 'hidden' => false, + 'family' => APP_PLATFORM_CLIENT, + 'prism' => 'swift', + 'source' => \realpath(__DIR__ . '/../sdks/client-apple'), + 'gitUrl' => 'git@github.com:appwrite/sdk-for-apple.git', + 'gitRepoName' => 'sdk-for-apple', + 'gitUserName' => 'appwrite', + 'gitBranch' => 'dev', + 'changelog' => \realpath(__DIR__ . '/../../docs/sdks/apple/CHANGELOG.md'), + ], + [ + 'key' => 'objective-c', + 'name' => 'Objective C', + 'url' => '', + 'package' => '', + 'enabled' => false, + 'beta' => false, + 'dev' => false, + 'hidden' => false, + 'family' => APP_PLATFORM_CLIENT, + 'prism' => '', + 'source' => false, + 'gitUrl' => 'git@github.com:appwrite/sdk-for-objective-c.git', + 'gitRepoName' => 'sdk-for-objective-c', + 'gitUserName' => 'appwrite', + 'gitBranch' => 'dev', + 'changelog' => \realpath(__DIR__ . '/../../docs/sdks/objective-c/CHANGELOG.md'), + ], + [ + 'key' => 'android', + 'name' => 'Android', + 'version' => '11.4.0', + 'url' => 'https://github.com/appwrite/sdk-for-android', + 'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-android', + 'enabled' => true, + 'beta' => false, + 'dev' => false, + 'hidden' => false, + 'family' => APP_PLATFORM_CLIENT, + 'prism' => 'kotlin', + 'source' => \realpath(__DIR__ . '/../sdks/client-android'), + 'gitUrl' => 'git@github.com:appwrite/sdk-for-android.git', + 'gitRepoName' => 'sdk-for-android', + 'gitUserName' => 'appwrite', + 'gitBranch' => 'dev', + 'docDirectories' => [ + 'Kotlin' => 'kotlin', + 'Java' => 'java', + ], + 'changelog' => \realpath(__DIR__ . '/../../docs/sdks/android/CHANGELOG.md'), + ], + [ + 'key' => 'react-native', + 'name' => 'React Native', + 'version' => '0.19.0', + 'url' => 'https://github.com/appwrite/sdk-for-react-native', + 'package' => 'https://npmjs.com/package/react-native-appwrite', + 'enabled' => true, + 'beta' => true, + 'dev' => false, + 'hidden' => false, + 'family' => APP_PLATFORM_CLIENT, + 'prism' => 'javascript', + 'source' => \realpath(__DIR__ . '/../sdks/client-react-native'), + 'gitUrl' => 'git@github.com:appwrite/sdk-for-react-native.git', + 'gitRepoName' => 'sdk-for-react-native', + 'gitUserName' => 'appwrite', + 'gitBranch' => 'dev', + 'changelog' => \realpath(__DIR__ . '/../../docs/sdks/react-native/CHANGELOG.md'), + ], + [ + 'key' => 'graphql', + 'name' => 'GraphQL', + 'version' => 'October 2021', + 'url' => '', + 'package' => '', + 'enabled' => true, + 'beta' => false, + 'dev' => false, + 'hidden' => true, + 'family' => APP_PLATFORM_CLIENT, + 'prism' => 'graphql', + 'source' => \realpath(__DIR__ . '/../sdks/client-graphql'), + 'gitUrl' => '', + 'gitRepoName' => '', + 'gitUserName' => '', + 'gitBranch' => '', + 'isSDK' => false, + 'changelog' => \realpath(__DIR__ . '/../../docs/sdks/graphql/CHANGELOG.md'), + ], + [ + 'key' => 'rest', + 'name' => 'REST', + 'version' => '', + 'url' => '', + 'package' => '', + 'enabled' => true, + 'beta' => false, + 'dev' => false, + 'hidden' => true, + 'family' => APP_PLATFORM_CLIENT, + 'prism' => 'http', + 'source' => \realpath(__DIR__ . '/../sdks/client-rest'), + 'gitUrl' => '', + 'gitRepoName' => '', + 'gitUserName' => '', + 'gitBranch' => '', + 'isSDK' => false, + 'changelog' => \realpath(__DIR__ . '/../../docs/sdks/rest/CHANGELOG.md'), + ], + ], + ], + + APP_PLATFORM_CONSOLE => [ + 'key' => APP_PLATFORM_CONSOLE, + 'name' => 'Console', + 'enabled' => false, + 'beta' => false, + 'sdks' => [ + [ + 'key' => 'web', + 'name' => 'Console', + 'version' => '0.2.0', + 'url' => '', + 'package' => '', + 'enabled' => true, + 'beta' => false, + 'dev' => false, + 'hidden' => true, + 'family' => APP_PLATFORM_CONSOLE, + 'prism' => 'javascript', + 'source' => \realpath(__DIR__ . '/../sdks/console-web'), + 'gitUrl' => '', + 'gitBranch' => 'dev', + 'gitRepoName' => '', + 'gitUserName' => '', + 'changelog' => \realpath(__DIR__ . '/../../docs/sdks/console/CHANGELOG.md'), + ], + [ + 'key' => 'cli', + 'name' => 'Command Line', + 'version' => '12.0.1', + 'url' => 'https://github.com/appwrite/sdk-for-cli', + 'package' => 'https://www.npmjs.com/package/appwrite-cli', + 'enabled' => true, + 'beta' => true, + 'dev' => false, + 'hidden' => false, + 'family' => APP_PLATFORM_CONSOLE, + 'prism' => 'bash', + 'source' => \realpath(__DIR__ . '/../sdks/console-cli'), + 'gitUrl' => 'git@github.com:appwrite/sdk-for-cli.git', + 'gitRepoName' => 'sdk-for-cli', + 'gitUserName' => 'appwrite', + 'gitBranch' => 'dev', + 'repoBranch' => 'master', + 'changelog' => \realpath(__DIR__ . '/../../docs/sdks/cli/CHANGELOG.md'), + 'exclude' => [ + 'services' => [ + ['name' => 'assistant'], + ['name' => 'avatars'], + ], + ], + ], + ], + ], + + APP_PLATFORM_SERVER => [ + 'key' => APP_PLATFORM_SERVER, + 'name' => 'Server', + 'description' => 'Libraries for integrating with Appwrite to build server side integrations. Read the [getting started for server](https://appwrite.io/docs/getting-started-for-server) tutorial to start building your first server integration.', + 'enabled' => true, + 'beta' => false, + 'sdks' => [ + [ + 'key' => 'nodejs', + 'name' => 'Node.js', + 'version' => '21.0.0', + 'url' => 'https://github.com/appwrite/sdk-for-node', + 'package' => 'https://www.npmjs.com/package/node-appwrite', + 'enabled' => true, + 'beta' => false, + 'dev' => false, + 'hidden' => false, + 'family' => APP_PLATFORM_SERVER, + 'prism' => 'javascript', + 'source' => \realpath(__DIR__ . '/../sdks/server-nodejs'), + 'gitUrl' => 'git@github.com:appwrite/sdk-for-node.git', + 'gitRepoName' => 'sdk-for-node', + 'gitUserName' => 'appwrite', + 'gitBranch' => 'dev', + 'changelog' => \realpath(__DIR__ . '/../../docs/sdks/nodejs/CHANGELOG.md'), + ], + [ + 'key' => 'php', + 'name' => 'PHP', + 'version' => '19.0.0', + 'url' => 'https://github.com/appwrite/sdk-for-php', + 'package' => 'https://packagist.org/packages/appwrite/appwrite', + 'enabled' => true, + 'beta' => false, + 'dev' => false, + 'hidden' => false, + 'family' => APP_PLATFORM_SERVER, + 'prism' => 'php', + 'source' => \realpath(__DIR__ . '/../sdks/server-php'), + 'gitUrl' => 'git@github.com:appwrite/sdk-for-php.git', + 'gitRepoName' => 'sdk-for-php', + 'gitUserName' => 'appwrite', + 'gitBranch' => 'dev', + 'changelog' => \realpath(__DIR__ . '/../../docs/sdks/php/CHANGELOG.md'), + ], + [ + 'key' => 'python', + 'name' => 'Python', + 'version' => '14.0.0', + 'url' => 'https://github.com/appwrite/sdk-for-python', + 'package' => 'https://pypi.org/project/appwrite/', + 'enabled' => true, + 'beta' => false, + 'dev' => false, + 'hidden' => false, + 'family' => APP_PLATFORM_SERVER, + 'prism' => 'python', + 'source' => \realpath(__DIR__ . '/../sdks/server-python'), + 'gitUrl' => 'git@github.com:appwrite/sdk-for-python.git', + 'gitRepoName' => 'sdk-for-python', + 'gitUserName' => 'appwrite', + 'gitBranch' => 'dev', + 'changelog' => \realpath(__DIR__ . '/../../docs/sdks/python/CHANGELOG.md'), + ], + [ + 'key' => 'ruby', + 'name' => 'Ruby', + 'version' => '20.0.0', + 'url' => 'https://github.com/appwrite/sdk-for-ruby', + 'package' => 'https://rubygems.org/gems/appwrite', + 'enabled' => true, + 'beta' => false, + 'dev' => false, + 'hidden' => false, + 'family' => APP_PLATFORM_SERVER, + 'prism' => 'ruby', + 'source' => \realpath(__DIR__ . '/../sdks/server-ruby'), + 'gitUrl' => 'git@github.com:appwrite/sdk-for-ruby.git', + 'gitRepoName' => 'sdk-for-ruby', + 'gitUserName' => 'appwrite', + 'gitBranch' => 'dev', + 'changelog' => \realpath(__DIR__ . '/../../docs/sdks/ruby/CHANGELOG.md'), + ], + [ + 'key' => 'go', + 'name' => 'Go', + 'version' => 'v0.15.0', + 'url' => 'https://github.com/appwrite/sdk-for-go', + 'package' => 'https://github.com/appwrite/sdk-for-go', + 'enabled' => true, + 'beta' => true, + 'dev' => false, + 'hidden' => false, + 'family' => APP_PLATFORM_SERVER, + 'prism' => 'go', + 'source' => \realpath(__DIR__ . '/../sdks/server-go'), + 'gitUrl' => 'git@github.com:appwrite/sdk-for-go.git', + 'gitRepoName' => 'sdk-for-go', + 'gitUserName' => 'appwrite', + 'gitBranch' => 'dev', + 'changelog' => \realpath(__DIR__ . '/../../docs/sdks/go/CHANGELOG.md'), + ], + [ + 'key' => 'dotnet', + 'name' => '.NET', + 'version' => '0.23.0', + 'url' => 'https://github.com/appwrite/sdk-for-dotnet', + 'package' => 'https://www.nuget.org/packages/Appwrite', + 'enabled' => true, + 'beta' => true, + 'dev' => false, + 'hidden' => false, + 'family' => APP_PLATFORM_SERVER, + 'prism' => 'csharp', + 'source' => \realpath(__DIR__ . '/../sdks/server-dotnet'), + 'gitUrl' => 'git@github.com:appwrite/sdk-for-dotnet.git', + 'gitRepoName' => 'sdk-for-dotnet', + 'gitUserName' => 'appwrite', + 'gitBranch' => 'dev', + 'changelog' => \realpath(__DIR__ . '/../../docs/sdks/dotnet/CHANGELOG.md'), + ], + [ + 'key' => 'dart', + 'name' => 'Dart', + 'version' => '20.0.0', + 'url' => 'https://github.com/appwrite/sdk-for-dart', + 'package' => 'https://pub.dev/packages/dart_appwrite', + 'enabled' => true, + 'beta' => false, + 'dev' => false, + 'hidden' => false, + 'family' => APP_PLATFORM_SERVER, + 'prism' => 'dart', + 'source' => \realpath(__DIR__ . '/../sdks/server-dart'), + 'gitUrl' => 'git@github.com:appwrite/sdk-for-dart.git', + 'gitRepoName' => 'sdk-for-dart', + 'gitUserName' => 'appwrite', + 'gitBranch' => 'dev', + 'changelog' => \realpath(__DIR__ . '/../../docs/sdks/dart/CHANGELOG.md'), + ], + [ + 'key' => 'kotlin', + 'name' => 'Kotlin', + 'version' => '13.0.0', + 'url' => 'https://github.com/appwrite/sdk-for-kotlin', + 'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-kotlin', + 'enabled' => true, + 'beta' => false, + 'dev' => false, + 'hidden' => false, + 'family' => APP_PLATFORM_SERVER, + 'prism' => 'kotlin', + 'source' => \realpath(__DIR__ . '/../sdks/server-kotlin'), + 'gitUrl' => 'git@github.com:appwrite/sdk-for-kotlin.git', + 'gitRepoName' => 'sdk-for-kotlin', + 'gitUserName' => 'appwrite', + 'gitBranch' => 'dev', + 'docDirectories' => [ + 'Kotlin' => 'kotlin', + 'Java' => 'java', + ], + 'changelog' => \realpath(__DIR__ . '/../../docs/sdks/kotlin/CHANGELOG.md'), + ], + [ + 'key' => 'swift', + 'name' => 'Swift', + 'version' => '14.0.0', + 'url' => 'https://github.com/appwrite/sdk-for-swift', + 'package' => 'https://github.com/appwrite/sdk-for-swift', + 'enabled' => true, + 'beta' => false, + 'dev' => false, + 'hidden' => false, + 'family' => APP_PLATFORM_SERVER, + 'prism' => 'swift', + 'source' => \realpath(__DIR__ . '/../sdks/server-swift'), + 'gitUrl' => 'git@github.com:appwrite/sdk-for-swift.git', + 'gitRepoName' => 'sdk-for-swift', + 'gitUserName' => 'appwrite', + 'gitBranch' => 'dev', + 'changelog' => \realpath(__DIR__ . '/../../docs/sdks/swift/CHANGELOG.md'), + ], + [ + 'key' => 'graphql', + 'name' => 'GraphQL', + 'version' => 'October 2021', + 'url' => '', + 'package' => '', + 'enabled' => true, + 'beta' => false, + 'dev' => false, + 'hidden' => true, + 'family' => APP_PLATFORM_SERVER, + 'prism' => 'graphql', + 'source' => \realpath(__DIR__ . '/../sdks/server-graphql'), + 'gitUrl' => '', + 'gitRepoName' => '', + 'gitUserName' => '', + 'gitBranch' => '', + 'isSDK' => false, + 'changelog' => \realpath(__DIR__ . '/../../docs/sdks/graphql/CHANGELOG.md'), + ], + [ + 'key' => 'rest', + 'name' => 'REST', + 'version' => '', + 'url' => '', + 'package' => '', + 'enabled' => true, + 'beta' => false, + 'dev' => false, + 'hidden' => true, + 'family' => APP_PLATFORM_SERVER, + 'prism' => 'http', + 'source' => \realpath(__DIR__ . '/../sdks/server-rest'), + 'gitUrl' => '', + 'gitRepoName' => '', + 'gitUserName' => '', + 'gitBranch' => '', + 'isSDK' => false, + 'changelog' => \realpath(__DIR__ . '/../../docs/sdks/rest/CHANGELOG.md'), + ], + ], + ], +]; \ No newline at end of file diff --git a/app/init/constants.php b/app/init/constants.php index 8421c3884e..d1bfa689ed 100644 --- a/app/init/constants.php +++ b/app/init/constants.php @@ -387,3 +387,6 @@ const DATABASE_TYPE_DOCUMENTSDB = 'documentsdb'; // CSV import/export allowed database types const CSV_ALLOWED_DATABASE_TYPES = [DATABASE_TYPE_LEGACY, DATABASE_TYPE_LEGACY]; + +const APP_EMAIL_PLATFORM_NAME = 'Appwrite'; +const APP_EMAIL_FOOTER_IMAGE_URL = 'https://appwrite.io/email/footer.png'; \ No newline at end of file