honestjs/honest
honestjs/honest has 105 GitHub stars and 6 forks. GitHot measured 0 stars in 24 hours, -1 in 7 days, and -1 in 15 days. Last checked 2026-11-17 02:49 UTC. Last push 2026-05-07.
What you can do
- π High performance β Built on Hono for maximum speed and minimal overhead.
- ποΈ Familiar architecture β Decorator-based API inspired by NestJS; TypeScript-first.
- π Dependency injection β Built-in DI container for clean, testable code and automatic wiring.
- π Plugin system β Extend the app with custom plugins, middleware, pipes, and filters. Plugins run in options.plugins order; wrapped entries may attach preProcessors / postProcessors and optional name for diagnostics.
Measured star growth
- in 24h
- 0
- in 7 days
- -1
- in 15 days
- -1
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
About
HonestJS - a modern web framework built on top of Hono
Web & AppsREADME.md
OriginalA modern, TypeScript-first web framework built on top of Hono, designed for building scalable and maintainable web applications. Honest combines the elegance and architecture of Nest with the ultra-fast performance of Hono, giving you the best of both worlds.
middleware | guards | pipes | filters
Cursor / Agent skills
Install the Honest skill so your editor agent (e.g. Cursor) can use Honest-specific guidance:
bunx skills add https://github.com/honestjs/skills --skill honest
See honestjs/skills for details.
π¨ Early Development Warning π¨
Honest is currently in early development (pre-v1.0.0). Please be aware that:
- The API is not stable and may change frequently
- Breaking changes can occur between minor versions
- Some features might be incomplete or missing
- Documentation may not always be up to date
We recommend not using it in production until v1.0.0 is released.
β οΈ Documentation is not yet complete β οΈ
If you find any issues or have suggestions for improvements, please open an issue or submit a pull request. See CONTRIBUTING.md for how to contribute and CODE_OF_CONDUCT.md for community guidelines.
Quick Start
bun add -g @honestjs/cli
honestjs new my-project # alias: honest, hnjs; interactive template picker
cd my-project
bun dev
Templates: blank (minimal), barebone (modules + services β best for APIs), mvc (full-stack with Hono JSX
views). Use -t barebone -y to skip prompts.
See Getting Started on honestjs.dev for the full tutorial, and FAQ / Troubleshooting for common questions and edge cases.
Features
- π High performance β Built on Hono for maximum speed and minimal overhead.
- ποΈ Familiar architecture β Decorator-based API inspired by NestJS; TypeScript-first.
- π Dependency injection β Built-in DI container for clean, testable code and automatic wiring.
- π Plugin system β Extend the app with custom plugins, middleware, pipes, and filters. Plugins run in
options.pluginsorder; wrapped entries may attachpreProcessors/postProcessorsand optionalnamefor diagnostics. - π£οΈ Advanced routing β Prefixes, API versioning, and nested route organization.
- π‘οΈ Request pipeline β Middleware, guards, pipes, and filters at app, controller, or handler level.
- π§ͺ Lightweight testing harness β Helpers for application, controller, and service-level tests.
- π§ Startup guide mode β Actionable diagnostics hints for startup failures.
- π TypeScript-first β Strong typing and great IDE support out of the box.
- π₯οΈ MVC & SSR β Full-stack apps with Hono JSX views; use the
mvctemplate or the docs.
In code
import 'reflect-metadata'
import { Application, Controller, Get, Module, Service } from 'honestjs'
import { LoggerMiddleware } from '@honestjs/middleware'
import { AuthGuard } from '@honestjs/guards'
import { ValidationPipe } from '@honestjs/pipes'
import { HttpExceptionFilter } from '@honestjs/filters'
import { ApiDocsPlugin } from '@honestjs/api-docs-plugin'
@Service()
class AppService {
hello(): string {
return 'Hello, Honest!'
}
}
@Controller()
class AppController {
constructor(private readonly appService: AppService) {}
@Get()
hello() {
return this.appService.hello()
}
}
@Module({
controllers: [AppController],
services: [AppService]
})
class AppModule {}
const { app, hono } = await Application.create(AppModule, {
startupGuide: { verbose: true },
debug: {
routes: true,
plugins: true,
pipeline: true,
di: true,
startup: true
},
logger: myLogger,
strict: { requireRoutes: true },
deprecations: { printPreV1Warning: true },
container: myContainer,
hono: {
strict: true,
router: customRouter
},
routing: {
prefix: 'api',
version: 1
},
// Components: use class (e.g. AuthGuard) or instance (e.g. new LoggerMiddleware()) to pass options
components: {
middleware: [new LoggerMiddleware()],
guards: [AuthGuard],
pipes: [ValidationPipe],
filters: [HttpExceptionFilter]
},
plugins: [
new RPCPlugin(),
new ApiDocsPlugin(),
{
plugin: MyPlugin,
name: 'core',
preProcessors: [pre],
postProcessors: [post]
},
{ plugin: MetricsPlugin, name: 'metrics' }
],
onError: (err, c) => c.json({ error: err.message }, 500),
notFound: (c) => c.json({ error: 'Not found' }, 404)
})
export default hono
Controllers, services, and modules are wired by decorators; use guards for auth, pipes for validation, and filters for error handling. See the documentation for details.
Runtime Metadata Isolation
Decorator metadata is still collected globally, but each application instance now runs on an immutable metadata snapshot captured during startup. This prevents metadata mutations made after bootstrap from changing behavior in already-running applications.
Plugin order
Plugins run in the order they appear in options.plugins. Put producer plugins (for example RPC) before consumers (for
example API docs) when one plugin depends on anotherβs app-context output.
Testing harness
Honest exports lightweight helpers for common test setups.
import { createControllerTestApplication, createServiceTestContainer, createTestApplication } from 'honestjs'
const app = await createTestApplication({
controllers: [UsersController],
services: [UsersService]
})
const response = await app.request('/users')
const controllerApp = await createControllerTestApplication({
controller: UsersController
})
const services = createServiceTestContainer({
preload: [UsersService],
overrides: [{ provide: UsersService, useValue: mockUsersService }]
})
Running tests in this package
This repo uses Bun's test runner. From the package root:
bun testβ run all tests oncebun test --watchβ watch modebun test <pattern>β limit to matching file or test names (for examplebun test application.bootstrap)bun run test:coverageβ same suite with coverage (summary in the terminal andcoverage/lcov.info)
Co-locate tests as *.test.ts next to sources. Import reflect-metadata first in any file that loads decorated
classes, same as in application code.
Integration-style cases use *.integration.test.ts where the whole Application stack is exercised (for example the
request pipeline). Shared HTTP fixtures for application tests live under src/testing/fixtures/ as factory
functions so each test gets fresh decorator metadata after MetadataRegistry.clear() in afterEach.
Startup diagnostics guide mode
Enable startup guidance to get actionable remediation hints when initialization fails.
await Application.create(AppModule, {
startupGuide: true
})
await Application.create(AppModule, {
startupGuide: { verbose: true }
})
Guide mode emits startup diagnostics hints for common issues such as missing decorators, strict no-routes startup, and metadata issues.
License
MIT Β© Orkhan Karimov
