{"id":29619380,"url":"https://github.com/fellmonkey/sdk-appwrite-unity","last_synced_at":"2026-05-10T05:17:46.758Z","repository":{"id":305145905,"uuid":"1022023290","full_name":"Fellmonkey/sdk-appwrite-unity","owner":"Fellmonkey","description":"Unofficial Appwrite sdk for Unity","archived":false,"fork":false,"pushed_at":"2025-07-18T14:39:55.000Z","size":740,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-18T15:51:03.991Z","etag":null,"topics":["appwrite","sdk","unity"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Fellmonkey.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-18T10:22:18.000Z","updated_at":"2025-07-18T14:39:59.000Z","dependencies_parsed_at":"2025-07-18T16:08:26.908Z","dependency_job_id":null,"html_url":"https://github.com/Fellmonkey/sdk-appwrite-unity","commit_stats":null,"previous_names":["fellmonkey/sdk-appwrite-unity"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Fellmonkey/sdk-appwrite-unity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fellmonkey%2Fsdk-appwrite-unity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fellmonkey%2Fsdk-appwrite-unity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fellmonkey%2Fsdk-appwrite-unity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fellmonkey%2Fsdk-appwrite-unity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fellmonkey","download_url":"https://codeload.github.com/Fellmonkey/sdk-appwrite-unity/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fellmonkey%2Fsdk-appwrite-unity/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266231766,"owners_count":23896473,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appwrite","sdk","unity"],"created_at":"2025-07-21T03:01:16.736Z","updated_at":"2026-05-10T05:17:46.734Z","avatar_url":"https://github.com/Fellmonkey.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unofficial [Appwrite](https://github.com/appwrite/appwrite) Unity SDK\n\n![Version](https://img.shields.io/badge/api%20version-1.8.0-blue.svg?style=flat-square)\n![Unity](https://img.shields.io/badge/Unity-2021.3+-blue.svg)\n![License](https://img.shields.io/github/license/fellmonkey/sdk-appwrite-unity.svg?style=flat-square)\n\n**This SDK is compatible with Appwrite server version 1.8.x.**\n\nAppwrite is an open-source backend-as-a-service that abstracts and simplifies complex development tasks behind a simple REST API. The Unity SDK allows you to easily integrate your Unity app with Appwrite, providing access to authentication, databases, storage, real-time features, and more.\n\nUse this SDK to quickly connect your Unity project to Appwrite and interact with all backend APIs and tools. For full API documentation and tutorials, visit: https://appwrite.io/docs\n\n## 🕹️ Playground Demo\n\nExplore the capabilities of this SDK in action with the [Playground Demo](https://fellmonkey.github.io/playground-appwrite-unity/). [GitHub](https://github.com/Fellmonkey/playground-appwrite-unity)\n\n## Installation\n\n### Unity Package Manager (UPM)\n\n1. Open Unity and go to **Window \u003e Package Manager**\n2. Click the **+** button and select **Add package from git URL**\n3. Enter the following URL: \n```\nhttps://github.com/fellmonkey/sdk-appwrite-unity.git?path=Assets\n```\n4. Click **Add**\n5. In Unity, open the **Appwrite → Setup Assistant** menu and install the required dependencies\n![](./.media/setup-assistant.png)\n\nNote: if you want to use the SDK compatible with Appwrite API 1.7.x, add the package using the following URL:\n\n```\nhttps://github.com/fellmonkey/sdk-appwrite-unity.git?path=Assets#last_1.7.x\n```\n### Manual Installation\n\n1. Download the latest release from [GitHub](/releases) or zip\n2. Import the Unity package into your project\n3. In Unity, open the **Appwrite → Setup Assistant** menu and install the required dependencies\n\n## Dependencies\n\n\nThis SDK requires the following Unity packages and libraries:\n\n- [**UniTask**](https://github.com/Cysharp/UniTask): For async/await support in Unity\n- [**NativeWebSocket**](https://github.com/endel/NativeWebSocket): For WebSocket real-time subscriptions\n- **System.Text.Json**: For JSON serialization (provided as a DLL in the project)\n\nYou can also install UniTask and other required dependencies automatically via **Appwrite → Setup Assistant** in Unity.\n\n## Quick Start\n\u003e **Before you begin**  \n\u003e First, create an Appwrite configuration:  \n\u003e — via the **QuickStart** window in the **Appwrite Setup Assistant**  \n\u003e — or through the menu **Appwrite → Create Configuration**\n![](./.media/config.png)\n\n### Example: Unity Integration - Using AppwriteManager\n\n```csharp\n    [SerializeField] private AppwriteConfig config;\n    private AppwriteManager _manager;\n\n    private async UniTask ExampleWithManager()\n    {\n        // Get or create manager\n        _manager = AppwriteManager.Instance ?? new GameObject(\"AppwriteManager\").AddComponent\u003cAppwriteManager\u003e();\n        _manager.SetConfig(config);\n\n        // Initialize\n        var success = await _manager.Initialize();\n        if (!success) { Debug.LogError(\"Failed to initialize AppwriteManager\"); return; }\n\n        // Direct client access\n        var client = _manager.Client;\n        var pingResult = await client.Ping();\n        Debug.Log($\"Ping result: {pingResult}\");\n\n        // Service creation through DI container\n        var account = _manager.GetService\u003cAccount\u003e();\n        var databases = _manager.GetService\u003cDatabases\u003e();\n                \n        // Realtime example\n        var realtime = _manager.Realtime;\n        var subscription = realtime.Subscribe(\n            new[] { \"databases.*.collections.*.documents\" },\n            response =\u003e Debug.Log($\"Realtime event: {response.Events[0]}\")\n        );\n    }\n```\n\n### Example: Unity Integration - Using Client directly\n\n```csharp\n    [SerializeField] private AppwriteConfig config;\n\n    private async UniTask ExampleWithDirectClient()\n    {\n        // Create and configure client\n        var client = new Client()\n            .SetEndpoint(config.Endpoint)\n            .SetProject(config.ProjectId);\n                    \n        if (!string.IsNullOrEmpty(config.ApiKey))\n            client.SetKey(config.ApiKey);\n                    \n        if (!string.IsNullOrEmpty(config.RealtimeEndpoint))\n            client.SetEndPointRealtime(config.RealtimeEndpoint);\n                \n        // Test connection\n        var pingResult = await client.Ping();\n        Debug.Log($\"Direct client ping: {pingResult}\");\n                \n        // Create services manually\n        var account = new Account(client);\n        var databases = new Databases(client);\n                \n        // Realtime example\n        // You need to create a Realtime instance manually or attach dependently\n        realtime.Initialize(client);\n        var subscription = realtime.Subscribe(\n            new[] { \"databases.*.collections.*.documents\" },\n            response =\u003e Debug.Log($\"Realtime event: {response.Events[0]}\")\n        );\n    }\n```\n### Error Handling\n```csharp\ntry\n{\n    var result = await client..Async();\n}\ncatch (AppwriteException ex)\n{\n    Debug.LogError($\"Appwrite Error: {ex.Message}\");\n    Debug.LogError($\"Status Code: {ex.Code}\");\n    Debug.LogError($\"Response: {ex.Response}\");\n}\n```\n## Preparing Models for Databases API\n\nWhen working with the Databases API in Unity, models should be prepared for serialization using the System.Text.Json library. By default, System.Text.Json converts property names from PascalCase to camelCase when serializing to JSON. If your Appwrite collection attributes are not in camelCase, this can cause errors due to mismatches between serialized property names and actual attribute names in your collection.\n\nTo avoid this, add the `JsonPropertyName` attribute to each property in your model class to match the attribute name in Appwrite:\n\n```csharp\npublic class TestModel\n{\n    [JsonPropertyName(\"name\")]\n    public string Name { get; set; }\n\n    [JsonPropertyName(\"release_date\")]\n    public DateTime ReleaseDate { get; set; }\n}\n```\n\nThe `JsonPropertyName` attribute ensures your data object is serialized with the correct attribute names for Appwrite databases. This approach works seamlessly in Unity with the included System.Text.Json DLL.\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information about recent changes.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffellmonkey%2Fsdk-appwrite-unity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffellmonkey%2Fsdk-appwrite-unity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffellmonkey%2Fsdk-appwrite-unity/lists"}