From 2d8cc2efcd7bad25890f731c9fe3d530b1ea8cdf Mon Sep 17 00:00:00 2001 From: Atharva Deosthale Date: Wed, 15 Oct 2025 16:32:42 +0530 Subject: [PATCH 1/4] copy prompt --- src/lib/components/PromptBanner.svelte | 285 ++++++++++++++++++ src/lib/utils/prompts.ts | 41 +++ src/markdoc/layouts/Article.svelte | 5 + src/prompts/quickstarts/nextjs.md | 72 +++++ .../docs/quick-starts/nextjs/+page.markdoc | 1 + static/images/docs/mcp/logos/dark/openai.svg | 3 + static/images/docs/mcp/logos/openai.svg | 3 + 7 files changed, 410 insertions(+) create mode 100644 src/lib/components/PromptBanner.svelte create mode 100644 src/lib/utils/prompts.ts create mode 100644 src/prompts/quickstarts/nextjs.md create mode 100644 static/images/docs/mcp/logos/dark/openai.svg create mode 100644 static/images/docs/mcp/logos/openai.svg diff --git a/src/lib/components/PromptBanner.svelte b/src/lib/components/PromptBanner.svelte new file mode 100644 index 0000000000..9a94fe8c48 --- /dev/null +++ b/src/lib/components/PromptBanner.svelte @@ -0,0 +1,285 @@ + + +{#if exists} +
+
+
+
+
+
+ + + + + {#if $open} + + {/if} +
+
+
+
+{/if} + + diff --git a/src/lib/utils/prompts.ts b/src/lib/utils/prompts.ts new file mode 100644 index 0000000000..d20f93dbce --- /dev/null +++ b/src/lib/utils/prompts.ts @@ -0,0 +1,41 @@ +// Utility to load prompt text files from `src/prompts`, including nested folders +// Consumers must pass the file path relative to `src/prompts/`, including extension + +const promptsGlob = import.meta.glob('/src/prompts/**/*', { + query: '?raw', + import: 'default', + eager: true +}) as Record; + +function toRelativeKey(fullPath: string): string { + // Convert absolute like "/src/prompts/foo/bar.md" to "foo/bar.md" + return fullPath.replace(/^\/?src\/prompts\//, ''); +} + +function normalizeInputKey(input: string): string { + // Normalize user input like "./foo\\bar.md" → "foo/bar.md" + return input.replace(/^\/*/, '').replace(/\\/g, '/'); +} + +const nameToPrompt: Record = Object.entries(promptsGlob).reduce( + (acc, [path, contents]) => { + const key = toRelativeKey(path); + acc[key] = contents; + return acc; + }, + {} as Record +); + +export function getPrompt(filePathWithExt: string): string | null { + const key = normalizeInputKey(filePathWithExt); + return nameToPrompt[key] ?? null; +} + +export function hasPrompt(filePathWithExt: string): boolean { + const key = normalizeInputKey(filePathWithExt); + return key in nameToPrompt; +} + +export function listPrompts(): string[] { + return Object.keys(nameToPrompt).sort(); +} diff --git a/src/markdoc/layouts/Article.svelte b/src/markdoc/layouts/Article.svelte index ba1e794bfb..d22005ffca 100644 --- a/src/markdoc/layouts/Article.svelte +++ b/src/markdoc/layouts/Article.svelte @@ -18,6 +18,7 @@ import { MainFooter } from '$lib/components'; import SeoOgImage from '$lib/components/SeoOgImage.svelte'; import { DocsArticle } from '$lib/layouts'; + import PromptBanner from '$lib/components/PromptBanner.svelte'; import type { TocItem } from '$lib/layouts/DocsArticle.svelte'; import { DOCS_TITLE_SUFFIX, OVERVIEW_TITLE_SUFFIX } from '$routes/titles'; import { getContext, setContext } from 'svelte'; @@ -29,6 +30,7 @@ export let difficulty: string | undefined = undefined; export let readtime: string | undefined = undefined; export let date: string | undefined = undefined; + export let prompt: string | undefined = undefined; setContext('headings', writable({})); @@ -87,6 +89,9 @@
  • {readtime} min
  • {/if} + {#if prompt} + + {/if} diff --git a/src/prompts/quickstarts/nextjs.md b/src/prompts/quickstarts/nextjs.md new file mode 100644 index 0000000000..127f2afdf9 --- /dev/null +++ b/src/prompts/quickstarts/nextjs.md @@ -0,0 +1,72 @@ +Goal: Add Appwrite auth to a new Next.js app (App Router), with a working login/register/logout page. + +Do exactly these steps in order. Confirm each step succeeds before continuing. If any command fails, show the error and fix it automatically. + +Respect user's package manager at all time. Don't use NPM if the user uses something else. + +1. Create Next.js app + - Run: npx create-next-app@latest my-app --use-npm --no-tailwind --eslint + - Change dir: cd my-app + - When prompted: TypeScript = No, ESLint = Yes, Tailwind = No, src dir = your choice, App Router = Yes, Import alias = No. + +2. Install Appwrite SDK + - Run: npm install appwrite + +3. Create Appwrite client module (ask user for details; never assume) + - Ask the user for: + - Appwrite Cloud Region (e.g. fra, nyc) + - Project ID (from Console → Settings) + If the user doesn’t know, guide them to Appwrite Console to copy these. Do not attempt to infer or access their project. + - Create `.env.local` in the project root with: + NEXT_PUBLIC_APPWRITE_ENDPOINT=https://.cloud.appwrite.io/v1 + NEXT_PUBLIC_APPWRITE_PROJECT_ID= + Note: Do not commit `.env.local`. Next.js ignores it by default. + - Create file: app/appwrite.js (or app/appwrite.ts if TS) with: + import { Client, Account } from 'appwrite'; + + const endpoint = process.env.NEXT_PUBLIC_APPWRITE_ENDPOINT; + const projectId = process.env.NEXT_PUBLIC_APPWRITE_PROJECT_ID; + + if (!endpoint || !projectId) { + throw new Error('Missing NEXT_PUBLIC_APPWRITE_ENDPOINT or NEXT_PUBLIC_APPWRITE_PROJECT_ID. Please add them to .env.local'); + } + + export const client = new Client() + .setEndpoint(endpoint) + .setProject(projectId); + + export const account = new Account(client); + export { ID } from 'appwrite'; + +4. Build the login page (client component) + - Create/replace app/page.js with this component using "use client". + - It must render: + - Email/password inputs + - Name input for registration + - Buttons: Login, Register, Logout + - Shows "Logged in as " when a session exists + - Implement functions: + - login(email, password): account.createEmailPasswordSession({ email, password }) then set user via account.get() + - register(): account.create({ userId: ID.unique(), email, password, name }) then call login + - logout(): account.deleteSession({ sessionId: 'current' }) then clear user state + +5. Verify environment (ask user to confirm) + - Confirm with the user that `.env.local` contains the correct endpoint and project ID. + - Ensure the Web app platform exists in Appwrite Console with Hostname = `localhost`. If missing, guide the user to add it. + +6. Run and test + - Run: npm run dev + - Open: http://localhost:3000 + - Test flows: + - Register a new user and auto login works + - Logout then login again + - Surface any Appwrite errors (invalid project, endpoint, CORS/hostname) and fix by guiding updates to appwrite.js and Console settings. + +7. Optional hardening + - If the user wants TypeScript, create app/appwrite.ts and app/page.tsx with proper types. + - Add minimal styling if requested; functionality first. + +Deliverables + +- A running Next.js app with working Appwrite auth (register/login/logout) +- Files created/updated: package.json (deps), app/appwrite.js, app/page.js diff --git a/src/routes/docs/quick-starts/nextjs/+page.markdoc b/src/routes/docs/quick-starts/nextjs/+page.markdoc index 057e411989..3e746221eb 100644 --- a/src/routes/docs/quick-starts/nextjs/+page.markdoc +++ b/src/routes/docs/quick-starts/nextjs/+page.markdoc @@ -5,6 +5,7 @@ description: Learn how to use Appwrite to add authentication, user management, f difficulty: beginner readtime: 3 back: /docs/quick-starts +prompt: quickstarts/nextjs.md --- Learn how to setup your first Next.js project powered by Appwrite. {% section #step-1 step=1 title="Create project" %} diff --git a/static/images/docs/mcp/logos/dark/openai.svg b/static/images/docs/mcp/logos/dark/openai.svg new file mode 100644 index 0000000000..87661dc136 --- /dev/null +++ b/static/images/docs/mcp/logos/dark/openai.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/static/images/docs/mcp/logos/openai.svg b/static/images/docs/mcp/logos/openai.svg new file mode 100644 index 0000000000..2e73c79958 --- /dev/null +++ b/static/images/docs/mcp/logos/openai.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file From 24e3ca6a8bd90210645cadc4cb25827a59f8fa08 Mon Sep 17 00:00:00 2001 From: Atharva Deosthale Date: Wed, 15 Oct 2025 17:32:09 +0530 Subject: [PATCH 2/4] more prompts + changes --- src/lib/components/PromptBanner.svelte | 10 +- src/prompts/quickstarts/android-java.md | 88 ++++++++++++++++++ src/prompts/quickstarts/android.md | 54 +++++++++++ src/prompts/quickstarts/angular.md | 62 +++++++++++++ src/prompts/quickstarts/apple.md | 53 +++++++++++ src/prompts/quickstarts/dart.md | 47 ++++++++++ src/prompts/quickstarts/deno.md | 47 ++++++++++ src/prompts/quickstarts/dotnet.md | 43 +++++++++ src/prompts/quickstarts/flutter.md | 62 +++++++++++++ src/prompts/quickstarts/kotlin.md | 50 ++++++++++ src/prompts/quickstarts/nextjs.md | 19 ++-- src/prompts/quickstarts/node.md | 51 +++++++++++ src/prompts/quickstarts/nuxt.md | 74 +++++++++++++++ src/prompts/quickstarts/php.md | 45 +++++++++ src/prompts/quickstarts/python.md | 50 ++++++++++ src/prompts/quickstarts/react-native.md | 73 +++++++++++++++ src/prompts/quickstarts/react.md | 71 +++++++++++++++ src/prompts/quickstarts/refine.md | 68 ++++++++++++++ src/prompts/quickstarts/ruby.md | 44 +++++++++ src/prompts/quickstarts/solid.md | 68 ++++++++++++++ src/prompts/quickstarts/sveltekit.md | 91 +++++++++++++++++++ src/prompts/quickstarts/swift.md | 48 ++++++++++ src/prompts/quickstarts/vue.md | 75 +++++++++++++++ src/prompts/quickstarts/web.md | 62 +++++++++++++ .../quick-starts/android-java/+page.markdoc | 1 + .../docs/quick-starts/android/+page.markdoc | 1 + .../docs/quick-starts/angular/+page.markdoc | 1 + .../docs/quick-starts/apple/+page.markdoc | 1 + .../docs/quick-starts/dart/+page.markdoc | 1 + .../docs/quick-starts/deno/+page.markdoc | 1 + .../docs/quick-starts/dotnet/+page.markdoc | 1 + .../docs/quick-starts/flutter/+page.markdoc | 1 + src/routes/docs/quick-starts/go/+page.markdoc | 1 + .../docs/quick-starts/kotlin/+page.markdoc | 1 + .../docs/quick-starts/node/+page.markdoc | 1 + .../docs/quick-starts/nuxt/+page.markdoc | 1 + .../docs/quick-starts/php/+page.markdoc | 1 + .../docs/quick-starts/python/+page.markdoc | 1 + .../quick-starts/react-native/+page.markdoc | 1 + .../docs/quick-starts/react/+page.markdoc | 1 + .../docs/quick-starts/refine/+page.markdoc | 1 + .../docs/quick-starts/ruby/+page.markdoc | 1 + .../docs/quick-starts/solid/+page.markdoc | 1 + .../docs/quick-starts/sveltekit/+page.markdoc | 1 + .../docs/quick-starts/swift/+page.markdoc | 1 + .../docs/quick-starts/vue/+page.markdoc | 1 + .../docs/quick-starts/web/+page.markdoc | 1 + 47 files changed, 1358 insertions(+), 20 deletions(-) create mode 100644 src/prompts/quickstarts/android-java.md create mode 100644 src/prompts/quickstarts/android.md create mode 100644 src/prompts/quickstarts/angular.md create mode 100644 src/prompts/quickstarts/apple.md create mode 100644 src/prompts/quickstarts/dart.md create mode 100644 src/prompts/quickstarts/deno.md create mode 100644 src/prompts/quickstarts/dotnet.md create mode 100644 src/prompts/quickstarts/flutter.md create mode 100644 src/prompts/quickstarts/kotlin.md create mode 100644 src/prompts/quickstarts/node.md create mode 100644 src/prompts/quickstarts/nuxt.md create mode 100644 src/prompts/quickstarts/php.md create mode 100644 src/prompts/quickstarts/python.md create mode 100644 src/prompts/quickstarts/react-native.md create mode 100644 src/prompts/quickstarts/react.md create mode 100644 src/prompts/quickstarts/refine.md create mode 100644 src/prompts/quickstarts/ruby.md create mode 100644 src/prompts/quickstarts/solid.md create mode 100644 src/prompts/quickstarts/sveltekit.md create mode 100644 src/prompts/quickstarts/swift.md create mode 100644 src/prompts/quickstarts/vue.md create mode 100644 src/prompts/quickstarts/web.md diff --git a/src/lib/components/PromptBanner.svelte b/src/lib/components/PromptBanner.svelte index 9a94fe8c48..5037da5cf6 100644 --- a/src/lib/components/PromptBanner.svelte +++ b/src/lib/components/PromptBanner.svelte @@ -19,8 +19,6 @@ // options rendered directly in dropdown - let selected: Ide = 'copy'; - // Local dropdown configured to open to the left (bottom-end) const { elements: { trigger, menu }, @@ -43,7 +41,6 @@ // NOTE: Deep links are best-effort; fall back to copy if blocked if (value === 'cursor') { const url = `cursor://anysphere.cursor-deeplink/prompt?text=${text}`; - console.log(text); try { window.location.href = url; } catch { @@ -54,13 +51,13 @@ if (value === 'chatgpt') { const url = `https://chatgpt.com/?prompt=${text}`; - window.open(url, '_blank'); + window.open(url, '_blank', 'noopener,noreferrer'); return; } if (value === 'claude') { const url = `https://claude.ai/new?q=${text}`; - window.open(url, '_blank'); + window.open(url, '_blank', 'noopener,noreferrer'); return; } } @@ -108,7 +105,6 @@ type="button" class="menu-btn" onclick={() => { - selected = 'cursor'; openIde('cursor'); }} > @@ -134,7 +130,6 @@ type="button" class="menu-btn" onclick={() => { - selected = 'chatgpt'; openIde('chatgpt'); }} > @@ -160,7 +155,6 @@ type="button" class="menu-btn" onclick={() => { - selected = 'claude'; openIde('claude'); }} > diff --git a/src/prompts/quickstarts/android-java.md b/src/prompts/quickstarts/android-java.md new file mode 100644 index 0000000000..1cf2d398dd --- /dev/null +++ b/src/prompts/quickstarts/android-java.md @@ -0,0 +1,88 @@ +Goal: Use Appwrite from an Android app written in Java to sign up/login/logout (no full UI replacements). + +Rules + +- Ask the user for Cloud Region and Project ID; do not hardcode silently. +- Configure endpoint/project via safe config (BuildConfig fields or strings.xml). No secrets in client. +- Add OAuth callback for future social auth. + +1. Install SDK + - In app-level `build.gradle` inside `dependencies` add: + ```groovy + implementation "io.appwrite:sdk-for-android:8.1.0" + ``` + +2. Configure endpoint + project (ask user first) + - Use BuildConfig fields (recommended): + ```groovy + android { + defaultConfig { + // Replace with user-provided values + buildConfigField "String", "APPWRITE_ENDPOINT", '"https://.cloud.appwrite.io/v1"' + buildConfigField "String", "APPWRITE_PROJECT_ID", '""' + } + } + ``` + - Alternative: `res/values/strings.xml` with `appwrite_endpoint` and `appwrite_project_id`. + +3. Add OAuth callback (manifest snippet) + - Inside ``: + ```xml + + + + + + + + + ``` + +4. Appwrite helper (key snippet) + - Create `AppwriteHelper.java` singleton and initialize from config: + + ```java + import io.appwrite.Client; + import io.appwrite.services.Account; + + public class AppwriteHelper { + private static AppwriteHelper instance; + private final Account account; + + private AppwriteHelper(Context context) { + Client client = new Client(context) + .setEndpoint(BuildConfig.APPWRITE_ENDPOINT) + .setProject(BuildConfig.APPWRITE_PROJECT_ID); + this.account = new Account(client); + } + + public static synchronized AppwriteHelper get(Context ctx){ + if(instance==null) instance = new AppwriteHelper(ctx.getApplicationContext()); + return instance; + } + + // key ops (examples) + public void register(String email, String password, CoroutineCallback cb){ + account.create(io.appwrite.ID.unique(), email, password, cb); + } + public void login(String email, String password, CoroutineCallback cb){ + account.createEmailPasswordSession(email, password, cb); + } + public void logout(CoroutineCallback cb){ + account.deleteSession("current", cb); + } + } + ``` + +5. Wire minimal UI (idea + key snippets) + - Keep your existing layout. Hook buttons to helper methods: + ```java + AppwriteHelper appwrite = AppwriteHelper.get(getApplicationContext()); + buttonLogin.setOnClickListener(v -> appwrite.login(email.getText().toString(), password.getText().toString(), cb)); + buttonRegister.setOnClickListener(v -> appwrite.register(email.getText().toString(), password.getText().toString(), cb)); + buttonLogout.setOnClickListener(v -> appwrite.logout(cb)); + ``` + +Deliverables + +- Dependency added, manifest callback activity, BuildConfig (or strings) with user-provided endpoint/project, `AppwriteHelper.java` with client + key ops diff --git a/src/prompts/quickstarts/android.md b/src/prompts/quickstarts/android.md new file mode 100644 index 0000000000..5805a3cede --- /dev/null +++ b/src/prompts/quickstarts/android.md @@ -0,0 +1,54 @@ +Goal: Add Appwrite auth to a new Android (Kotlin) app with a minimal login/register/logout UI. + +Rules + +- Ask user for Cloud Region and Project ID; do not hardcode. +- Ensure AndroidManifest has the Appwrite callback activity with the correct scheme. + +1. Create project + - Create an Android Studio project (Empty Activity). Note the package name. + +2. Add SDK + - In app-level build.gradle.kts dependencies: `implementation("io.appwrite:sdk-for-android:8.1.0")` + +3. Configure OAuth callback (ask user) + - Ask for Project ID (Console → Settings) and add to AndroidManifest inside ``: + ```xml + + + + + + + + + ``` + +4. Appwrite singleton (key snippet) + - File: `Appwrite.kt` in your root package: + ```kotlin + object Appwrite { + lateinit var client: Client; lateinit var account: Account + fun init(ctx: Context, region: String, projectId: String){ + client = Client(ctx).setEndpoint("https://$region.cloud.appwrite.io/v1").setProject(projectId) + account = Account(client) + } + suspend fun login(email: String, password: String) = account.createEmailPasswordSession(email, password) + suspend fun register(email: String, password: String) = account.create(userId = ID.unique(), email = email, password = password) + suspend fun logout() = account.deleteSession("current") + } + ``` + - On startup (e.g., in `MainActivity.onCreate`), call `Appwrite.init(applicationContext, , )` (ask user for values). + +5. UI wiring (idea + key snippets) + - In `MainActivity`, use Compose or Views: + - Two `TextField`s (email, password) + - Buttons: Login, Register, Logout + - When logged in, display current email/name from `account.get()` + +6. Run & test + - Build/run on emulator or device. Test register → auto login → logout → login. + +Deliverables + +- AndroidManifest callback, `Appwrite.kt`, updated `MainActivity` with minimal form/actions diff --git a/src/prompts/quickstarts/angular.md b/src/prompts/quickstarts/angular.md new file mode 100644 index 0000000000..5eaf2cc788 --- /dev/null +++ b/src/prompts/quickstarts/angular.md @@ -0,0 +1,62 @@ +Goal: Add Appwrite auth to a new Angular app with a minimal login/register/logout UI. + +Rules + +- Ask user for Cloud Region and Project ID; do not hardcode. +- Use Angular environment config to store these values. + +1. Scaffold Angular + - Run: ng new my-app --routing=false --style=css && cd my-app + +2. Install SDK + - npm install appwrite + +3. Environment (ask user first) + - Ask for Region (e.g. fra/nyc) and Project ID (Console → Settings). + - Update `src/environments/environment.ts`: + ```ts + export const environment = { + production: false, + appwrite: { + endpoint: 'https://.cloud.appwrite.io/v1', + projectId: '' + } + }; + ``` + +4. Client service (key snippet) + - Create `src/app/appwrite.service.ts`: + + ```ts + import { Injectable } from '@angular/core'; + import { Client, Account, ID } from 'appwrite'; + import { environment } from '../environments/environment'; + + @Injectable({ providedIn: 'root' }) + export class AppwriteService { + client = new Client() + .setEndpoint(environment.appwrite.endpoint) + .setProject(environment.appwrite.projectId); + account = new Account(this.client); + ID = ID; + } + ``` + +5. UI wiring (idea + snippets) + - In a component, inject `AppwriteService` and bind a simple form (email, password, name) with buttons for Login, Register, Logout. + - Actions: + ```ts + async login(email: string, password: string){ await svc.account.createEmailPasswordSession({ email, password }); this.user = await svc.account.get(); } + async register(email: string, password: string, name: string){ await svc.account.create({ userId: svc.ID.unique(), email, password, name }); await this.login(email, password); } + async logout(){ await svc.account.deleteSession({ sessionId: 'current' }); this.user = null; } + ``` + +6. Verify platform + - Confirm Web platform with Hostname = localhost in Console. + +7. Run & test + - ng serve --open + +Deliverables + +- environment config, `AppwriteService`, component with minimal form/actions diff --git a/src/prompts/quickstarts/apple.md b/src/prompts/quickstarts/apple.md new file mode 100644 index 0000000000..c138977c95 --- /dev/null +++ b/src/prompts/quickstarts/apple.md @@ -0,0 +1,53 @@ +Goal: Add Appwrite auth to a new Apple (iOS/Swift) app with a minimal login/register/logout UI. + +Rules + +- Ask user for Cloud Region and Project ID; do not hardcode. +- Ensure URL scheme `appwrite-callback-` is configured in Info.plist; add SceneDelegate hook for UIKit. + +1. Create Xcode project + - New iOS App; note Product Name and Bundle Identifier. + +2. Add SDK (SPM) + - Add package: https://github.com/appwrite/sdk-for-apple, version `10.1.0` (Up to Next Major). + +3. URL scheme (ask user) + - In Info.plist, add: + ```xml + CFBundleURLTypes + + + CFBundleTypeRoleEditor + CFBundleURLNameio.appwrite + CFBundleURLSchemesappwrite-callback- + + + ``` + - UIKit apps: in SceneDelegate, forward callback to WebAuthComponent. + +4. Appwrite singleton (key snippet) + - File: `Appwrite.swift` + ```swift + import Appwrite + class Appwrite { + let client = Client(); let account: Account + init(region: String, projectId: String){ + client.setEndpoint("https://\(region).cloud.appwrite.io/v1").setProject(projectId) + account = Account(client) + } + func login(_ email:String,_ password:String) async throws -> Session { try await account.createEmailPasswordSession(email: email, password: password) } + func register(_ email:String,_ password:String) async throws -> User<[String: AnyCodable]> { try await account.create(userId: ID.unique(), email: email, password: password) } + func logout() async throws { _ = try await account.deleteSession(sessionId: "current") } + } + ``` + +5. UI wiring (idea + key snippets) + - SwiftUI view with `TextField`(email), `SecureField`(password), and buttons for Register/Login/Logout. + - Call the singleton’s methods in Task { } blocks and show current user email/name on success. + +6. Run & test + - Build/run on simulator or device; test register/login/logout. + +Deliverables + +- Info.plist URL scheme, `Appwrite.swift`, SwiftUI (or UIKit) view with minimal form/actions diff --git a/src/prompts/quickstarts/dart.md b/src/prompts/quickstarts/dart.md new file mode 100644 index 0000000000..692b9f2ca3 --- /dev/null +++ b/src/prompts/quickstarts/dart.md @@ -0,0 +1,47 @@ +Goal: Use Appwrite from a new Dart CLI app to create/read data (no UI). + +Rules + +- Ask user for Cloud Region, Project ID, and an API Key with required scopes. +- Read credentials from env; do not hardcode. + +1. Scaffold + - dart create -t console my_app && cd my_app + - Remove `lib/` and `test/` directories as per docs. + +2. Install SDK + - dart pub add dart_appwrite:16.0.0 + +3. Configure env (ask user first) + - Create `.env` with: + APPWRITE_ENDPOINT=https://.cloud.appwrite.io/v1 + APPWRITE_PROJECT_ID= + APPWRITE_API_KEY= + +4. Client setup (key snippet) + - File: `bin/my_app.dart` + ```dart + import 'package:dart_appwrite/dart_appwrite.dart'; + import 'dart:io'; + final client = Client() + ..setEndpoint(Platform.environment['APPWRITE_ENDPOINT']!) + ..setProject(Platform.environment['APPWRITE_PROJECT_ID']!) + ..setKey(Platform.environment['APPWRITE_API_KEY']!); + final tablesDB = TablesDB(client); + ``` + +5. Example ops (idea + key snippets) + - Create database/table/columns; seed rows; list rows. + ```dart + Future listRows(String dbId, String tableId) async { + final res = await tablesDB.listRows(databaseId: dbId, tableId: tableId); + for (final row in res.rows) { print(row.data['title']); } + } + ``` + +6. Run & test + - dart run bin/my_app.dart + +Deliverables + +- `.env`, `bin/my_app.dart` with client and example ops diff --git a/src/prompts/quickstarts/deno.md b/src/prompts/quickstarts/deno.md new file mode 100644 index 0000000000..819b062232 --- /dev/null +++ b/src/prompts/quickstarts/deno.md @@ -0,0 +1,47 @@ +Goal: Use Appwrite from a new Deno CLI app (via node-appwrite npm specifiers) to create/read data (no UI). + +Rules + +- Ask user for Cloud Region, Project ID, and an API Key with required scopes. +- Read credentials from env; do not hardcode. + +1. Scaffold + - mkdir my-app && cd my-app && echo "console.log('Hello, Deno!');" > mod.ts + +2. Import SDK (npm specifiers) + - At the top of `mod.ts`: + ```ts + import { Client, ID, TablesDB } from 'npm:node-appwrite'; + ``` + +3. Configure env (ask user first) + - Provide env (Deno.env or launch args): + APPWRITE_ENDPOINT=https://.cloud.appwrite.io/v1 + APPWRITE_PROJECT_ID= + APPWRITE_API_KEY= + +4. Client setup (key snippet) + - `mod.ts` essentials: + ```ts + const client = new Client() + .setEndpoint(Deno.env.get('APPWRITE_ENDPOINT')!) + .setProject(Deno.env.get('APPWRITE_PROJECT_ID')!) + .setKey(Deno.env.get('APPWRITE_API_KEY')!); + const tablesDB = new TablesDB(client); + ``` + +5. Example ops (idea + key snippets) + - Create database/table/columns; seed rows; list rows. + ```ts + async function listRows(dbId: string, tableId: string) { + const res = await tablesDB.listRows({ databaseId: dbId, tableId }); + res.rows.forEach((t: any) => console.log(t.title)); + } + ``` + +6. Run & test + - deno run --allow-env mod.ts + +Deliverables + +- `mod.ts` with client and example ops, env injection for credentials diff --git a/src/prompts/quickstarts/dotnet.md b/src/prompts/quickstarts/dotnet.md new file mode 100644 index 0000000000..3d52f32674 --- /dev/null +++ b/src/prompts/quickstarts/dotnet.md @@ -0,0 +1,43 @@ +Goal: Use Appwrite from a new .NET console app to create/read data (no client UI). + +Rules + +- Ask user for Cloud Region, Project ID, and an API Key with required scopes. +- Read credentials from env/config; do not hardcode. + +1. Scaffold + - dotnet new console -o MyApp && cd MyApp + +2. Install SDK + - dotnet add package Appwrite --version 0.13.0 + +3. Configure env (ask user first) + - Create `appsettings.Development.json` or use environment variables: + APPWRITE_ENDPOINT=https://.cloud.appwrite.io/v1 + APPWRITE_PROJECT_ID= + APPWRITE_API_KEY= + +4. Client setup (key snippet) + - File: `Program.cs` + ```csharp + using Appwrite; using Appwrite.Services; using Appwrite.Models; + var client = new Client() + .SetEndpoint(Environment.GetEnvironmentVariable("APPWRITE_ENDPOINT")) + .SetProject(Environment.GetEnvironmentVariable("APPWRITE_PROJECT_ID")) + .SetKey(Environment.GetEnvironmentVariable("APPWRITE_API_KEY")); + var tablesDB = new TablesDB(client); + ``` + +5. Example ops (idea + key snippets) + - Create database/table/columns; seed rows; list rows. + ```csharp + var todos = await tablesDB.listRows(databaseId: dbId, tableId: tableId); + foreach (var todo in todos.Documents) Console.WriteLine(todo.Data["title"]); + ``` + +6. Run & test + - dotnet run + +Deliverables + +- `Program.cs` with client and example ops, env/config entries diff --git a/src/prompts/quickstarts/flutter.md b/src/prompts/quickstarts/flutter.md new file mode 100644 index 0000000000..a6373cf569 --- /dev/null +++ b/src/prompts/quickstarts/flutter.md @@ -0,0 +1,62 @@ +Goal: Add Appwrite auth to a new Flutter app (multi‑platform) with a minimal login/register/logout UI. + +Rules + +- Ask user for Cloud Region and Project ID; do not hardcode silently. +- For mobile/web, ensure platform configuration (callback handling) per docs. + +1. Scaffold Flutter + - flutter create my_app && cd my_app + +2. Install SDK + - flutter pub add appwrite:17.0.0 + +3. Configure platforms (ask user) + - Ask which platforms they target (Web, iOS, Android, Desktop) and guide: + - Web: create `web/auth.html` to relay OAuth callback via postMessage (per docs). + - iOS/macOS: ensure minimum deployment targets and URL scheme `appwrite-callback-` in Info.plist (per docs). + - Android: add CallbackActivity with `data android:scheme="appwrite-callback-"` in AndroidManifest. + +4. Client setup (key snippet) + - File: `lib/main.dart` (essentials) + + ```dart + import 'package:flutter/material.dart'; + import 'package:appwrite/appwrite.dart'; + import 'package:appwrite/models.dart' as models; + + void main() { + WidgetsFlutterBinding.ensureInitialized(); + final client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // ask user + .setProject(''); // ask user + final account = Account(client); + runApp(MaterialApp(home: MyApp(account: account))); + } + ``` + +5. UI wiring (idea + key snippets) + - In a stateful widget, keep: `models.User? user;` and controllers for email/password/name. + - Actions: + ```dart + Future login(String email, String password) async { + await widget.account.createEmailPasswordSession(email: email, password: password); + setState(() => user = await widget.account.get()); + } + Future register(String email, String password, String name) async { + await widget.account.create(userId: ID.unique(), email: email, password: password, name: name); + await login(email, password); + } + Future logout() async { + await widget.account.deleteSession(sessionId: 'current'); + setState(() => user = null); + } + ``` + - Minimal UI: show user name when logged in; text fields for email/password/name; buttons for Login/Register/Logout. + +6. Run & test + - flutter run (pick target) and validate register/login/logout flow. + +Deliverables + +- `lib/main.dart` essentials + platform-specific config (web auth.html, Info.plist/AndroidManifest entries) diff --git a/src/prompts/quickstarts/kotlin.md b/src/prompts/quickstarts/kotlin.md new file mode 100644 index 0000000000..e267456f8a --- /dev/null +++ b/src/prompts/quickstarts/kotlin.md @@ -0,0 +1,50 @@ +Goal: Use Appwrite from a new Kotlin server (CLI) app to create/read data (no client UI). + +Rules + +- This is the Kotlin Server SDK. For Android client apps, use the Android quickstart. +- Ask user for Cloud Region, Project ID, and an API Key with required scopes. +- Read credentials from env/config. + +1. Scaffold + - IntelliJ IDEA → New Project → Kotlin (Gradle, Kotlin DSL) → open project. + +2. Install SDK + - In `build.gradle.kts` add: `implementation("io.appwrite:sdk-for-kotlin:9.0.0")` + +3. Configure env (ask user first) + - Provide env vars: + APPWRITE_ENDPOINT=https://.cloud.appwrite.io/v1 + APPWRITE_PROJECT_ID= + APPWRITE_API_KEY= + +4. Client setup (key snippet) + - File: `Main.kt` essentials: + + ```kotlin + import io.appwrite.Client + import io.appwrite.services.TablesDB + import io.appwrite.ID + + val client = Client() + .setEndpoint(System.getenv("APPWRITE_ENDPOINT")) + .setProject(System.getenv("APPWRITE_PROJECT_ID")) + .setKey(System.getenv("APPWRITE_API_KEY")) + val tablesDB = TablesDB(client) + ``` + +5. Example ops (idea + key snippets) + - Create database/table/columns; seed rows; list rows. + ```kotlin + suspend fun listRows(dbId: String, tableId: String){ + val res = tablesDB.listRows(dbId, tableId) + for (row in res.rows){ println(row.data["title"]) } + } + ``` + +6. Run & test + - Run from IntelliJ or `gradle run`, ensuring env vars are set. + +Deliverables + +- `Main.kt` with client and example ops, env variables for credentials diff --git a/src/prompts/quickstarts/nextjs.md b/src/prompts/quickstarts/nextjs.md index 127f2afdf9..df0003a20c 100644 --- a/src/prompts/quickstarts/nextjs.md +++ b/src/prompts/quickstarts/nextjs.md @@ -21,22 +21,17 @@ Respect user's package manager at all time. Don't use NPM if the user uses somet NEXT_PUBLIC_APPWRITE_ENDPOINT=https://.cloud.appwrite.io/v1 NEXT_PUBLIC_APPWRITE_PROJECT_ID= Note: Do not commit `.env.local`. Next.js ignores it by default. - - Create file: app/appwrite.js (or app/appwrite.ts if TS) with: - import { Client, Account } from 'appwrite'; - + - Create file: app/appwrite.js (or app/appwrite.ts if TS) with key snippet: + ```js + import { Client, Account } from 'appwrite'; const endpoint = process.env.NEXT_PUBLIC_APPWRITE_ENDPOINT; const projectId = process.env.NEXT_PUBLIC_APPWRITE_PROJECT_ID; - - if (!endpoint || !projectId) { - throw new Error('Missing NEXT_PUBLIC_APPWRITE_ENDPOINT or NEXT_PUBLIC_APPWRITE_PROJECT_ID. Please add them to .env.local'); - } - - export const client = new Client() - .setEndpoint(endpoint) - .setProject(projectId); - + if (!endpoint || !projectId) + throw new Error('Missing NEXT_PUBLIC_APPWRITE_* in .env.local'); + export const client = new Client().setEndpoint(endpoint).setProject(projectId); export const account = new Account(client); export { ID } from 'appwrite'; + ``` 4. Build the login page (client component) - Create/replace app/page.js with this component using "use client". diff --git a/src/prompts/quickstarts/node.md b/src/prompts/quickstarts/node.md new file mode 100644 index 0000000000..d335719dad --- /dev/null +++ b/src/prompts/quickstarts/node.md @@ -0,0 +1,51 @@ +Goal: Use Appwrite from a new Node.js server app to create/read data (no client UI). + +Rules + +- Never assume project details. Ask for Cloud Region, Project ID, and an API Key with required scopes. +- Read credentials from environment variables; do not hardcode. + +1. Scaffold Node app + - mkdir my-app && cd my-app && npm init -y + +2. Install SDK + - npm install node-appwrite + +3. Configure env (ask user first) + - Ask for: REGION, PROJECT_ID, API_KEY (with needed scopes). + - Create `.env` with: + APPWRITE_ENDPOINT=https://.cloud.appwrite.io/v1 + APPWRITE_PROJECT_ID= + APPWRITE_API_KEY= + +4. Client setup (key snippet) + - File: `app.js` + ```js + require('dotenv').config(); + const sdk = require('node-appwrite'); + const client = new sdk.Client() + .setEndpoint(process.env.APPWRITE_ENDPOINT) + .setProject(process.env.APPWRITE_PROJECT_ID) + .setKey(process.env.APPWRITE_API_KEY); + // Services + const tablesDB = new sdk.TablesDB(client); + module.exports = { sdk, client, tablesDB }; + ``` + +5. Example ops (idea + key snippets) + - Create database/table/columns, seed rows, and list rows as in docs. + - Key create/list pattern: + ```js + const { sdk, tablesDB } = require('./app'); + async function listRows(databaseId, tableId) { + const res = await tablesDB.listRows({ databaseId, tableId }); + console.log(res.rows); + } + ``` + +6. Run & test + - node app.js + +Deliverables + +- `.env`, `app.js` with client, additional scripts for create/list as needed diff --git a/src/prompts/quickstarts/nuxt.md b/src/prompts/quickstarts/nuxt.md new file mode 100644 index 0000000000..320c7bc7e9 --- /dev/null +++ b/src/prompts/quickstarts/nuxt.md @@ -0,0 +1,74 @@ +Goal: Add Appwrite auth to a new Nuxt 3 app with a simple login/register/logout UI. + +Rules + +- Never assume project details. Ask user for Cloud Region and Project ID. +- Use `.env` with `NUXT_PUBLIC_` variables; do not hardcode. +- Respect the user’s package manager (examples use npm). + +1. Scaffold Nuxt + - Run: npx nuxi@latest init my-app && cd my-app + +2. Install SDK + - Run: npm install appwrite + +3. Configure env (ask user first) + - Ask for: Cloud Region (e.g. fra/nyc), Project ID (Console → Settings). + - Create `.env` with: + NUXT_PUBLIC_APPWRITE_ENDPOINT=https://.cloud.appwrite.io/v1 + NUXT_PUBLIC_APPWRITE_PROJECT_ID= + +4. Appwrite client (key snippet) + - File: `utils/appwrite.js` + + ```js + import { Client, Account } from 'appwrite'; + + const endpoint = process.env.NUXT_PUBLIC_APPWRITE_ENDPOINT; + const projectId = process.env.NUXT_PUBLIC_APPWRITE_PROJECT_ID; + if (!endpoint || !projectId) throw new Error('Missing NUXT_PUBLIC_* env in .env'); + + export const client = new Client().setEndpoint(endpoint).setProject(projectId); + export const account = new Account(client); + export { ID } from 'appwrite'; + ``` + +5. UI wiring in `app.vue` (idea + key snippets) + - Template: minimal form with inputs (email, password, name) and buttons (Login, Register, Logout). Show current user name when logged in. + - Script setup essentials: + ```js + import { ref } from 'vue'; + import { account, ID } from '~/utils/appwrite'; + const user = ref(null), + email = ref(''), + password = ref(''), + name = ref(''); + async function login(e, p) { + await account.createEmailPasswordSession({ email: e, password: p }); + user.value = await account.get(); + } + async function register() { + await account.create({ + userId: ID.unique(), + email: email.value, + password: password.value, + name: name.value + }); + await login(email.value, password.value); + } + async function logout() { + await account.deleteSession({ sessionId: 'current' }); + user.value = null; + } + ``` + +6. Verify platform + - Ask user to confirm Web platform exists in Console with Hostname = `localhost`. + +7. Run & test + - Run: npm run dev + - Open http://localhost:3000 and test register/login/logout. + +Deliverables + +- `.env`, `utils/appwrite.js`, updated `app.vue` minimal form and actions diff --git a/src/prompts/quickstarts/php.md b/src/prompts/quickstarts/php.md new file mode 100644 index 0000000000..a91e1c82c0 --- /dev/null +++ b/src/prompts/quickstarts/php.md @@ -0,0 +1,45 @@ +Goal: Use Appwrite from a new PHP CLI app to create/read data (no client UI). + +Rules + +- Ask user for Cloud Region, Project ID, and an API Key with required scopes. +- Read credentials from env; do not hardcode. + +1. Scaffold + - mkdir my-app && cd my-app && composer init + +2. Install SDK + - composer require appwrite/appwrite:15.0.0 + +3. Configure env (ask user first) + - Create `.env` with: + APPWRITE_ENDPOINT=https://.cloud.appwrite.io/v1 + APPWRITE_PROJECT_ID= + APPWRITE_API_KEY= + +4. Client setup (key snippet) + - File: `index.php` + ```php + setEndpoint(getenv('APPWRITE_ENDPOINT')) + ->setProject(getenv('APPWRITE_PROJECT_ID')) + ->setKey(getenv('APPWRITE_API_KEY')); + $tablesDB = new TablesDB($client); + ``` + +5. Example ops (idea + key snippets) + - Create database/table/columns; seed rows; list rows using `Query`. + ```php + $todos = $tablesDB->listRows($dbId, $tableId); + foreach ($todos['rows'] as $todo) echo $todo['title']."\n"; + ``` + +6. Run & test + - php index.php + +Deliverables + +- `.env`, `index.php` with client and example ops diff --git a/src/prompts/quickstarts/python.md b/src/prompts/quickstarts/python.md new file mode 100644 index 0000000000..2feef1d403 --- /dev/null +++ b/src/prompts/quickstarts/python.md @@ -0,0 +1,50 @@ +Goal: Use Appwrite from a new Python server app to create/read data (no client UI). + +Rules + +- Ask user for Cloud Region, Project ID, and an API Key with required scopes. +- Read credentials from env; do not hardcode. + +1. Scaffold + - mkdir my_app && cd my_app + - python -m venv .venv && source .venv/bin/activate (or Windows equivalent) + +2. Install SDK + - pip install appwrite==11.0.0 + +3. Configure env (ask user first) + - Create `.env` with: + APPWRITE_ENDPOINT=https://.cloud.appwrite.io/v1 + APPWRITE_PROJECT_ID= + APPWRITE_API_KEY= + +4. Client setup (key snippet) + - File: `my_app.py` + ```py + from appwrite.client import Client + from appwrite.services.tablesDB import TablesDB + from appwrite.id import ID + import os + client = Client() + client.set_endpoint(os.getenv('APPWRITE_ENDPOINT')) + client.set_project(os.getenv('APPWRITE_PROJECT_ID')) + client.set_key(os.getenv('APPWRITE_API_KEY')) + tablesDB = TablesDB(client) + ``` + +5. Example ops (idea + key snippets) + - Create database/table/columns; seed rows; list rows using `Query`. + - Key list pattern: + ```py + from appwrite.query import Query + def list_rows(database_id, table_id): + res = tablesDB.list_rows(database_id=database_id, table_id=table_id) + print(res['rows']) + ``` + +6. Run & test + - python my_app.py + +Deliverables + +- `.env`, `my_app.py` with client and example ops diff --git a/src/prompts/quickstarts/react-native.md b/src/prompts/quickstarts/react-native.md new file mode 100644 index 0000000000..ffd669ef4f --- /dev/null +++ b/src/prompts/quickstarts/react-native.md @@ -0,0 +1,73 @@ +Goal: Add Appwrite auth to a new React Native (Expo) app with a minimal login/register/logout UI. + +Rules + +- Never assume project details. Ask the user for Cloud Region, Project ID, and package/bundle ID. +- Use explicit config (no hardcoding in code except reading constants/env the user sets). +- Respect the user’s package manager and Expo workflow. + +1. Scaffold Expo app + - Run: npx create-expo-app my-app && cd my-app + +2. Install SDK and polyfills + - Run: npx expo install react-native-appwrite react-native-url-polyfill + +3. Configure identifiers (ask user) + - Ask user for Android package name and iOS bundle identifier. Guide them to set these in `app.json`. + - Ask for Cloud Region and Project ID from Console → Settings. + +4. Client setup (key snippet) + - File: `app/lib/appwrite.ts` (or `.js`) + + ```ts + import 'react-native-url-polyfill/auto'; + import { Client, Account, ID } from 'react-native-appwrite'; + + const endpoint = 'https://.cloud.appwrite.io/v1'; // ask user for + const project = ''; // ask user for ID + const platform = ''; // ask user for this + + const client = new Client().setEndpoint(endpoint).setProject(project).setPlatform(platform); + export const account = new Account(client); + export { ID }; + ``` + +5. UI wiring (idea + key snippets) + - Screen file (e.g., `app/(tabs)/index.tsx`): + + ```tsx + import React, { useState } from 'react'; + import { View, Text, TextInput, TouchableOpacity } from 'react-native'; + import { account, ID } from '../lib/appwrite'; + + const [user, setUser] = useState(null); + const [email, setEmail] = useState(''); + const [password, setPassword] = useState(''); + const [name, setName] = useState(''); + + async function login(e: string, p: string) { + await account.createEmailPasswordSession({ email: e, password: p }); + setUser(await account.get()); + } + async function register() { + await account.create({ userId: ID.unique(), email, password, name }); + await login(email, password); + } + async function logout() { + await account.deleteSession({ sessionId: 'current' }); + setUser(null); + } + ``` + + - Minimal JSX: display user name when logged in; inputs for email/password/name; buttons for Login/Register/Logout. + +6. Verify platforms + - Ask user to add Android and/or iOS platform in Console. Use the configured package/bundle identifiers. + +7. Run & test + - Run: npx expo start + - Test register → auto login → logout → login. + +Deliverables + +- `app/lib/appwrite.ts`, updated screen with minimal form and actions diff --git a/src/prompts/quickstarts/react.md b/src/prompts/quickstarts/react.md new file mode 100644 index 0000000000..6f2267b6f2 --- /dev/null +++ b/src/prompts/quickstarts/react.md @@ -0,0 +1,71 @@ +Goal: Add Appwrite auth to a new React (Vite) app with a simple login/register/logout UI. + +Important rules + +- Never assume project details; ask the user for Appwrite Cloud region and Project ID. +- Store these in .env.local; do not hardcode. +- Respect the user’s package manager (npm/pnpm/yarn). Examples use npm. + +1. Create React project (Vite) + - Run: npm create vite@latest my-app -- --template react + - cd my-app + +2. Install Appwrite SDK + - Run: npm install appwrite + +3. Configure environment (ask user first) + - Ask for: Appwrite Cloud Region (e.g. fra, nyc) and Project ID. + - Create .env.local with: + VITE_APPWRITE_ENDPOINT=https://.cloud.appwrite.io/v1 + VITE_APPWRITE_PROJECT_ID= + +4. Create Appwrite client module + - Create file: src/lib/appwrite.js + - Contents: + import { Client, Account } from 'appwrite'; + + const endpoint = import.meta.env.VITE_APPWRITE_ENDPOINT; + const projectId = import.meta.env.VITE_APPWRITE_PROJECT_ID; + + if (!endpoint || !projectId) { + throw new Error('Missing VITE_APPWRITE_ENDPOINT or VITE_APPWRITE_PROJECT_ID in .env.local'); + } + + export const client = new Client() + .setEndpoint(endpoint) + .setProject(projectId); + + export const account = new Account(client); + export { ID } from 'appwrite'; + +5. Build the login page (idea + key snippets) + - File: `src/App.jsx` + - Render: minimal form (email, password, optional name) + buttons (Login, Register, Logout). Show user name when logged in. + - Logic essentials: + ```js + import { account, ID } from './lib/appwrite'; + async function login(email, password) { + await account.createEmailPasswordSession({ email, password }); + setUser(await account.get()); + } + async function register() { + await account.create({ userId: ID.unique(), email, password, name }); + await login(email, password); + } + async function logout() { + await account.deleteSession({ sessionId: 'current' }); + setUser(null); + } + ``` + +6. Verify platform setup + - Ask user to confirm a Web app platform exists in Appwrite Console with Hostname = localhost. + +7. Run and test + - Run: npm run dev -- --open --port 3000 + - Open http://localhost:3000 and test register/login/logout. + +Deliverables + +- Running Vite React app with Appwrite auth +- Files: src/lib/appwrite.js, src/App.jsx, .env.local diff --git a/src/prompts/quickstarts/refine.md b/src/prompts/quickstarts/refine.md new file mode 100644 index 0000000000..3ddd2ee305 --- /dev/null +++ b/src/prompts/quickstarts/refine.md @@ -0,0 +1,68 @@ +Goal: Create a new Refine app wired to Appwrite (auth + data provider), using minimal changes. + +Rules + +- Never assume project details. Ask the user for: API Endpoint (region), Project ID, and (if using data provider) Database ID and Table ID. +- Prefer env vars; do not hardcode secrets. + +1. Scaffold (Refine preset for Appwrite) + - Run: npm create refine-app@latest -- --preset refine-appwrite + - cd into the project + +2. Dependencies + - The preset includes the Appwrite integration. For existing apps instead: npm install @refinedev/appwrite + +3. Configure env (ask user first) + - Ask for: Endpoint (e.g. https://.cloud.appwrite.io/v1), Project ID + - Create `.env.local` with: + VITE_APPWRITE_ENDPOINT=https://.cloud.appwrite.io/v1 + VITE_APPWRITE_PROJECT_ID= + # Optional if you’ll use providers right away + VITE_APPWRITE_DATABASE_ID= + VITE_APPWRITE_TABLE_ID= + +4. Appwrite client (key snippet) + - File: `src/utility/appwriteClient.ts` + + ```ts + import { Appwrite, Account, Storage } from '@refinedev/appwrite'; + const endpoint = import.meta.env.VITE_APPWRITE_ENDPOINT; + const projectId = import.meta.env.VITE_APPWRITE_PROJECT_ID; + if (!endpoint || !projectId) throw new Error('Missing VITE_APPWRITE_*'); + + const appwriteClient = new Appwrite().setEndpoint(endpoint).setProject(projectId); + const account = new Account(appwriteClient); + const storage = new Storage(appwriteClient); + export { appwriteClient, account, storage }; + ``` + +5. Providers wiring (idea + key snippets) + - In `src/App.tsx`, keep the preset structure. Ensure the providers receive your Database/Table IDs (ask user for these or guide them to create them in Console). + + ```ts + import { Refine } from '@refinedev/core'; + import { dataProvider, liveProvider } from '@refinedev/appwrite'; + import { appwriteClient } from './utility/appwriteClient'; + + const databaseId = import.meta.env.VITE_APPWRITE_DATABASE_ID; + const tableId = import.meta.env.VITE_APPWRITE_TABLE_ID; + // Pass databaseId to providers; tableId is used by resources/routes. + + ``` + + - Use Refine’s `` for login/register, and point your initial route to a resource backed by `tableId`. + +6. Verify platform + - Ask user to add a Web platform in Appwrite Console with Hostname = `localhost`. + +7. Run & test + - npm run dev -- --open --port 3000 + - Confirm you can load the auth page and list a resource backed by your table. + +Deliverables + +- `.env.local`, `src/utility/appwriteClient.ts`, updated `src/App.tsx` provider config diff --git a/src/prompts/quickstarts/ruby.md b/src/prompts/quickstarts/ruby.md new file mode 100644 index 0000000000..f860316f4c --- /dev/null +++ b/src/prompts/quickstarts/ruby.md @@ -0,0 +1,44 @@ +Goal: Use Appwrite from a new Ruby CLI app to create/read data (no client UI). + +Rules + +- Ask user for Cloud Region, Project ID, and an API Key with required scopes. +- Read credentials from env; do not hardcode. + +1. Scaffold + - mkdir my-app && cd my-app && bundle init + +2. Install SDK + - bundle add appwrite + +3. Configure env (ask user first) + - Create `.env` with: + APPWRITE_ENDPOINT=https://.cloud.appwrite.io/v1 + APPWRITE_PROJECT_ID= + APPWRITE_API_KEY= + +4. Client setup (key snippet) + - File: `app.rb` + ```ruby + require 'appwrite' + include Appwrite + client = Client.new + .set_endpoint(ENV['APPWRITE_ENDPOINT']) + .set_project(ENV['APPWRITE_PROJECT_ID']) + .set_key(ENV['APPWRITE_API_KEY']) + tablesDB = TablesDB.new(client) + ``` + +5. Example ops (idea + key snippets) + - Create database/table/columns; seed rows; list rows. + ```ruby + todos = tablesDB.list_rows(database_id: db_id, table_id: table_id) + todos['rows'].each { |t| puts t['title'] } + ``` + +6. Run & test + - ruby app.rb + +Deliverables + +- `.env`, `app.rb` with client and example ops diff --git a/src/prompts/quickstarts/solid.md b/src/prompts/quickstarts/solid.md new file mode 100644 index 0000000000..ca1a21c8f1 --- /dev/null +++ b/src/prompts/quickstarts/solid.md @@ -0,0 +1,68 @@ +Goal: Add Appwrite auth to a new Solid (Vite) app with a minimal login/register/logout UI. + +Rules + +- Ask user for Cloud Region and Project ID. +- Use `.env.local` with `VITE_` prefix; do not hardcode. + +1. Scaffold Solid (Vite) + - npm create vite@latest my-app -- --template solid && cd my-app + +2. Install SDK + - npm install appwrite + +3. Configure env (ask user first) + - Create `.env.local`: + VITE_APPWRITE_ENDPOINT=https://.cloud.appwrite.io/v1 + VITE_APPWRITE_PROJECT_ID= + +4. Appwrite client (key snippet) + - File: `src/lib/appwrite.js` + ```js + import { Client, Account } from 'appwrite'; + const endpoint = import.meta.env.VITE_APPWRITE_ENDPOINT; + const projectId = import.meta.env.VITE_APPWRITE_PROJECT_ID; + if (!endpoint || !projectId) throw new Error('Missing VITE_APPWRITE_* in .env.local'); + export const client = new Client().setEndpoint(endpoint).setProject(projectId); + export const account = new Account(client); + export { ID } from 'appwrite'; + ``` + +5. UI wiring (idea + key snippets) + - File: `src/App.jsx` + - Use Solid signals and minimal form. Essentials: + ```js + import { createSignal } from 'solid-js'; + import { account, ID } from './lib/appwrite'; + const [user, setUser] = createSignal(null); + const [email, setEmail] = createSignal(''); + const [password, setPassword] = createSignal(''); + const [name, setName] = createSignal(''); + async function login(e, p) { + await account.createEmailPasswordSession({ email: e, password: p }); + setUser(await account.get()); + } + async function register() { + await account.create({ + userId: ID.unique(), + email: email(), + password: password(), + name: name() + }); + await login(email(), password()); + } + async function logout() { + await account.deleteSession({ sessionId: 'current' }); + setUser(null); + } + ``` + +6. Verify platform + - Ask user to add Web platform in Console with Hostname = `localhost`. + +7. Run & test + - npm run dev -- --open --port 3000 + +Deliverables + +- `.env.local`, `src/lib/appwrite.js`, updated `src/App.jsx` with minimal form/actions diff --git a/src/prompts/quickstarts/sveltekit.md b/src/prompts/quickstarts/sveltekit.md new file mode 100644 index 0000000000..3bbbfadd42 --- /dev/null +++ b/src/prompts/quickstarts/sveltekit.md @@ -0,0 +1,91 @@ +Goal: Add Appwrite auth to a new SvelteKit app with a simple login/register/logout UI. + +Important rules + +- Never assume project details; ask the user for Appwrite Cloud region and Project ID. +- Store these in `.env` (SvelteKit reads from `$env/static/public`). Do not hardcode. +- Respect the user’s package manager. Examples use npm. + +1. Create SvelteKit project + - Run: npx sv create + - Choose SvelteKit + JavaScript (or TypeScript if user wants TS). + - cd into the created directory. + +2. Install Appwrite SDK + - Run: npm install appwrite + +3. Configure environment (ask user first) + - Ask for Cloud Region and Project ID. + - Create `.env` in project root with: + PUBLIC_APPWRITE_ENDPOINT=https://.cloud.appwrite.io/v1 + PUBLIC_APPWRITE_PROJECT_ID= + +4. Create Appwrite client module + - Create file: src/lib/appwrite.js + - Contents: + import { Client, Account } from 'appwrite'; + import { PUBLIC_APPWRITE_ENDPOINT, PUBLIC_APPWRITE_PROJECT_ID } from '$env/static/public'; + + if (!PUBLIC_APPWRITE_ENDPOINT || !PUBLIC_APPWRITE_PROJECT_ID) { + throw new Error('Missing PUBLIC_APPWRITE_ENDPOINT or PUBLIC_APPWRITE_PROJECT_ID in .env'); + } + + export const client = new Client() + .setEndpoint(PUBLIC_APPWRITE_ENDPOINT) + .setProject(PUBLIC_APPWRITE_PROJECT_ID); + + export const account = new Account(client); + export { ID } from 'appwrite'; + +5. Build the login page (idea + key snippets, no full file replacement) + - In `src/routes/+page.svelte`, add a minimal form with inputs: email, password, optional name; and buttons: Login, Register, Logout. + - State and actions (paste inside ` + +3. Initialize (ask user first) + - Ask for Region and Project ID. + - If using bundler/module: + ```js + import { Client, Account, ID } from 'appwrite'; + const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') + .setProject(''); + const account = new Account(client); + export { account, ID }; + ``` + - If using CDN: + ```html + + ``` + +4. UI wiring (idea + key snippets) + - index.html: inputs (email, password, name) + buttons (Login, Register, Logout), area to show current user name. + - app.js essentials: + ```js + async function login(email, password) { + await account.createEmailPasswordSession({ email, password }); + show(await account.get()); + } + async function register(email, password, name) { + await account.create({ userId: ID.unique(), email, password, name }); + await login(email, password); + } + async function logout() { + await account.deleteSession({ sessionId: 'current' }); + show(null); + } + ``` + +5. Verify platform + - Ask user to add Web platform in Console with correct hostname (localhost for local dev). + +6. Run & test + - Serve the folder (any static server) and test register/login/logout. + +Deliverables + +- index.html, app.js wired to Appwrite via package or CDN diff --git a/src/routes/docs/quick-starts/android-java/+page.markdoc b/src/routes/docs/quick-starts/android-java/+page.markdoc index 7713ecf88a..2f31e7f8cf 100644 --- a/src/routes/docs/quick-starts/android-java/+page.markdoc +++ b/src/routes/docs/quick-starts/android-java/+page.markdoc @@ -5,6 +5,7 @@ description: Get started with Appwrite on Android using Java and learn how to bu difficulty: beginner readtime: 3 back: /docs/quick-starts +prompt: quickstarts/android-java.md --- Learn how to setup your first Android project powered by Appwrite and the [Appwrite Android SDK](https://github.com/appwrite/sdk-for-android) using Java. diff --git a/src/routes/docs/quick-starts/android/+page.markdoc b/src/routes/docs/quick-starts/android/+page.markdoc index 4148288587..6ce8dc99dd 100644 --- a/src/routes/docs/quick-starts/android/+page.markdoc +++ b/src/routes/docs/quick-starts/android/+page.markdoc @@ -5,6 +5,7 @@ description: Get started with Appwrite on Android and learn how to build secure difficulty: beginner readtime: 3 back: /docs/quick-starts +prompt: quickstarts/android.md --- Learn how to setup your first Android project powered by Appwrite and the [Appwrite Android SDK](https://github.com/appwrite/sdk-for-android). diff --git a/src/routes/docs/quick-starts/angular/+page.markdoc b/src/routes/docs/quick-starts/angular/+page.markdoc index c8f753dfe2..12583c591a 100644 --- a/src/routes/docs/quick-starts/angular/+page.markdoc +++ b/src/routes/docs/quick-starts/angular/+page.markdoc @@ -5,6 +5,7 @@ description: Learn how to use Appwrite to add authentication, user management, f difficulty: beginner readtime: 3 back: /docs/quick-starts +prompt: quickstarts/angular.md --- diff --git a/src/routes/docs/quick-starts/apple/+page.markdoc b/src/routes/docs/quick-starts/apple/+page.markdoc index 46bc7ae130..3c76ad0c66 100644 --- a/src/routes/docs/quick-starts/apple/+page.markdoc +++ b/src/routes/docs/quick-starts/apple/+page.markdoc @@ -5,6 +5,7 @@ description: Build iOS apps with Appwrite and learn how to use our powerful back difficulty: beginner readtime: 10 back: /docs/quick-starts +prompt: quickstarts/apple.md --- Learn how to setup your first Apple project powered by Appwrite and the [Appwrite Apple SDK](https://github.com/appwrite/sdk-for-apple). diff --git a/src/routes/docs/quick-starts/dart/+page.markdoc b/src/routes/docs/quick-starts/dart/+page.markdoc index b76aaa46be..ce27f72e86 100644 --- a/src/routes/docs/quick-starts/dart/+page.markdoc +++ b/src/routes/docs/quick-starts/dart/+page.markdoc @@ -2,6 +2,7 @@ layout: article title: Start with Dart description: Build Flutter apps with Appwrite and learn how to use our powerful backend to add authentication, user management, file storage, and more. +prompt: quickstarts/dart.md --- Learn how to setup your first Dart project powered by Appwrite. {% section #step-1 step=1 title="Create project" %} diff --git a/src/routes/docs/quick-starts/deno/+page.markdoc b/src/routes/docs/quick-starts/deno/+page.markdoc index fe9299e9a7..197ad8d5d4 100644 --- a/src/routes/docs/quick-starts/deno/+page.markdoc +++ b/src/routes/docs/quick-starts/deno/+page.markdoc @@ -5,6 +5,7 @@ description: Dive into our step-by-step guide on integrating Appwrite with your difficulty: beginner readtime: 5 back: /docs/quick-starts +prompt: quickstarts/deno.md --- {% info title="Deno SDK Deprecation" %} diff --git a/src/routes/docs/quick-starts/dotnet/+page.markdoc b/src/routes/docs/quick-starts/dotnet/+page.markdoc index 39a0f11565..fcabfe5e48 100644 --- a/src/routes/docs/quick-starts/dotnet/+page.markdoc +++ b/src/routes/docs/quick-starts/dotnet/+page.markdoc @@ -5,6 +5,7 @@ description: Learn to get started with server integrations with Appwrite .NET SD difficulty: beginner readtime: 5 back: /docs/quick-starts +prompt: quickstarts/dotnet.md --- Learn how to setup your first .NET project powered by Appwrite. {% section #step-1 step=1 title="Create project" %} diff --git a/src/routes/docs/quick-starts/flutter/+page.markdoc b/src/routes/docs/quick-starts/flutter/+page.markdoc index 18c16952af..b1dcaf6f21 100644 --- a/src/routes/docs/quick-starts/flutter/+page.markdoc +++ b/src/routes/docs/quick-starts/flutter/+page.markdoc @@ -5,6 +5,7 @@ description: Build Flutter apps with Appwrite and learn how to use our powerful difficulty: beginner readtime: 10 back: /docs/quick-starts +prompt: quickstarts/flutter.md --- Learn how to setup your first Flutter project powered by Appwrite. diff --git a/src/routes/docs/quick-starts/go/+page.markdoc b/src/routes/docs/quick-starts/go/+page.markdoc index b19b7d7954..ab731d8156 100644 --- a/src/routes/docs/quick-starts/go/+page.markdoc +++ b/src/routes/docs/quick-starts/go/+page.markdoc @@ -5,6 +5,7 @@ description: Integrating Appwrite with your Go backend application is a quick an difficulty: beginner readtime: 5 back: /docs/quick-starts +prompt: quickstarts/go.md --- Learn how to set up your first Go project powered by Appwrite. {% section #step-1 step=1 title="Create project" %} diff --git a/src/routes/docs/quick-starts/kotlin/+page.markdoc b/src/routes/docs/quick-starts/kotlin/+page.markdoc index 85f2fb40c6..a9a2359425 100644 --- a/src/routes/docs/quick-starts/kotlin/+page.markdoc +++ b/src/routes/docs/quick-starts/kotlin/+page.markdoc @@ -5,6 +5,7 @@ description: Learn to get started with server integrations with Appwrite Kotlin difficulty: beginner readtime: 5 back: /docs/quick-starts +prompt: quickstarts/kotlin.md --- Learn how to setup your first Kotlin project powered by Appwrite. {% section #step-1 step=1 title="Create project" %} diff --git a/src/routes/docs/quick-starts/node/+page.markdoc b/src/routes/docs/quick-starts/node/+page.markdoc index 3ea38650b5..f4956a1d5d 100644 --- a/src/routes/docs/quick-starts/node/+page.markdoc +++ b/src/routes/docs/quick-starts/node/+page.markdoc @@ -5,6 +5,7 @@ description: Dive into our step-by-step guide on integrating Appwrite with your difficulty: beginner readtime: 5 back: /docs/quick-starts +prompt: quickstarts/node.md --- Learn how to setup your first Node.js project powered by Appwrite. {% section #step-1 step=1 title="Create project" %} diff --git a/src/routes/docs/quick-starts/nuxt/+page.markdoc b/src/routes/docs/quick-starts/nuxt/+page.markdoc index 59a4ddbe69..3f61e39fcc 100644 --- a/src/routes/docs/quick-starts/nuxt/+page.markdoc +++ b/src/routes/docs/quick-starts/nuxt/+page.markdoc @@ -5,6 +5,7 @@ description: Build Nuxt.js apps with Appwrite and learn how to use our powerful difficulty: beginner readtime: 3 back: /docs/quick-starts +prompt: quickstarts/nuxt.md --- Learn how to setup your first Nuxt project powered by Appwrite. diff --git a/src/routes/docs/quick-starts/php/+page.markdoc b/src/routes/docs/quick-starts/php/+page.markdoc index 56eadc8b66..871dfe648a 100644 --- a/src/routes/docs/quick-starts/php/+page.markdoc +++ b/src/routes/docs/quick-starts/php/+page.markdoc @@ -5,6 +5,7 @@ description: Dive into our step-by-step guide on integrating Appwrite with your difficulty: beginner readtime: 5 back: /docs/quick-starts +prompt: quickstarts/php.md --- Learn how to setup your first PHP project powered by Appwrite. {% section #step-1 step=1 title="Create project" %} diff --git a/src/routes/docs/quick-starts/python/+page.markdoc b/src/routes/docs/quick-starts/python/+page.markdoc index 62683f5eaa..39a30a17aa 100644 --- a/src/routes/docs/quick-starts/python/+page.markdoc +++ b/src/routes/docs/quick-starts/python/+page.markdoc @@ -5,6 +5,7 @@ description: Learn to get started with server integrations with Appwrite Python difficulty: beginner readtime: 5 back: /docs/quick-starts +prompt: quickstarts/python.md --- Learn how to setup your first Python project powered by Appwrite. {% section #step-1 step=1 title="Create project" %} diff --git a/src/routes/docs/quick-starts/react-native/+page.markdoc b/src/routes/docs/quick-starts/react-native/+page.markdoc index fbc12b2286..8e4ebac44b 100644 --- a/src/routes/docs/quick-starts/react-native/+page.markdoc +++ b/src/routes/docs/quick-starts/react-native/+page.markdoc @@ -5,6 +5,7 @@ description: Discover how to leverage Appwrite's powerful backend to help you bu difficulty: beginner readtime: 10 back: /docs/quick-starts +prompt: quickstarts/react-native.md --- Learn how to setup your first React Native project powered by Appwrite. diff --git a/src/routes/docs/quick-starts/react/+page.markdoc b/src/routes/docs/quick-starts/react/+page.markdoc index fe78b5d6db..b92467ace6 100644 --- a/src/routes/docs/quick-starts/react/+page.markdoc +++ b/src/routes/docs/quick-starts/react/+page.markdoc @@ -5,6 +5,7 @@ description: Build React apps with Appwrite and learn how to use our powerful ba difficulty: beginner readtime: 3 back: /docs/quick-starts +prompt: quickstarts/react.md --- Learn how to setup your first React project powered by Appwrite. diff --git a/src/routes/docs/quick-starts/refine/+page.markdoc b/src/routes/docs/quick-starts/refine/+page.markdoc index 7b09233668..a88b7c78a9 100644 --- a/src/routes/docs/quick-starts/refine/+page.markdoc +++ b/src/routes/docs/quick-starts/refine/+page.markdoc @@ -5,6 +5,7 @@ description: Build Refine apps with Appwrite and learn how to use our powerful b difficulty: beginner readtime: 3 back: /docs/quick-starts +prompt: quickstarts/refine.md --- Learn how to setup your first Refine project powered by Appwrite. diff --git a/src/routes/docs/quick-starts/ruby/+page.markdoc b/src/routes/docs/quick-starts/ruby/+page.markdoc index d9ca0d601c..2d53a4bad2 100644 --- a/src/routes/docs/quick-starts/ruby/+page.markdoc +++ b/src/routes/docs/quick-starts/ruby/+page.markdoc @@ -5,6 +5,7 @@ description: Dive into our step-by-step guide on integrating Appwrite with your difficulty: beginner readtime: 5 back: /docs/quick-starts +prompt: quickstarts/ruby.md --- Learn how to setup your first Ruby project powered by Appwrite. {% section #step-1 step=1 title="Create project" %} diff --git a/src/routes/docs/quick-starts/solid/+page.markdoc b/src/routes/docs/quick-starts/solid/+page.markdoc index fafe2ac291..9152a917ee 100644 --- a/src/routes/docs/quick-starts/solid/+page.markdoc +++ b/src/routes/docs/quick-starts/solid/+page.markdoc @@ -5,6 +5,7 @@ description: Build Solid apps with Appwrite and learn how to use our powerful ba difficulty: beginner readtime: 3 back: /docs/quick-starts +prompt: quickstarts/solid.md --- Learn how to setup your first Solid project powered by Appwrite. diff --git a/src/routes/docs/quick-starts/sveltekit/+page.markdoc b/src/routes/docs/quick-starts/sveltekit/+page.markdoc index 63ab82f391..d37cacc251 100644 --- a/src/routes/docs/quick-starts/sveltekit/+page.markdoc +++ b/src/routes/docs/quick-starts/sveltekit/+page.markdoc @@ -5,6 +5,7 @@ description: Learn how to use Appwrite to add authentication, user management, f difficulty: beginner readtime: 3 back: /docs/quick-starts +prompt: quickstarts/sveltekit.md --- Learn how to setup your first SvelteKit project powered by Appwrite. {% section #step-1 step=1 title="Create project" %} diff --git a/src/routes/docs/quick-starts/swift/+page.markdoc b/src/routes/docs/quick-starts/swift/+page.markdoc index 7e494de834..bc532fa864 100644 --- a/src/routes/docs/quick-starts/swift/+page.markdoc +++ b/src/routes/docs/quick-starts/swift/+page.markdoc @@ -5,6 +5,7 @@ description: Learn to get started with server integrations with Appwrite Swift S difficulty: beginner readtime: 5 back: /docs/quick-starts +prompt: quickstarts/swift.md --- Learn how to setup your first Swift project powered by Appwrite. diff --git a/src/routes/docs/quick-starts/vue/+page.markdoc b/src/routes/docs/quick-starts/vue/+page.markdoc index f73408e0be..1cf409592c 100644 --- a/src/routes/docs/quick-starts/vue/+page.markdoc +++ b/src/routes/docs/quick-starts/vue/+page.markdoc @@ -5,6 +5,7 @@ description: Build Vue.js apps with Appwrite and learn how to use our powerful b difficulty: beginner readtime: 3 back: /docs/quick-starts +prompt: quickstarts/vue.md --- Learn how to setup your first Vue project powered by Appwrite. diff --git a/src/routes/docs/quick-starts/web/+page.markdoc b/src/routes/docs/quick-starts/web/+page.markdoc index e7eba99540..a061235ade 100644 --- a/src/routes/docs/quick-starts/web/+page.markdoc +++ b/src/routes/docs/quick-starts/web/+page.markdoc @@ -5,6 +5,7 @@ description: Build JavaScript or Typescript web apps with Appwrite. Add authenti difficulty: beginner readtime: 3 back: /docs/quick-starts +prompt: quickstarts/web.md --- Learn how to add Appwrite to your web apps. From ef7bae955b335fa9eb61d5aef66810e4c0a2c9bb Mon Sep 17 00:00:00 2001 From: Atharva Deosthale Date: Thu, 16 Oct 2025 15:02:38 +0530 Subject: [PATCH 3/4] use cursor.com links, use tooltips, more changes --- src/lib/components/PromptBanner.svelte | 45 ++++++++++++++------------ 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/src/lib/components/PromptBanner.svelte b/src/lib/components/PromptBanner.svelte index 5037da5cf6..665b7e9aa1 100644 --- a/src/lib/components/PromptBanner.svelte +++ b/src/lib/components/PromptBanner.svelte @@ -3,6 +3,7 @@ import { getPrompt, hasPrompt } from '$lib/utils/prompts'; import { fly } from 'svelte/transition'; import { Button, Icon } from '$lib/components/ui'; + import { Tooltip } from '$lib/components'; import { createDropdownMenu, melt } from '@melt-ui/svelte'; import { onMount } from 'svelte'; @@ -17,8 +18,6 @@ type Ide = 'copy' | 'cursor' | 'chatgpt' | 'claude'; - // options rendered directly in dropdown - // Local dropdown configured to open to the left (bottom-end) const { elements: { trigger, menu }, @@ -36,16 +35,13 @@ return; } + open.set(false); + const text = encodeURIComponent(prompt); - // NOTE: Deep links are best-effort; fall back to copy if blocked if (value === 'cursor') { - const url = `cursor://anysphere.cursor-deeplink/prompt?text=${text}`; - try { - window.location.href = url; - } catch { - copy(); - } + const url = `https://cursor.com/link/prompt?text=${text}`; + window.open(url, '_blank', 'noopener,noreferrer'); return; } @@ -71,26 +67,35 @@
    - + + + {#snippet tooltip()} + Copied + {/snippet} + {#if $open} From 643cf03c4e02f6dc7282a8e5fe443750f8a4f22c Mon Sep 17 00:00:00 2001 From: Atharva Deosthale Date: Thu, 16 Oct 2025 15:18:01 +0530 Subject: [PATCH 4/4] underscore, yes underscore --- src/lib/components/PromptBanner.svelte | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/components/PromptBanner.svelte b/src/lib/components/PromptBanner.svelte index 665b7e9aa1..eae5740083 100644 --- a/src/lib/components/PromptBanner.svelte +++ b/src/lib/components/PromptBanner.svelte @@ -64,12 +64,12 @@ {#if exists}
    -
    -
    +
    +
    -
    +