Everything you need to enable Sign in with Google and cross-device sync in one place. Both services are free. Total time: ~15 minutes.
Security reminder: Never share your passwords, API keys, or OAuth secrets with anyone — including in GitHub issues or chat.
You need two free accounts:
| # | Service | What it does | Time |
|---|---|---|---|
| 1 | Supabase | Hosts the database and handles OAuth | ~5 min |
| 2 | Google Cloud | Provides the "Sign in with Google" button | ~8 min |
Then you paste two values into a .env file (~2 min).
- Go to supabase.com and click Start your project (free tier, no credit card)
- Sign up with GitHub or email
- Click New project, enter a name (e.g.
paceread), choose any region, set a database password, click Create new project - Wait ~1 minute for provisioning
- In the Supabase dashboard sidebar, click SQL Editor
- Click New query
- Open
supabase/migrations/001_initial_schema.sqlfrom this repository, copy the entire contents, paste it into the editor, and click Run
This creates three tables (all protected by Row Level Security — users only ever see their own data):
user_files— per-file reading progressuser_preferences— display and reading settingsreading_sessions— session history per device
- In the sidebar click Settings → API
- Note down your Project URL (looks like
https://abcdefgh.supabase.co) - Note down the anon public key (long string under "Project API keys")
- Go to console.cloud.google.com and sign in with your Google account (free)
- In the top bar, click the project dropdown → New Project → give it a name (e.g.
PaceRead) → Create - Make sure the new project is selected in the top bar
- In the left sidebar go to APIs & Services → OAuth consent screen
- Choose External, click Create
- Fill in:
- App name:
PaceRead - User support email: your email
- Developer contact email: your email
- App name:
- Click Save and Continue through the remaining screens (Scopes and Test users can be left at defaults)
- Go to APIs & Services → Credentials
- Click + Create Credentials → OAuth 2.0 Client ID
- Application type: Web application
- Under Authorized redirect URIs, click + Add URI and paste:
Replace
https://YOUR-PROJECT-REF.supabase.co/auth/v1/callbackYOUR-PROJECT-REFwith the subdomain from your Supabase Project URL (e.g.abcdefgh) - Click Create
- A dialog shows your Client ID and Client Secret — copy both
- Back in the Supabase dashboard, go to Authentication → Providers
- Find Google, toggle it on
- Paste your Client ID and Client Secret from the previous step
- Click Save
- In Supabase go to Authentication → URL Configuration
- Under Redirect URLs, click Add URL and add:
http://localhost:5173(for local development)https://paceread.techscript.ca(for the deployed site)
- Click Save
In the root of this repository:
cp .env.example .envOpen .env and fill in the two Supabase values you noted in Step 1:
VITE_SUPABASE_URL=https://abcdefgh.supabase.co
VITE_SUPABASE_ANON_KEY=eyJhbGci...your-anon-key...Save the file.
npm run devOpen http://localhost:5173, click the ☰ menu, and you should see an Account section with a Sign In with Google button. Click it to complete a test sign-in.
- The app works fully without this setup — auth features are simply not shown
- File contents are never uploaded; only metadata (progress, filename, word count) is synced
- Row Level Security means your data is private even if someone knows your Supabase URL