Honotan is a lightweight monorepo starter combining Hono for building HTTP APIs and TanStack Start for the web client. It uses Bun as the primary runtime/dependency manager while keeping some tooling compatibilities with Node/PNPM for subpackages.
This README documents how to get the repo running locally, explains the project layout, and lists common developer workflows.
packages/api— Hono-based API server with Drizzle ORM, Redis/BullMQ task queue, and utilities.packages/web— TanStack Startindex.ts— (top-level) lightweight entry used for quick experiment runs with Bun.
Other notable files:
packages/api/src— server source, controllers, services, tasks, and database schema (packages/api/schema).packages/api/static/openapi.yaml— OpenAPI specification used by Swagger UI (served by the API).
This project is developed with Bun as the primary runtime. On macOS (zsh) install Bun first:
curl -fsSL https://bun.sh/install | bashOptional (used by packages/api):
- Docker & Docker Compose — for running infra (Postgres, Redis) via
npm run infra:upinsidepackages/api. - PNPM —
packages/apiusespnpmin its package metadata but Bun can be used to install workspace deps.
Verify Bun is installed:
bun -vAt the repository root (preferred for Bun workspaces):
bun installThis will install dependencies for the workspace (both packages/api and packages/web) according to the top-level package.json workspaces setting.
If you prefer using PNPM inside packages/api (because of drizzle-kit and packageManager), you can run:
cd packages/api
pnpm installThere are convenient top-level scripts to start the API and web concurrently in separate terminals.
Start the API (runs Hono with hot reload and pretty logging):
bun run apiStart the web client (vite server):
bun run webYou can run both in separate terminal tabs/windows.
From packages/api you have additional scripts. Examples:
- Start dev server (hot reload):
bun run dev- Database migrations and generation (Drizzle):
bun run db:generate
bun run db:migrate
bun run db:drop- Development infra with Docker Compose (starts Postgres + Redis + app profiles):
bun run infra:up
bun run infra:logs
bun run infra:downNotes:
packages/apilistspackageManager: [email protected]in itspackage.json. Bun works for workspace installs but some CI or maintainers may prefer PNPM for consistent lockfiles.- The API runs on Bun (Hono) and uses Drizzle ORM, BullMQ for background tasks, Redis for queueing, and Postgres as the primary datastore.
From packages/web:
- Start dev server:
bun run dev- Build for production:
bun run build
bun run startThe web app uses Tanstack Start. It relies on modern Bun-compatible tooling but keeps package.json compatible with Node-style installs.
- Check
packages/api/.env.exampleor the.envfile inpackages/api(if present) for required environment variables (database DSN, Redis URL, JWT secrets, etc.). - OpenAPI spec is available at
packages/api/static/openapi.yamland the API exposes a Swagger UI integration.
There are no test runners configured at the top-level by default. If you add tests, consider using Bun's test runner or a framework of your choice (Vitest / Jest) and add scripts to the relevant package.json.
Prettier is included in packages/api devDependencies. Add project-level ESLint or Prettier configs if you want enforced formatting across workspaces.
This repo does not include a full deployment pipeline. Typical steps:
- Build the web client:
packages/web=>bun run build. - Build the API: compile TypeScript or run via Bun in production mode.
- Run infrastructure (Postgres, Redis) using managed services or Docker Compose in production-like environments.
Examples using Docker Compose (API):
cd packages/api
bun run infra:up- Install deps:
bun install - Run API dev:
bun run apiorcd packages/api && bun run dev - Run Web dev:
bun run weborcd packages/web && bun run dev - Generate/migrate DB (api):
cd packages/api && bun run db:generate && bun run db:migrate - Bring infra up (api):
cd packages/api && bun run infra:up
Contributions are welcome. A suggested workflow:
- Fork the repo and create a feature branch.
- Keep changes small and focused; update or add tests where applicable.
- Open a pull request describing what changed and why.
Please follow repository code style and keep the workspace dependency handling predictable. If you add new workspace packages, update the top-level package.json workspaces array.
This project includes a LICENSE file in the repository root. Keep license headers and respect contributor license terms.
- Add environment examples (
.env.example) forpackages/apito help new contributors. - Add a small
Makefileor dev script to run API + Web concurrently. - Add automated tests and CI configuration (GitHub Actions) for linting, build, and tests.
If you'd like, I can also:
- add a
packages/api/.env.examplewith common variables, - create a small
devscript to run both servers concurrently, - or generate a GitHub Actions workflow template for CI.
To install dependencies:
bun installTo run:
bun run index.tsThis project was created using bun init in bun v1.1.29. Bun is a fast all-in-one JavaScript runtime.
This repo is boilerplate for tanstack start and hono. using bun as package manager and monorepo manager.