This guide wires up persistent storage for your FlowNote app deployed on Vercel. Everything is 100% free — Supabase free tier + Vercel free tier.
Your Vercel deployment is a static site (index.html + pre-built React bundle).
The React bundle already calls /api/tasks, /api/notes, /api/areas, /api/projects —
but there was no backend to handle those calls.
The fix: Vercel Serverless Functions in the api/ folder.
Vercel automatically serves any file inside api/ as a serverless function.
Since the functions live at exactly the paths the React bundle calls, zero changes
are needed to the front-end code.
api/
tasks.js ← GET/POST/PATCH/DELETE /api/tasks and /api/tasks/:id
notes.js ← GET/POST/PATCH/DELETE /api/notes and /api/notes/:id
areas.js ← GET/POST /api/areas
projects.js ← GET/POST /api/projects
build.js ← updated: warns if SUPABASE_URL / SUPABASE_ANON_KEY are missing
vercel.json ← updated: declares serverless functions + URL rewrites for :id routes
index.html ← already fixed CSS filename (from previous fix)
supabase_schema.sql ← run once in Supabase to create the tables
- Go to supabase.com → Start your project → sign in with GitHub.
- Click New project.
- Name:
flownote(or anything) - Database password: set a strong one (you won't need it later)
- Region: pick the one closest to you (e.g. Singapore for India)
- Name:
- Wait ~2 minutes for the project to spin up.
- In your Supabase project, click SQL Editor (left sidebar) → New query.
- Copy the entire contents of
supabase_schema.sqland paste it in. - Click Run (or Ctrl+Enter).
- You should see: "Success. No rows returned."
This creates:
tasks— your to-do itemsnotes— your notesareas— organisational areas (Work, Personal, Health seeded by default)projects— projects within areas
- In your Supabase project, go to Settings → API (left sidebar).
- Copy two values:
- Project URL → looks like
https://xxxxxxxxxxxx.supabase.co - anon public key → a long JWT string under "Project API keys"
- Project URL → looks like
Keep these handy for the next step.
- Open your Vercel project → Settings → Environment Variables.
- Add these three variables:
| Name | Value | Note |
|---|---|---|
SUPABASE_URL |
https://xxxx.supabase.co |
Your project URL from Step 3 |
SUPABASE_ANON_KEY |
eyJhb... |
Your anon key from Step 3 |
FLOWNOTE_LOGIN_PASSWORD |
your-secret-password |
The password to log into FlowNote |
- For each variable, select All Environments (Production + Preview + Development).
- Click Save.
Copy the following files from this folder into your GitHub repo root:
api/tasks.js
api/notes.js
api/areas.js
api/projects.js
build.js ← replace the existing one
vercel.json ← replace the existing one
index.html ← replace the existing one (already has CSS fix)
Then commit and push:
git add api/ build.js vercel.json index.html
git commit -m "feat: add Supabase serverless API routes for persistent storage"
git pushVercel will automatically redeploy when it detects the push.
- Open your Vercel deployment URL.
- Enter your
FLOWNOTE_LOGIN_PASSWORD→ you should see the FlowNote UI. - Create a task → refresh the page → the task should still be there.
- Create a note → refresh → still there.
To confirm data is flowing to Supabase:
- Go to Supabase → Table Editor → select
tasksornotes. - You should see your created items.
Browser
│ GET /api/tasks
▼
Vercel Edge
├── Static files (index.html, assets/*.js, assets/*.css) ← served directly
└── api/tasks.js ← Vercel Serverless Function
│ fetch(`${SUPABASE_URL}/rest/v1/tasks`, { apikey: SUPABASE_ANON_KEY })
▼
Supabase REST API → PostgreSQL database
- No Node.js server to maintain
- Vercel functions scale to zero when not in use (free tier: 100 GB-hours/month)
- Supabase free tier: 500 MB database, unlimited API calls
| Symptom | Fix |
|---|---|
| Login screen shows but tasks don't load | Check that SUPABASE_URL and SUPABASE_ANON_KEY are set in Vercel env vars |
| 401 errors in browser console | Your anon key is wrong — re-copy it from Supabase Settings → API |
404 on /api/tasks |
Make sure api/tasks.js is committed and pushed to GitHub |
| Data saves but disappears on refresh | Row Level Security might be blocking — run the SQL schema again, it disables RLS |
| Password doesn't work | Check FLOWNOTE_LOGIN_PASSWORD in Vercel env vars; redeploy after changing it |
| Service | Plan | Cost |
|---|---|---|
| Vercel | Hobby (free) | $0 |
| Supabase | Free tier | $0 |
| Total | $0/month |
Supabase free tier includes 2 projects, 500 MB database, 5 GB bandwidth. Vercel free tier includes unlimited deployments, 100 GB bandwidth. Both are more than enough for a personal productivity app.