Skip to content

Repository files navigation

Vite + Hono Starter

A full-stack starter template built with modern tools.

Tech Stack

Layer Technology
Runtime Bun
Monorepo Turborepo
Frontend React 19, Vite, TanStack Router (file-based), TanStack Query
UI shadcn/ui, Radix UI, Tailwind CSS v4, HugeIcons
Backend Hono, Pino (structured logging)
Auth Better Auth (email/password, OAuth-ready)
Database PostgreSQL, Drizzle ORM

Project Structure

├── apps/
│   ├── client/          # React frontend (Vite)
│   └── server/          # Hono API server (Bun)
├── packages/
│   └── config/          # Shared ESLint, Prettier, TypeScript config
├── turbo.json           # Turborepo pipeline
└── package.json         # Workspace root

Getting Started

Prerequisites

Setup

  1. Install dependencies:

    bun install
  2. Configure environment variables:

    cp apps/server/.env.example apps/server/.env
    cp apps/client/.env.example apps/client/.env

    Generate a secret for Better Auth:

    openssl rand -hex 32
  3. Create the database and run migrations:

    # Create your PostgreSQL database first, then:
    bun run db:generate
    bun run db:migrate
  4. Start development:

    bun run dev

What's Included

  • Auth flow - Login, signup, session management, logout with protected route guards
  • App shell - Collapsible sidebar, theme toggle (light/dark), user dropdown menu
  • Database - Drizzle ORM with PostgreSQL, migration workflow
  • Logging - Structured Pino logging with request IDs
  • Health check - /health endpoint with DB connectivity check
  • Code quality - ESLint, Prettier, TypeScript strict mode

Scripts

Script Description
bun run dev Start all apps in development mode
bun run build Build all apps
bun run lint Lint all apps
bun run format Format all files with Prettier
bun run db:generate Generate Drizzle migrations
bun run db:migrate Run database migrations
bun run db:studio Open Drizzle Studio

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages