A lightweight directory of developer tools (including AI tools), built with SvelteKit. The catalog is stored in Supabase (Postgres) with Row Level Security (RLS), and the UI supports searching and sending public suggestions for new tools.
@sveltejs/adapter-nodeapi.devtoolsservice_role can manage data)This prevents the classic OWASP “Broken Access Control” issue where public users can overwrite your catalog.
Public users can submit suggestions via POST /api/suggestions. Suggestions:
api.devtools table automaticallyThis keeps the public endpoint safe while still allowing community input.
GET /api/devtoolsReturns the list of tools from Supabase (api.devtools).
POST /api/suggestionsPublic endpoint to suggest a new tool. Payload example:
{
"name": "Postman",
"description": "API platform for building and testing APIs",
"details": "Useful for REST testing, collections, and collaboration.",
"category": "DevTool",
"url": "https://www.postman.com/",
"tags": ["api", "testing"]
}
Notes:
url is optionalcategory must be one of: IA, DevTool, Docs, Library, Toolhttp/https URLs are acceptedGET /api/tools (legacy)Backwards-compatible alias for fetching tools. It is now read-only.
This repo includes a migration:
supabase/migrations/20260317100000_init_api_devtools.sqlIt creates:
apiapi.devtools (UUID primary key, category constraint, basic URL constraint)api schema in SupabaseBecause the table is in a non-default schema, you must ensure the schema is exposed by Supabase:
apiIf you don’t expose it, queries to schema('api').from('devtools') will fail.
Create .env.local (do not commit secrets):
# Supabase
SUPABASE_API_URL="https://<project>.supabase.co"
SUPABASE_ANON_KEY="<anon-key>"
# Required for server-side inserts (used by /api/admin/devtools and /newdevtool)
SUPABASE_SERVICE_ROLE_KEY="<service-role-key>"
ADMIN_PASSWORD="<your-admin-password>"
# Web3Forms (suggestion emails; used server-side)
WEB3FORMS_API_KEY="<web3forms-api-key>"
SUGGESTIONS_TO_EMAIL="[email protected]"
JWT note: Supabase access tokens are JWTs. If you later add admin-only endpoints, you can verify Supabase JWTs server-side (e.g., to restrict catalog writes to your admin user). This project currently relies on RLS to prevent public writes.
GitHub Pages is static hosting, so this project is configured as a SPA:
src/routes/+layout.ts404.html fallback: svelte.config.jsmain branchPUBLIC_SUPABASE_API_URLPUBLIC_SUPABASE_ANON_KEYPUBLIC_WEB3FORMS_API_KEYPUBLIC_ADMIN_EMAIL (optional)main → the workflow deploys automatically:.github/workflows/deploy.yml/newdevtool inserts directly into Supabase and relies on Supabase Auth + RLS. You must create a Supabase Auth user with the admin email and sign in there.src/routes/api/* won’t run on GitHub Pages. For suggestions, the UI uses PUBLIC_WEB3FORMS_API_KEY to submit directly to Web3Forms.npm install
npm run dev
Other scripts:
npm run build
npm run preview
npm run check
POST /api/suggestions validates and normalizes inputhttp/https URLs