GitHub - shedtheshade/hotdog: Web Framework for Performance and Thrill built on Bun

1 min read Original article ↗

hotdog

Hotdog is evolving into a Bun-native middleware framework with structured routing, lifecycle hooks, and native WebSocket support.

Getting started

Install dependencies (Bun is required):

Start the development server:

Project structure (work in progress)

  • index.ts – primary entry point that boots the Bun server.
  • src/types.ts – shared context, middleware, lifecycle, and WebSocket primitives.
  • src/server/ – orchestration for Bun.serve, lifecycle hooks, and environment wiring.
  • src/router/ – route builders, mountable routers, and WebSocket-aware handlers.
  • src/middleware/ – reusable middleware (logging, validation, parsing, security, etc.).
  • vite.config.ts (future) – Vite helper that proxies /api and /ws to the Bun runtime for HMR/WebSocket support.
  • public/index.html – static landing page that Bun serves when staticDir points at the public folder.

Next steps

  1. Flesh out the middleware pipeline and router APIs so routes can register before/after hooks.
  2. Wire up index.ts to compose middleware, routers, and lifecycle hooks for HTTP and WebSocket requests.
  3. Add a Vite dev workflow that proxies WebSocket and API traffic while keeping Bun as the runtime for backend logic.