Easily create scalable, monetisable backend APIs with Hono + Cloudflare workers
Why? While buildling supermemory, markdowner, reranker, i found myself solving all the same problems again and again - there's a lot of starter kits for frontend / full stack stuff, but almost none if you just want to build and monetise a small API.
git clone https://github.com/dhravya/backend-api-kit.git cd backend-api-kit npm i -g bun bun install
The setup script will:
wrangler.jsonc
.dev.vars
See guide for setting up lemonsqueezy
How to make changes to database schema
If the quick setup script fails, you can manually set up the database and environment variables.
Start the development server:
Now, write your business logic inside api
Congrats! You're all set for shipping your backend API!
git clone https://github.com/dhravya/backend-api-kit.git cd backend-api-kit npm i -g bun bun install
bunx wrangler d1 create <your-database-name>
wrangler.jsonc
with your database configuration.dev.vars.example
to .dev.vars
AUTH_GITHUB_ID
and AUTH_GITHUB_SECRET
: GitHub OAuth credentialsBETTER_AUTH_URL
: Your auth URL (default: http://localhost:8787)SECRET
: A secure random stringLEMONSQUEEZY_CHECKOUT_LINK
: Your Lemonsqueezy checkout linkbunx drizzle-kit generate --name setup bunx wrangler d1 migrations apply <your-database-name> bunx wrangler d1 migrations apply <your-database-name> --remote
This project is open-sourced under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a PR.
These are some things that contributions would be helpful for:
This project is built thanks to these open source projects 🙏:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4