{"id":15017884,"url":"https://github.com/appwrite/sdk-for-console","last_synced_at":"2026-05-06T11:02:03.938Z","repository":{"id":57187893,"uuid":"511473352","full_name":"appwrite/sdk-for-console","owner":"appwrite","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-23T05:18:57.000Z","size":27202,"stargazers_count":21,"open_issues_count":0,"forks_count":8,"subscribers_count":10,"default_branch":"main","last_synced_at":"2026-04-30T16:05:16.392Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appwrite.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-07-07T09:57:01.000Z","updated_at":"2026-04-23T05:16:07.000Z","dependencies_parsed_at":"2024-01-09T12:26:52.725Z","dependency_job_id":"331e811d-b9a1-4bfe-804f-96dd76f6e8e4","html_url":"https://github.com/appwrite/sdk-for-console","commit_stats":{"total_commits":62,"total_committers":8,"mean_commits":7.75,"dds":0.5806451612903225,"last_synced_commit":"e90ab72d50a67954b7b32b7fcd06aca496e506fb"},"previous_names":[],"tags_count":89,"template":false,"template_full_name":null,"purl":"pkg:github/appwrite/sdk-for-console","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appwrite%2Fsdk-for-console","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appwrite%2Fsdk-for-console/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appwrite%2Fsdk-for-console/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appwrite%2Fsdk-for-console/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appwrite","download_url":"https://codeload.github.com/appwrite/sdk-for-console/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appwrite%2Fsdk-for-console/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32579090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-09-24T19:51:07.739Z","updated_at":"2026-05-06T11:02:03.926Z","avatar_url":"https://github.com/appwrite.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Appwrite Console SDK\n\n![License](https://img.shields.io/github/license/appwrite/sdk-for-console.svg?style=flat-square)\n![Version](https://img.shields.io/badge/api%20version-1.9.3-blue.svg?style=flat-square)\n[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)\n[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee\u0026label=twitter\u0026style=flat-square)](https://twitter.com/appwrite)\n[![Discord](https://img.shields.io/discord/564160730845151244?label=discord\u0026style=flat-square)](https://appwrite.io/discord)\n\n**This SDK is compatible with Appwrite server version 1.9.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-console/releases).**\n\nAppwrite is an open-source backend as a service server that abstracts and simplifies complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Console SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)\n\n![Appwrite](https://github.com/appwrite/appwrite/raw/main/public/images/github.png)\n\n## Installation\n\n### NPM\n\nTo install via [NPM](https://www.npmjs.com/):\n\n```bash\nnpm install @appwrite.io/console --save\n```\n\nIf you're using a bundler (like [Rollup](https://rollupjs.org/) or [webpack](https://webpack.js.org/)), you can import the Appwrite module when you need it:\n\n```js\nimport { Client, Account } from \"@appwrite.io/console\";\n```\n\n### CDN\n\nTo install with a CDN (content delivery network) add the following scripts to the bottom of your \u003cbody\u003e tag, but before you use any Appwrite services:\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/@appwrite.io/console@12.1.0\"\u003e\u003c/script\u003e\n```\n\n\n## Getting Started\n\n### Add your Web Platform\n\nFor you to init your SDK and interact with Appwrite services you need to add a web platform to your project. To add a new platform, go to your Appwrite console, choose the project you created in the step before and click the 'Add Platform' button.\n\nFrom the options, choose to add a **Web** platform and add your client app hostname. By adding your hostname to your project platform you are allowing cross-domain communication between your project and the Appwrite API.\n\n### Init your SDK\n\nInitialize your SDK with your Appwrite server API endpoint and project ID which can be found in your project settings page.\n\n```js\n// Init your Web SDK\nconst client = new Client();\n\nclient\n    .setEndpoint('http://localhost/v1') // Your Appwrite Endpoint\n    .setProject('455x34dfkj') // Your project ID\n;\n```\n\n### Make Your First Request\n\nOnce your SDK object is set, access any of the Appwrite services and choose any request to send. Full documentation for any service method you would like to use can be found in your SDK documentation or in the [API References](https://appwrite.io/docs) section.\n\n```js\nconst account = new Account(client);\n\n// Register User\naccount.create(ID.unique(), \"email@example.com\", \"password\", \"Walter O'Brien\")\n    .then(function (response) {\n        console.log(response);\n    }, function (error) {\n        console.log(error);\n    });\n\n```\n\n### Full Example\n\n```js\n// Init your Web SDK\nconst client = new Client();\n\nclient\n    .setEndpoint('http://localhost/v1') // Your Appwrite Endpoint\n    .setProject('455x34dfkj')\n;\n\nconst account = new Account(client);\n\n// Register User\naccount.create(ID.unique(), \"email@example.com\", \"password\", \"Walter O'Brien\")\n    .then(function (response) {\n        console.log(response);\n    }, function (error) {\n        console.log(error);\n    });\n```\n\n### Type Safety with Models\n\nThe Appwrite Web SDK provides type safety when working with database documents through generic methods. Methods like `listDocuments`, `getDocument`, and others accept a generic type parameter that allows you to specify your custom model type for full type safety.\n\n**TypeScript:**\n```typescript\ninterface Book {\n    name: string;\n    author: string;\n    releaseYear?: string;\n    category?: string;\n    genre?: string[];\n    isCheckedOut: boolean;\n}\n\nconst databases = new Databases(client);\n\ntry {\n    const documents = await databases.listDocuments\u003cBook\u003e(\n        'your-database-id',\n        'your-collection-id'\n    );\n    \n    documents.documents.forEach(book =\u003e {\n        console.log(`Book: ${book.name} by ${book.author}`); // Now you have full type safety\n    });\n} catch (error) {\n    console.error('Appwrite error:', error);\n}\n```\n\n**JavaScript (with JSDoc for type hints):**\n```javascript\n/**\n * @typedef {Object} Book\n * @property {string} name\n * @property {string} author\n * @property {string} [releaseYear]\n * @property {string} [category]\n * @property {string[]} [genre]\n * @property {boolean} isCheckedOut\n */\n\nconst databases = new Databases(client);\n\ntry {\n    /** @type {Models.DocumentList\u003cBook\u003e} */\n    const documents = await databases.listDocuments(\n        'your-database-id',\n        'your-collection-id'\n    );\n    \n    documents.documents.forEach(book =\u003e {\n        console.log(`Book: ${book.name} by ${book.author}`); // Type hints available in IDE\n    });\n} catch (error) {\n    console.error('Appwrite error:', error);\n}\n```\n\n**Tip**: You can use the `appwrite types` command to automatically generate TypeScript interfaces based on your Appwrite database schema. Learn more about [type generation](https://appwrite.io/docs/products/databases/type-generation).\n\n### Error Handling\n\nThe Appwrite Web SDK raises an `AppwriteException` object with `message`, `code` and `response` properties. You can handle any errors by catching the exception and present the `message` to the user or handle it yourself based on the provided error information. Below is an example.\n\n```javascript\ntry {\n    const user = await account.create(ID.unique(), \"email@example.com\", \"password\", \"Walter O'Brien\");\n    console.log('User created:', user);\n} catch (error) {\n    console.error('Appwrite error:', error.message);\n}\n```\n\n### Learn more\n\nYou can use the following resources to learn more and get help\n- 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-web)\n- 📜 [Appwrite Docs](https://appwrite.io/docs)\n- 💬 [Discord Community](https://appwrite.io/discord)\n- 🚂 [Appwrite Web Playground](https://github.com/appwrite/playground-for-web)\n\n\n## Contribution\n\nThis library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request.\n\n## License\n\nPlease see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappwrite%2Fsdk-for-console","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappwrite%2Fsdk-for-console","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappwrite%2Fsdk-for-console/lists"}