This project demonstrates a simple React client that uses the Appwrite SDK to authenticate users with Google.
Features:
- Sign in with Google (Appwrite OAuth)
- Sign out
- Protected routes:
/dashboardand/profile
Environment variables (add to .env.local):
VITE_APPWRITE_PROJECT_IDorAPPWRITE_PROJECT_ID— your Appwrite Project IDVITE_APPWRITE_API_KEYorAPPWRITE_API_KEY— optional API keyVITE_APPWRITE_ENDPOINT— Appwrite endpoint (defaults tohttp://localhost/v1)
Quick start:
- Install dependencies
npm install
- Add values to
.env.local. - Start E2E test server
npm run test:e2e
- Start dev server
npm run dev
Notes:
- For OAuth to work, configure a Google provider in Appwrite and configure the OAuth redirect URL to include
http://localhost:5173/oauth-callback(or the dev server host/port you use). - The
VITE_prefixed env vars are used by Vite during build; the plainAPPWRITE_names are kept for compatibility.