Skip to content

Commit 785717c

Browse files
committed
update README with warnings, quick start guide, API reference, and development goals
1 parent 242bead commit 785717c

File tree

1 file changed

+127
-1
lines changed

1 file changed

+127
-1
lines changed

README.md

Lines changed: 127 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44

55
A TypeScript-based decorator-driven routing solution for Hono.js, inspired by `routing-controllers`, featuring dependency injection and middleware support.
66

7+
> **Warning**
8+
> ⚠️ This project is currently under active development and **not production-ready**.
9+
> Expect breaking changes and missing features. Use at your own risk!
10+
11+
---
12+
13+
## 🚨 Important Notice
14+
15+
**This is experimental software** - not recommended for production use.
16+
Current status: **Proof of Concept** stage. Core functionality is being validated.
17+
718
## Features
819

920
- 🎯 Decorator-based route definitions (`@Controller`, `@Get`, `@Post`, etc.)
@@ -15,4 +26,119 @@ A TypeScript-based decorator-driven routing solution for Hono.js, inspired by `r
1526
## Installation
1627

1728
```bash
18-
npm install hono-routing-controllers
29+
npm install hono-routing-controllers
30+
```
31+
32+
# 🚀 Quick Start
33+
34+
### 1. Create Controller
35+
36+
```typescript
37+
import { Controller, Get } from 'hono-routing-controllers';
38+
import { Context } from 'hono';
39+
40+
@Controller('/users')
41+
export class UserController {
42+
@Get('/')
43+
findAll(c: Context) {
44+
return c.json([{ id: 1, name: 'John' }]);
45+
}
46+
}
47+
```
48+
49+
### 2. Initialize
50+
51+
```typescript
52+
import { Hono } from 'hono';
53+
import { useRoutingController } from 'hono-routing-controllers';
54+
import { UserController } from './controllers/UserController';
55+
56+
const app = new Hono();
57+
58+
useRoutingController(app, {
59+
controllers: [UserController]
60+
});
61+
62+
app.listen(3000, () => {
63+
console.log('Server running on http://localhost:3000');
64+
});
65+
```
66+
67+
## 📚 API Reference
68+
### 🎨 Decorators
69+
70+
| Decorator | Parameters | Description |
71+
|-------------|------------------|------------------------|
72+
| @Controller | path: string | Class route prefix |
73+
| @Get | path: string | GET route handler |
74+
| @Post | path: string | POST route handler |
75+
| @Put | path: string | PUT route handler |
76+
| @Delete | path: string | DELETE route handler |
77+
| @UseBefore | ...middlewares | Apply middleware(s) |
78+
79+
### ⚙ Configuration
80+
81+
```typescript
82+
useRoutingController(
83+
app: Hono,
84+
options: {
85+
controllers: Array<new () => any>
86+
}
87+
)
88+
```
89+
90+
### � Development
91+
92+
```bash
93+
npm run dev
94+
npm run build
95+
npm run test
96+
```
97+
98+
## 🛑 Current Limitations
99+
- ❌ Missing comprehensive test coverage
100+
- ❌ API surface may change dramatically
101+
- ❌ Documentation is incomplete
102+
- ❌ Not security audited
103+
- ❌ Performance not optimized
104+
105+
## 🧪 Development Goals
106+
| Status | Feature |
107+
|--------|--------------------------|
108+
| ✅ Done | Basic routing |
109+
| 🟡 Partial | Middleware support |
110+
| 🚧 WIP | Dependency injection |
111+
| ❌ Todo | Error handling |
112+
| ❌ Todo | Validation decorators |
113+
114+
# 🤝 Contributing
115+
### Fork the repository
116+
117+
1. Create your feature branch:
118+
```bash
119+
git checkout -b feature/AmazingFeature
120+
```
121+
122+
2. Commit your changes:
123+
```bash
124+
git commit -m 'Add some AmazingFeature'
125+
```
126+
127+
3. Push to the branch:
128+
```bash
129+
git push origin feature/AmazingFeature
130+
```
131+
132+
4. Open a Pull Request
133+
134+
## 📅 Roadmap
135+
- Stable core API
136+
- Full test coverage
137+
- Production readiness
138+
139+
> **Experimental Use Only**
140+
> This package is shared for early feedback and collaborative development.
141+
> Not suitable for mission-critical applications. Breaking changes may occur without notice.
142+
143+
# 📄 License
144+
MIT © Hasibur Rahman

0 commit comments

Comments
 (0)