← ClaudeAtlas

vercel-hobby-limitslisted

Survive Vercel's free-tier walls without upgrading — the 12-serverless-function cap and the router consolidation that answers it, the 4.5 MB response cap, filesystem-resolved-before-rewrites, query-string merging on rewrites, immutable asset caching, and env vars that read back empty. Use when a deploy fails with a function-count error, when a rewrite "does nothing", when a form silently falls through to the wrong handler, when a large file returns FUNCTION_PAYLOAD_TOO_LARGE, when assets serve stale after a deploy, or before adding any new endpoint to a Hobby-plan project. Also use when planning an architecture that will run on Hobby.
hellokianben-collab/vishal-agarwal-context · ★ 0 · AI & Automation · score 60
Install: claude install-skill hellokianben-collab/vishal-agarwal-context
# Living inside Vercel's Hobby limits Every project in this environment is on **Hobby**. Upgrading is the owner's paid decision, so the answers here are architectural. --- ## 1. The 12-function cap ``` No more than 12 Serverless Functions can be added to a Deployment on the Hobby plan ``` Vercel builds **one function per file under `api/`**. The error appears at **deploy time**, not while coding — so it lands exactly when you are trying to ship. ### The router pattern Real handlers live in `lib/routes/` (one file per job, logic unchanged). `api/` holds a handful of **thin routers** that dispatch on a `?do=` query parameter. ``` api/admin.js → lib/routes/{admin-page, admin-login, admin-view, order-stats, bkash-status} api/book.js → lib/routes/{read, book-file, book-download, book-track, resend-book} api/order.js → lib/routes/{order-config, order-create, bkash-callback} api/forms.js → lib/routes/{waitlist, contact, consult, track} ``` **Every original public URL is preserved by a rewrite in `vercel.json`.** Bookmarks, curl scripts, and — critically — the callback URL already registered with a payment gateway all keep working. POST survives a rewrite intact. Result on a real project: **16 functions → 4 routers**, no public URL changed. **Rules when adding an endpoint:** 1. Write it in `lib/routes/`. 2. Add one line to the right router. 3. Add one rewrite. 4. **Check `ls api | wc -l` before ever adding a bare file to `api/`.** Handlers in `lib/routes/` requi