{"id":27816944,"url":"https://github.com/alwaysnomads/better-hono","last_synced_at":"2026-01-19T21:50:38.659Z","repository":{"id":290267749,"uuid":"973870435","full_name":"alwaysnomads/better-hono","owner":"alwaysnomads","description":"Minimal starter template using Hono, Better-Auth, Drizzle ORM, and Cloudflare Workers — powered by Bun.","archived":false,"fork":false,"pushed_at":"2025-05-09T07:25:07.000Z","size":30,"stargazers_count":226,"open_issues_count":1,"forks_count":12,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-09T08:33:20.307Z","etag":null,"topics":["better-auth","cloudflare-workers","drizzle-orm","honojs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alwaysnomads.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-27T22:45:52.000Z","updated_at":"2025-05-09T07:25:10.000Z","dependencies_parsed_at":"2025-05-01T14:37:12.100Z","dependency_job_id":null,"html_url":"https://github.com/alwaysnomads/better-hono","commit_stats":null,"previous_names":["alwaysnomads/better-hono"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/alwaysnomads/better-hono","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alwaysnomads%2Fbetter-hono","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alwaysnomads%2Fbetter-hono/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alwaysnomads%2Fbetter-hono/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alwaysnomads%2Fbetter-hono/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alwaysnomads","download_url":"https://codeload.github.com/alwaysnomads/better-hono/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alwaysnomads%2Fbetter-hono/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28579092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T17:42:58.221Z","status":"ssl_error","status_checked_at":"2026-01-19T17:40:54.158Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["better-auth","cloudflare-workers","drizzle-orm","honojs"],"created_at":"2025-05-01T14:25:55.497Z","updated_at":"2026-01-19T21:50:38.654Z","avatar_url":"https://github.com/alwaysnomads.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Better-Hono\n\n### Hono + Better-Auth + Drizzle + Cloudflare Workers\n\nA minimal template to kickstart projects with:\n\n- **Hono** – Fast web framework\n- **Better Auth** – Authentication system\n- **Drizzle ORM** – Database management\n- **Cloudflare Workers** – Edge deployment\n- **Bun** – Fast JavaScript runtime\n- **Docker** – Local database development\n\nClean setup for authentication, database, and deployment.\n\n\n## Getting Started\n\n1. **Clone the repository:**\n\n```bash\ngit clone https://github.com/alwaysnomads/better-hono.git\ncd better-hono\n```\n\n2. **Install dependencies:**\n\n```bash\nbun install\n```\n\n3. **Setup your environment:**\n\n```bash\n# Copy the example environment file into .env and .dev.vars\ncp .env.example .env .dev.vars\n```\n\n- **.env**: Used by your application (e.g., in Drizzle).\n- **.dev.vars**: Used by Wrangler when running the local server.\n\n\u003e Edit both files with your environment variables.\n\n4. **Start the database (if needed):**\n\n```bash\n# Start the local Postgres database with Docker\nbun run docker:up\n```\n\n\u003e Or connect to a cloud database like [Neon](https://neon.tech/).  \n\u003e Make sure your `.env` and `.dev.vars` point to the correct database URL.\n\n5. **Push database schema and generate types:**\n\n```bash\nbun run db:push\nbun run db:generate\n```\n\n6. **Start the development server:**\n\n```bash\nbun run dev\n```\n\n\u003e The development server runs on port **3000** by default for easier integration with Better-Auth, you can change it at the wrangler.jsonc file.\n\u003e OpenAPI documentation for Better-Auth is available at [http://localhost:3000/api/auth/reference](http://localhost:3000/api/auth/reference).  \n\u003e You can remove the OpenAPI plugin if not needed by editing `src/lib/auth.ts`.\n\n\n## Thanks to w3cj!\n\nThis template is heavily inspired by [w3cj's hono-open-api-starter](https://github.com/w3cj/hono-open-api-starter), even using parts of their code. Make sure to check out their repository!\n\n\n## Available Commands\n\n| Command               | Description                          |\n| --------------------- | ------------------------------------ |\n| `bun run dev`          | Start local server (Wrangler)        |\n| `bun run deploy`       | Deploy to Cloudflare                 |\n| `bun run cf-typegen`   | Generate Cloudflare types            |\n| `bun run docker:up`    | Start Docker containers              |\n| `bun run docker:down`  | Stop Docker containers               |\n| `bun run docker:clean` | Stop and remove containers + volumes |\n| `bun run db:push`      | Push schema to database              |\n| `bun run db:generate`  | Generate Drizzle ORM types           |\n| `bun run db:migrate`   | Run database migrations              |\n| `bun run db:studio`    | Open Drizzle Studio GUI              |\n\n## Configure template\n\n### Adding New Bindings\n\nTo add Cloudflare bindings (e.g., R2 buckets, KV stores), update the bindings types at `src/lib/types.ts`\n\n\n### Configure Auth\n\nThis template comes with Google social login preconfigured for example purposes.  \nYou can easily change or extend it in `src/lib/auth.ts`.\n\n\n## License\n\nReleased under the [MIT License](LICENSE).\n\n---\n\n✅ Built with **Bun**  \n✅ Powered by **Cloudflare Workers**  \n✅ Local database ready with **Docker**\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falwaysnomads%2Fbetter-hono","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falwaysnomads%2Fbetter-hono","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falwaysnomads%2Fbetter-hono/lists"}