appwrite-kotlin

Implements Appwrite backend services in Kotlin for Android apps and JVM servers.

4|Updated Feb 5, 2025
One-click install
npx skills add https://github.com/aniruddha81/Gaali-Finder-v2 --skill appwrite-kotlin-aniruddha81
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: appwrite-kotlin
Source: https://github.com/aniruddha81/Gaali-Finder-v2/tree/main/.agents/skills/appwrite-kotlin
Command: npx skills add https://github.com/aniruddha81/Gaali-Finder-v2 --skill appwrite-kotlin-aniruddha81

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires io.appwrite:sdk-for-android, io.appwrite:sdk-for-kotlin.

What problem does it solve? Building authentication, databases, file storage, and real-time features from scratch is slow and error-prone. This Skill provides ready-to-use Appwrite Kotlin SDK patterns so you can wire a complete backend into Android apps or Kotlin/JVM servers without guessing API signatures or permission rules. ## Core Features & Use Cases - Client & Server SDK Setup: Covers Android client-side auth (email, OAuth with Activity integration) and server-side admin operations via API keys for users, databases, storage, and functions. - Database, Storage & Realtime: Includes TablesDB CRUD with the full Query API, file uploads via InputFile, and coroutine-friendly realtime subscriptions over channels. - SSR Authentication: Provides Ktor-style patterns for cookie-based sessions, OAuth2 token exchange, and secure cookie configuration. - Use Case: You are building an Android meme-audio sharing app backed by Appwrite. Use this Skill to implement email login, upload audio files to a storage bucket with correct permissions, and subscribe to new-file events for auto-sync. ## Quick Start Ask the AI to set up an Appwrite client in your Android project and implement email/password login plus a file upload to a storage bucket.

Frequently Asked Questions about appwrite-kotlin

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Appwrite authentication in an Android Kotlin app?

Create a Client with your endpoint and project ID, then use the Account service. Call createEmailPasswordSession for email login or createOAuth2Session with an Activity and OAuthProvider for social login.

How do I query rows in an Appwrite database with Kotlin?

Use the TablesDB service with listRows, passing databaseId, tableId, and a list of Query objects such as Query.equal, Query.limit, or Query.orderDesc. Prefer named arguments and cursor pagination for large datasets.

Should I use TablesDB or Databases in the Appwrite Kotlin SDK?

Use TablesDB for all new code, since the Databases class is deprecated. Only use Databases when maintaining an existing codebase that already depends on it.

Does the Appwrite Kotlin SDK support server-side admin operations?

Yes. On Kotlin/JVM servers, configure the Client with setKey using an API key, then use services like Users, TablesDB, Storage, and Functions for admin tasks such as user management and database administration.

Why do users get 401 or 403 errors on Appwrite resources?

Appwrite grants no access by default, so missing row or file permissions cause 401/403 errors. Set permissions explicitly with Permission and Role helpers, and avoid combining Role.any with write, update, or delete.

How do I handle Appwrite sessions in a Ktor SSR application?

Use an admin client to create the session, then store its secret in an httpOnly, secure cookie named a_session_<PROJECT_ID>. For each request, build a session client with setSession to act on behalf of the user.