https://github.com/karimramadan/hono-better-auth
An implementation of Better Auth using a Hono backend, Postgres, and Drizzle ORM. Starts with email and password authentication and includes protected routes for managing posts.
https://github.com/karimramadan/hono-better-auth
better-auth bun drizzle-orm hono
Last synced: 2 months ago
JSON representation
An implementation of Better Auth using a Hono backend, Postgres, and Drizzle ORM. Starts with email and password authentication and includes protected routes for managing posts.
- Host: GitHub
- URL: https://github.com/karimramadan/hono-better-auth
- Owner: karimramadan
- License: mit
- Created: 2025-08-02T19:54:05.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-02T20:21:39.000Z (11 months ago)
- Last Synced: 2025-08-02T22:19:25.528Z (11 months ago)
- Topics: better-auth, bun, drizzle-orm, hono
- Language: TypeScript
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Better Auth with Hono, Drizzle, and Postgres
An implementation of [Better Auth](https://www.better-auth.com) using a Hono backend, Postgres, and Drizzle ORM. Starts with email and password authentication and includes protected routes for managing posts.
## Features
- Email & password authentication
- Hono backend
- PostgreSQL + Drizzle ORM
- Protected `posts` routes
- Minimal, extensible foundation for modern auth
## Tech Stack
- [Bun](https://bun.com/) – an all-in-one JavaScript runtime
- [Hono](https://hono.dev) – ultra-fast web framework
- [Drizzle ORM](https://orm.drizzle.team) – type-safe SQL
- [Better Auth](https://www.better-auth.com) – a comprehensive authentication framework for TypeScript
- PostgreSQL – relational database
## Getting Started
```sh
# Clone the repo
git clone https://github.com/karimramadan/hono-better-auth
cd hono-better-auth
# Install dependencies
bun install
# Create a local db using docker
bun run db:up
# Set up env
cp .env.example .env
# Run generate
bun run db:generate
# Run migrate
bun run db:migrate
# Start dev server
bun run dev
```
open http://localhost:3000