@nooh-ts/nooh 0.1.0 β†’ 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/readme.md +102 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nooh-ts/nooh",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "🧊 A zero-dependency, compile-time metaframework for building type-safe file-based Hono APIs.",
5
5
  "keywords": [
6
6
  "nooh",
package/readme.md CHANGED
@@ -0,0 +1,102 @@
1
+ <p align="center">
2
+ <img src="https://github.com/nehu3n/nooh/blob/main/.github/assets/nooh-banner.webp" alt="Nooh" width="750" />
3
+ </p>
4
+
5
+ <p align="center">
6
+ <strong>🧊 A zero-dependency, compile-time metaframework for building type-safe file-based Hono APIs.</strong>
7
+ </p>
8
+
9
+ <p align="center">
10
+ <a href="https://nooh-ts.pages.dev">Documentation</a>
11
+ Β·
12
+ <a href="https://github.com/nehu3n/nooh">GitHub</a>
13
+ Β·
14
+ <a href="https://www.npmjs.com/package/@nooh-ts/nooh">npm</a>
15
+ </p>
16
+
17
+ <p align="center">
18
+ <img src="https://img.shields.io/npm/v/%40nooh-ts%2Fnooh?style=flat-square" alt="npm version" />
19
+ <img src="https://img.shields.io/github/license/nehu3n/nooh?style=flat-square" alt="License" />
20
+ </p>
21
+
22
+ ## Why Nooh
23
+
24
+ [**Hono**](https://hono.dev) is a great backend frameworkβ€”fast, lightweight, and runtime-agnostic. But as an application grows, organizing routes, middleware, validation, and project structure is largely left to the developer.
25
+
26
+ **Nooh** adds a filesystem-first development model on top of Hono. Your files define the structure of your API, while a fast compiler generates the typed route functions and native Hono application behind them.
27
+
28
+ Everything is compiled ahead of runtime. The Hono ecosystem works exactly as it always has, and your entry point remains runtime-agnostic.
29
+
30
+ ## Get started
31
+
32
+ The fastest way to start is with the official project template:
33
+
34
+ ```bash
35
+ pnpm create @nooh-ts/template
36
+ ```
37
+
38
+ Follow the interactive setup and start building immediately.
39
+
40
+ For a manual setup:
41
+
42
+ ```bash
43
+ pnpm add @nooh-ts/nooh hono @hono/standard-validator
44
+ pnpm add -D @nooh-ts/cli
45
+ ```
46
+
47
+ Then create your project around a filesystem-based route tree:
48
+
49
+ ```text
50
+ nooh.config.ts
51
+ src/
52
+ β”œβ”€β”€ index.ts
53
+ β”œβ”€β”€ middleware/
54
+ β”‚ └── logger.ts
55
+ └── routes/
56
+ β”œβ”€β”€ index.get.ts
57
+ └── users/
58
+ β”œβ”€β”€ [id].post.ts
59
+ └── index.get.ts
60
+ ```
61
+
62
+ A route is just a file:
63
+
64
+ ```ts
65
+ import { get } from "@router/users/[id]";
66
+
67
+ export default get((c) => {
68
+ const id = c.req.param("id");
69
+
70
+ return c.json({ id });
71
+ });
72
+ ```
73
+
74
+ Which becomes:
75
+
76
+ ```text
77
+ GET /users/:id
78
+ ```
79
+
80
+ Then build your application:
81
+
82
+ ```bash
83
+ nooh build
84
+ ```
85
+
86
+ Nooh generates a native Hono application in `.nooh/`, which you can use from your normal Hono entry point.
87
+
88
+ ```ts
89
+ import app from "../.nooh/app";
90
+
91
+ export default app;
92
+ ```
93
+
94
+ ## Documentation
95
+
96
+ The full documentation covers routing, groups, middleware, validation, the CLI, compiler architecture, and build-tool integrations.
97
+
98
+ **[Read the documentation β†’](https://nooh-ts.pages.dev)**
99
+
100
+ ## License
101
+
102
+ This project is licensed under the [MIT License](https://github.com/nehu3n/nooh/blob/main/license).