Skip to content

nicksp/rest-api-starter

Repository files navigation

Hono OpenAPI Starter Template

This is a starter template for building production-grade applications using Hono, OpenAPI, and Drizzle.

Features

  • Structured logging
  • Documented type-safe routes
  • Interactive API documentation
  • Docker setup
  • Type-safe schemas and environment variables
  • Single source of truth database schemas
  • Database migrations and seeders
  • Testing
  • Linting and formatting rules
  • Health checks
  • CI/CD pipeline
  • Metrics
  • Error tracking
  • Debugging

Tech Stack

  • Node.js
  • Hono
  • Drizzle
  • Postgres
  • TypeScript
  • Docker
  • Scalar
  • pino
  • zod
  • Vitest
  • Prometheus
  • Grafana
  • Dozzle

Getting Started

Create .env file:

cp .env.example .env

Install dependencies:

pnpm install

Run DB server and push the schema:

pnpm dev:docker
pnpm db:push

Running Locally

Run the app:

pnpm dev

You can now access API documentation at http://localhost:4000/reference.

Releases

No releases published

Packages

No packages published