Backend APIs for the project (Vercel + Hono + Supabase).
npm installCreate .env.local (this file is gitignored):
SUPABASE_URL=your_supabase_url_here
SUPABASE_ANON_KEY=your_supabase_anon_key_hereWe upload manually via the dashboard.
- Supabase Dashboard → Storage → New Bucket
- Turn Public bucket ON
- Drag & drop images into the bucket
- Use Get URL and save it as
members.avatar_url
Run the following in Supabase SQL Editor.
CREATE TABLE IF NOT EXISTS public.counters (
id INT PRIMARY KEY DEFAULT 1,
count INT NOT NULL DEFAULT 0,
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
INSERT INTO public.counters (id, count)
VALUES (1, 0)
ON CONFLICT (id) DO NOTHING;
ALTER TABLE public.counters ENABLE ROW LEVEL SECURITY;
CREATE POLICY "allow_read_counters" ON public.counters
FOR SELECT USING (true);
CREATE POLICY "allow_update_counters" ON public.counters
FOR UPDATE USING (true);CREATE TABLE IF NOT EXISTS public.members (
id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
name TEXT NOT NULL,
role TEXT NOT NULL,
avatar_url TEXT,
tw_url TEXT
);
ALTER TABLE public.members ENABLE ROW LEVEL SECURITY;
CREATE POLICY "allow_read_members" ON public.members
FOR SELECT USING (true);npm run devLocal dev server: http://localhost:3000
Increments the counter by 1 and returns the updated value.
Response:
{ "count": 123 }Returns members sorted by id ascending.
Response:
[
{
"id": 1,
"name": "Example",
"role": "Project Manager / Frontend Engineer",
"avatar_url": "https://...",
"tw_url": "https://x.com/..."
}
]PowerShell curl is an alias, so use curl.exe.
curl.exe -X POST http://localhost:3000/api/counter
curl.exe -X GET http://localhost:3000/api/membersnpm run formatnpm run deploy- This repo is Vercel-ready via api/[[...route]].ts.
- Local development uses a Node server (
tsx watch src/server.ts) to avoidvercel devrecursive invocation.