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.