Skip to content

Add Appwrite React library docs and launch post#3022

Merged
atharvadeosthale merged 13 commits into
mainfrom
react-library
Jun 26, 2026
Merged

Add Appwrite React library docs and launch post#3022
atharvadeosthale merged 13 commits into
mainfrom
react-library

Conversation

@atharvadeosthale

Copy link
Copy Markdown
Member

Adds the /docs/products/auth/react hub, rewrites the React, Next.js, and TanStack Start quickstarts to use @appwrite.io/react, and ships an announcement post under blog/post/announcing-appwrite-react-library.
Also updates /docs/sdks and adds a "React library" entry to the Auth sidebar.

Adds /docs/products/auth/react hub covering the provider, hooks, server helpers, handler routes, and OAuth flow. Rewrites the React, Next.js, and TanStack Start quickstarts to use @appwrite.io/react. Adds a launch blog post under blog/post/announcing-appwrite-react-library and a new "React library" entry in the Auth sidebar. Updates /docs/sdks to list the package.
@appwrite

appwrite Bot commented May 25, 2026

Copy link
Copy Markdown

Appwrite Website

Project ID: 69d7efb00023389e8d27

Sites (1)
Site Status Logs Preview QR
 website
69d7f2670014e24571ca
Building Building View Logs Preview URL QR Code

Website (appwrite/website)

Project ID: 684969cb000a2f6c0a02

Sites (1)
Site Status Logs Preview QR
 website
68496a17000f03d62013
Queued Queued View Logs Preview URL QR Code


Tip

Our Discord community has grown to 24K developers, and counting

@greptile-apps

greptile-apps Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR ships the Appwrite React library documentation: a new /docs/products/auth/react reference page, rewrites of the React, Next.js, and TanStack Start quickstarts to use @appwrite.io/react, an announcement blog post, a changelog entry, and a new SDK table row.

  • The reference docs, quickstarts, and blog post are internally consistent — hook signatures, admin/session client patterns, and handler configuration all agree across files.
  • Previously flagged issues are resolved: the blog post cover image is committed, useAuth() is correctly placed inside a component body, the TanStack quickstart documents the single-route provider caveat in an info callout, and the admin client examples use admin.users.list() throughout.
  • The .optimize-cache.json entry for the new cover image is present; the extension difference from the committed .avif file is intentional per repo convention.

Confidence Score: 5/5

Documentation-only change; no application logic is modified, making this safe to merge.

The change is entirely documentation and static content. Code examples are consistent across the reference page, three quickstarts, and the blog post. Previously raised concerns have been addressed in this iteration.

No files require special attention.

Important Files Changed

Filename Overview
src/routes/docs/products/auth/react/+page.markdoc New React library reference doc covering provider, hooks, server helpers, and handler routes — admin client examples correctly use admin.users.list(), hook tables are consistent.
src/routes/blog/post/announcing-appwrite-react-library/+page.markdoc Announcement blog post; cover image is now committed, useAuth() is correctly placed inside a component body, and code snippets are consistent with the reference docs.
src/routes/docs/quick-starts/react/+page.markdoc Rewritten Vite React quickstart using the new @appwrite.io/react library; setup flow is clear and code examples are correct.
src/routes/docs/quick-starts/nextjs/+page.markdoc Rewritten Next.js App Router quickstart; SSR handler, providers pattern, and router.refresh() usage after mutations are all correct.
src/routes/docs/quick-starts/tanstack-start/+page.markdoc Rewritten TanStack Start quickstart; AppwriteProvider-per-route caveat is now documented in an info callout, and router.invalidate() is used correctly after mutations.
src/routes/docs/products/auth/+layout.svelte Adds "React library" nav entry with a isNewUntil('30 June 2026') badge; date is after today's date (2026-06-26) so the badge will display as expected.
.optimize-cache.json Adds cache entry for the new cover image; per repo convention extension differences between the cache key and the committed file are intentional.
src/routes/changelog/(entries)/2026-06-26.markdoc Changelog entry for the React library launch; content is accurate and consistent with the blog post and reference docs.
src/routes/docs/sdks/+page.markdoc Adds "React library 0.1.0" row to the SDKs table, correctly marked as beta with a link to the GitHub repository.

Reviews (10): Last reviewed commit: "Trim blog FAQs to generic auth-library q..." | Re-trigger Greptile

Comment thread src/routes/docs/quick-starts/tanstack-start/+page.markdoc
Rewrites the AI quickstart prompts under react/, nextjs/, and tanstack-start/ to use @appwrite.io/react instead of the raw Appwrite Web SDK setup, mirroring the rewritten +page.markdoc files.
- Fix admin client example: call admin.account.list() instead of dereferencing the Account service
- Add multi-route guidance to the TanStack Start quickstart so readers know to move AppwriteProvider into __root.tsx in real apps
- Wrap the blog useAuth() snippet in a function component to satisfy the Rules of Hooks
- Format prompt.md files per prettier
Reflects the new framework helper method that returns the full node-appwrite AdminServer (users, databases, storage, teams, and the rest). Hub keeps the standalone createAdminClient as an alternative.
title: "Announcing the Appwrite React library"
description: A small set of React hooks and SSR adapters that take the busywork out of wiring Appwrite Auth into Vite, Next.js, and TanStack Start apps.
date: 2026-05-25
cover: /images/blog/announcing-appwrite-react-library/cover.avif

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Blog post cover image is missing from the repository

The frontmatter references /images/blog/announcing-appwrite-react-library/cover.avif, but the directory static/images/blog/announcing-appwrite-react-library/ does not exist anywhere in the repo. Every other blog post in static/images/blog/ has its cover image committed alongside the post. Publishing this as-is will render a broken image on the blog listing and the post page itself.

Sets the announcement blog cover to the new React SDK artwork (date moved to 2026-06-24), adds the matching 2026-06-24 changelog entry, and tags the React library row in /docs/sdks as beta to align with the React Native SDK row.
Comment thread .optimize-cache.json
layout: post
title: "Announcing the Appwrite React library"
description: A small set of React hooks and SSR adapters that take the busywork out of wiring Appwrite Auth into Vite, Next.js, and TanStack Start apps.
date: 2026-06-24

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to fix dates

timeToRead: 5
author: atharva
category: announcement, authentication
faqs:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a few more generic FAQs

const { user, isLoading, error, refresh } = useUser();
```

Returns:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These don't look great. Maybe we should use subheadings? And maybe even update the copy?

| `scopes` | No | Provider-specific OAuth scopes to request. |
| `onError` | No | Callback invoked if the request fails before redirect. |

In SSR mode the success URL is fixed to the handler callback. The final redirect after that callback is controlled by the `redirects.success` config on the handler.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In SSR mode the success URL is fixed to the handler callback. The final redirect after that callback is controlled by the `redirects.success` config on the handler.
In SSR mode, the success URL is fixed to the handler callback. The final redirect after that callback is controlled by the `redirects.success` config on the handler.

Do a general grammar check as well please?


## Session client {% #session-client %}

For per-request operations scoped to the current user (reading their data, calling APIs on their behalf) call `createSessionClient` from the framework helper. It returns a `node-appwrite` client already authenticated with the session cookie, ready to use in server components, loaders, and server functions.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For per-request operations scoped to the current user (reading their data, calling APIs on their behalf) call `createSessionClient` from the framework helper. It returns a `node-appwrite` client already authenticated with the session cookie, ready to use in server components, loaders, and server functions.
For per-request operations scoped to the current user (reading their data, calling APIs on their behalf), call `createSessionClient` from the framework helper. It returns a `node-appwrite` client already authenticated with the session cookie, ready to use in server components, loaders, and server functions.

Comment on lines +316 to +347
## Next.js {% #handler-next %}

```ts
// app/api/appwrite/[...appwrite]/route.ts
import { createAppwriteHandlers } from "@appwrite.io/react/handlers/next";

export const { GET, POST } = createAppwriteHandlers({
endpoint: process.env.NEXT_PUBLIC_APPWRITE_ENDPOINT!,
projectId: process.env.NEXT_PUBLIC_APPWRITE_PROJECT_ID!,
apiKey: process.env.APPWRITE_API_KEY!,
basePath: "/api/appwrite",
});
```

## TanStack Start {% #handler-tanstack %}

```ts
// src/routes/api/appwrite/$.ts
import { createFileRoute } from "@tanstack/react-router";
import { createAppwriteHandlers } from "@appwrite.io/react/handlers/tanstack";

export const Route = createFileRoute("/api/appwrite/$")({
server: {
handlers: createAppwriteHandlers({
endpoint: import.meta.env.VITE_APPWRITE_ENDPOINT,
projectId: import.meta.env.VITE_APPWRITE_PROJECT_ID,
apiKey: process.env.APPWRITE_API_KEY!,
basePath: "/api/appwrite",
}),
},
});
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use tabs for such examples

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, should we add React Router and maybe even Astro (since you can use React components there)?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The library only supports Next and TanStack Start for SSR for now.

Bump blog and changelog date to 2026-06-26, add four generic FAQs
(beta status, React Native, cookie/redirect customization, magic URL/phone).
Restructure hooks reference: drop bare "Returns:" labels, add one-line
intros, split sign-in/up/out parameter tables into ### sub-headings.
Wrap Next.js and TanStack Start handler examples in {% tabs %}.
Grammar pass: add missing commas in provider, OAuth, session and
admin client copy.
Drop the beta/production-ready FAQ. Add three generic FAQs in its
place: open source repo + license, TypeScript support, where to
report bugs or request features.
Wrap the per-method parameter blocks for emailPassword and oAuth in
{% tabs %} so readers see one method at a time instead of stacked
sub-sections.

@adityaoberai adityaoberai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving to unblock

Drop the FAQs that were specific to the library's design or roadmap.
Keep version support, open source, supported auth methods, and where
to start. Add two generic FAQs explaining what an authentication
library is and why teams reach for one.
@atharvadeosthale atharvadeosthale merged commit d15508d into main Jun 26, 2026
6 of 7 checks passed
@atharvadeosthale atharvadeosthale deleted the react-library branch June 26, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants