Skip to main content

Build production-ready backends faster

A batteries-included Hono 4 monorepo template with authentication, database migrations, observability, and TypeScript throughout.

Quick Start

Get your backend running in minutes

1

Clone the repository

Clone the BE Monorepo template to your local machine.
git clone https://github.com/rifandani/be-monorepo.git
cd be-monorepo
2

Install dependencies

Install all dependencies using Bun package manager.
bun install
This template requires Bun 1.3.10 or later and Node.js 24.14.0 or later.
3

Configure environment variables

Copy the example environment files and configure your local development settings.
cp apps/hono/.env.example apps/hono/.env.dev
Update the .env.dev file with your database credentials and other configuration values.
4

Run database migrations

Set up your PostgreSQL database and run migrations.
bun hono db:push
5

Start the development server

Launch the Hono backend server with hot reload.
bun hono dev
Your API is now running at http://localhost:3333. Visit http://localhost:3333/openapi/docs to explore the API documentation.

Key Features

Everything you need to build production-grade backends

Hono 4 Framework

Lightning-fast web framework with OpenAPI documentation built-in

Better Auth

Modern authentication system with session management and user roles

Drizzle ORM

Type-safe database queries with PostgreSQL and migration support

OpenTelemetry

Full observability stack with traces, metrics, logs, and profiling

Monorepo Structure

Organized workspace with shared packages and clear separation

TypeScript

Strict typing throughout for better developer experience

Explore by Topic

Deep dive into specific areas

Core Concepts

Learn about the monorepo architecture and TypeScript configuration

Database

Schema design, migrations, and ORM usage patterns

Authentication

User management, sessions, and security best practices

Observability

Logging, tracing, metrics, and Grafana dashboards

Development

Scripts, testing, and dependency management workflows

Deployment

Docker configuration, production builds, and CI/CD pipelines

Ready to build?

Start with the quickstart guide to get your backend up and running, or explore the API reference to understand the full capabilities.