vercel-hobby-limitslisted
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