@venizia/ignis-docs 0.0.3 → 0.0.4-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.
- package/README.md +1 -1
- package/package.json +4 -2
- package/wiki/best-practices/api-usage-examples.md +591 -0
- package/wiki/best-practices/architectural-patterns.md +415 -0
- package/wiki/best-practices/architecture-decisions.md +488 -0
- package/wiki/{get-started/best-practices → best-practices}/code-style-standards.md +406 -17
- package/wiki/{get-started/best-practices → best-practices}/common-pitfalls.md +109 -4
- package/wiki/{get-started/best-practices → best-practices}/contribution-workflow.md +34 -7
- package/wiki/best-practices/data-modeling.md +376 -0
- package/wiki/best-practices/deployment-strategies.md +698 -0
- package/wiki/best-practices/index.md +27 -0
- package/wiki/best-practices/performance-optimization.md +196 -0
- package/wiki/best-practices/security-guidelines.md +218 -0
- package/wiki/{get-started/best-practices → best-practices}/troubleshooting-tips.md +97 -1
- package/wiki/changelogs/2025-12-16-initial-architecture.md +1 -1
- package/wiki/changelogs/2025-12-16-model-repo-datasource-refactor.md +1 -1
- package/wiki/changelogs/2025-12-17-refactor.md +1 -1
- package/wiki/changelogs/2025-12-18-performance-optimizations.md +5 -5
- package/wiki/changelogs/2025-12-18-repository-validation-security.md +13 -7
- package/wiki/changelogs/2025-12-26-nested-relations-and-generics.md +2 -2
- package/wiki/changelogs/2025-12-29-dynamic-binding-registration.md +104 -0
- package/wiki/changelogs/2025-12-29-snowflake-uid-helper.md +100 -0
- package/wiki/changelogs/2025-12-30-repository-enhancements.md +214 -0
- package/wiki/changelogs/2025-12-31-json-path-filtering-array-operators.md +214 -0
- package/wiki/changelogs/2025-12-31-string-id-custom-generator.md +137 -0
- package/wiki/changelogs/2026-01-02-default-filter-and-repository-mixins.md +418 -0
- package/wiki/changelogs/index.md +6 -0
- package/wiki/changelogs/planned-schema-migrator.md +0 -8
- package/wiki/{get-started/core-concepts → guides/core-concepts/application}/bootstrapping.md +18 -5
- package/wiki/{get-started/core-concepts/application.md → guides/core-concepts/application/index.md} +47 -104
- package/wiki/guides/core-concepts/components-guide.md +509 -0
- package/wiki/{get-started → guides}/core-concepts/components.md +24 -17
- package/wiki/{get-started → guides}/core-concepts/controllers.md +30 -13
- package/wiki/{get-started → guides}/core-concepts/dependency-injection.md +97 -0
- package/wiki/guides/core-concepts/persistent/datasources.md +179 -0
- package/wiki/guides/core-concepts/persistent/index.md +119 -0
- package/wiki/guides/core-concepts/persistent/models.md +241 -0
- package/wiki/guides/core-concepts/persistent/repositories.md +219 -0
- package/wiki/guides/core-concepts/persistent/transactions.md +170 -0
- package/wiki/{get-started → guides}/core-concepts/services.md +26 -3
- package/wiki/{get-started → guides/get-started}/5-minute-quickstart.md +59 -14
- package/wiki/guides/get-started/philosophy.md +682 -0
- package/wiki/guides/get-started/setup.md +157 -0
- package/wiki/guides/index.md +89 -0
- package/wiki/guides/reference/glossary.md +243 -0
- package/wiki/{get-started → guides/reference}/mcp-docs-server.md +0 -10
- package/wiki/{get-started → guides/tutorials}/building-a-crud-api.md +134 -132
- package/wiki/{get-started/quickstart.md → guides/tutorials/complete-installation.md} +107 -71
- package/wiki/guides/tutorials/ecommerce-api.md +1399 -0
- package/wiki/guides/tutorials/realtime-chat.md +1261 -0
- package/wiki/guides/tutorials/testing.md +723 -0
- package/wiki/index.md +176 -37
- package/wiki/references/base/application.md +27 -0
- package/wiki/references/base/bootstrapping.md +31 -26
- package/wiki/references/base/components.md +24 -7
- package/wiki/references/base/controllers.md +50 -20
- package/wiki/references/base/datasources.md +30 -0
- package/wiki/references/base/dependency-injection.md +39 -3
- package/wiki/references/base/filter-system/application-usage.md +224 -0
- package/wiki/references/base/filter-system/array-operators.md +132 -0
- package/wiki/references/base/filter-system/comparison-operators.md +109 -0
- package/wiki/references/base/filter-system/default-filter.md +428 -0
- package/wiki/references/base/filter-system/fields-order-pagination.md +155 -0
- package/wiki/references/base/filter-system/index.md +127 -0
- package/wiki/references/base/filter-system/json-filtering.md +197 -0
- package/wiki/references/base/filter-system/list-operators.md +71 -0
- package/wiki/references/base/filter-system/logical-operators.md +156 -0
- package/wiki/references/base/filter-system/null-operators.md +58 -0
- package/wiki/references/base/filter-system/pattern-matching.md +108 -0
- package/wiki/references/base/filter-system/quick-reference.md +431 -0
- package/wiki/references/base/filter-system/range-operators.md +63 -0
- package/wiki/references/base/filter-system/tips.md +190 -0
- package/wiki/references/base/filter-system/use-cases.md +452 -0
- package/wiki/references/base/index.md +90 -0
- package/wiki/references/base/middlewares.md +604 -0
- package/wiki/references/base/models.md +215 -23
- package/wiki/references/base/providers.md +731 -0
- package/wiki/references/base/repositories/advanced.md +555 -0
- package/wiki/references/base/repositories/index.md +228 -0
- package/wiki/references/base/repositories/mixins.md +331 -0
- package/wiki/references/base/repositories/relations.md +486 -0
- package/wiki/references/base/repositories.md +40 -635
- package/wiki/references/base/services.md +28 -4
- package/wiki/references/components/authentication.md +22 -2
- package/wiki/references/components/health-check.md +12 -0
- package/wiki/references/components/index.md +23 -0
- package/wiki/references/components/mail.md +687 -0
- package/wiki/references/components/request-tracker.md +16 -0
- package/wiki/references/components/socket-io.md +18 -0
- package/wiki/references/components/static-asset.md +14 -26
- package/wiki/references/components/swagger.md +17 -0
- package/wiki/references/configuration/environment-variables.md +427 -0
- package/wiki/references/configuration/index.md +73 -0
- package/wiki/references/helpers/cron.md +14 -0
- package/wiki/references/helpers/crypto.md +15 -0
- package/wiki/references/helpers/env.md +16 -0
- package/wiki/references/helpers/error.md +17 -0
- package/wiki/references/helpers/index.md +14 -0
- package/wiki/references/helpers/inversion.md +24 -4
- package/wiki/references/helpers/logger.md +19 -0
- package/wiki/references/helpers/network.md +11 -0
- package/wiki/references/helpers/queue.md +19 -0
- package/wiki/references/helpers/redis.md +21 -0
- package/wiki/references/helpers/socket-io.md +24 -5
- package/wiki/references/helpers/storage.md +18 -10
- package/wiki/references/helpers/testing.md +18 -0
- package/wiki/references/helpers/types.md +16 -0
- package/wiki/references/helpers/uid.md +167 -0
- package/wiki/references/helpers/worker-thread.md +16 -0
- package/wiki/references/index.md +177 -0
- package/wiki/references/quick-reference.md +634 -0
- package/wiki/references/src-details/boot.md +3 -3
- package/wiki/references/src-details/dev-configs.md +0 -4
- package/wiki/references/src-details/docs.md +2 -2
- package/wiki/references/src-details/index.md +86 -0
- package/wiki/references/src-details/inversion.md +1 -6
- package/wiki/references/src-details/mcp-server.md +3 -15
- package/wiki/references/utilities/index.md +86 -10
- package/wiki/references/utilities/jsx.md +577 -0
- package/wiki/references/utilities/request.md +0 -2
- package/wiki/references/utilities/statuses.md +740 -0
- package/wiki/get-started/best-practices/api-usage-examples.md +0 -266
- package/wiki/get-started/best-practices/architectural-patterns.md +0 -170
- package/wiki/get-started/best-practices/data-modeling.md +0 -177
- package/wiki/get-started/best-practices/deployment-strategies.md +0 -121
- package/wiki/get-started/best-practices/performance-optimization.md +0 -97
- package/wiki/get-started/best-practices/security-guidelines.md +0 -99
- package/wiki/get-started/core-concepts/persistent.md +0 -539
- package/wiki/get-started/index.md +0 -65
- package/wiki/get-started/philosophy.md +0 -296
- package/wiki/get-started/prerequisites.md +0 -113
|
@@ -1,296 +0,0 @@
|
|
|
1
|
-
# Philosophy: The Best of Two Worlds
|
|
2
|
-
|
|
3
|
-
Ignis combines the structured, enterprise-grade development experience of **LoopBack 4** with the speed and simplicity of **Hono**.
|
|
4
|
-
|
|
5
|
-
## The Landscape
|
|
6
|
-
|
|
7
|
-
When building REST APIs with Node.js/Bun, developers choose from three categories of frameworks, each with genuine strengths:
|
|
8
|
-
|
|
9
|
-
### Framework Categories
|
|
10
|
-
|
|
11
|
-
| Category | Examples | Philosophy |
|
|
12
|
-
|----------|----------|------------|
|
|
13
|
-
| **Minimal** | Express, Hono, Fastify, Koa | Freedom, speed, flexibility |
|
|
14
|
-
| **Enterprise** | NestJS, LoopBack 4, AdonisJS | Structure, patterns, conventions |
|
|
15
|
-
| **Balanced** | Ignis, Ts.ED | Structure with lighter footprint |
|
|
16
|
-
|
|
17
|
-
## Honest Comparison
|
|
18
|
-
|
|
19
|
-
### Performance & Runtime
|
|
20
|
-
|
|
21
|
-
| Framework | Requests/sec | Startup Time | Memory | Multi-Runtime |
|
|
22
|
-
|-----------|-------------|--------------|--------|---------------|
|
|
23
|
-
| **Hono** | ~150k | ~10ms | ~20MB | ✅ Bun, Node, Deno, CF Workers |
|
|
24
|
-
| **Fastify** | ~80k | ~50ms | ~40MB | Node only |
|
|
25
|
-
| **Express** | ~15k | ~100ms | ~50MB | Node only |
|
|
26
|
-
| **NestJS** | ~25k | ~500ms | ~100MB | Node (Bun experimental) |
|
|
27
|
-
| **LoopBack 4** | ~20k | ~800ms | ~120MB | Node only |
|
|
28
|
-
| **Ignis** | ~140k | ~30ms | ~30MB | ✅ Bun, Node |
|
|
29
|
-
|
|
30
|
-
*Benchmarks are approximate and vary by use case.*
|
|
31
|
-
|
|
32
|
-
### Developer Experience
|
|
33
|
-
|
|
34
|
-
| Aspect | Minimal (Hono/Express) | Enterprise (NestJS/LoopBack) | Ignis |
|
|
35
|
-
|--------|------------------------|------------------------------|-------|
|
|
36
|
-
| **Setup Time** | 5 minutes | 30+ minutes | 10 minutes |
|
|
37
|
-
| **Learning Curve** | Low | High | Medium |
|
|
38
|
-
| **Boilerplate** | Minimal | Heavy | Moderate |
|
|
39
|
-
| **Type Safety** | Manual | Excellent | Excellent |
|
|
40
|
-
| **IDE Support** | Basic | Excellent | Good |
|
|
41
|
-
| **Documentation** | Good | Excellent | Growing |
|
|
42
|
-
|
|
43
|
-
### Architecture & Patterns
|
|
44
|
-
|
|
45
|
-
| Pattern | Minimal | Enterprise | Ignis |
|
|
46
|
-
|---------|---------|------------|-------|
|
|
47
|
-
| **Dependency Injection** | ❌ Manual/3rd party | ✅ Built-in (complex) | ✅ Built-in (simple) |
|
|
48
|
-
| **Layered Architecture** | ❌ DIY | ✅ Enforced | ✅ Guided |
|
|
49
|
-
| **Repository Pattern** | ❌ DIY | ✅ Built-in | ✅ Built-in |
|
|
50
|
-
| **Validation** | ❌ 3rd party | ✅ Built-in | ✅ Built-in (Zod) |
|
|
51
|
-
| **OpenAPI/Swagger** | ❌ 3rd party | ✅ Built-in | ✅ Built-in |
|
|
52
|
-
| **Authentication** | ❌ DIY | ✅ Modules available | ✅ Built-in component |
|
|
53
|
-
|
|
54
|
-
### Ecosystem & Maturity
|
|
55
|
-
|
|
56
|
-
| Aspect | Minimal (Hono) | Enterprise (NestJS) | Ignis |
|
|
57
|
-
|--------|----------------|---------------------|-------|
|
|
58
|
-
| **Community Size** | Growing fast | Very large | Small |
|
|
59
|
-
| **npm Downloads** | ~500k/week | ~3M/week | New |
|
|
60
|
-
| **Stack Overflow** | Limited | Extensive | Limited |
|
|
61
|
-
| **Third-party Modules** | Middleware-based | Rich ecosystem | Growing |
|
|
62
|
-
| **Production Battle-tested** | Yes | Yes | Emerging |
|
|
63
|
-
| **Corporate Backing** | Cloudflare | Trilon | Independent |
|
|
64
|
-
|
|
65
|
-
### Flexibility vs Convention
|
|
66
|
-
|
|
67
|
-
| Aspect | Minimal | Enterprise | Ignis |
|
|
68
|
-
|--------|---------|------------|-------|
|
|
69
|
-
| **Project Structure** | Total freedom | Strict conventions | Guided conventions |
|
|
70
|
-
| **ORM Choice** | Any | TypeORM/Prisma preferred | Drizzle (flexible) |
|
|
71
|
-
| **Testing Approach** | Any | Jest recommended | Any |
|
|
72
|
-
| **Middleware System** | Simple | Complex interceptors | Hono middleware |
|
|
73
|
-
| **Customization** | Unlimited | Plugin-based | Component-based |
|
|
74
|
-
|
|
75
|
-
## The Middle Ground: Where Ignis Fits
|
|
76
|
-
|
|
77
|
-
### What Each Approach Excels At
|
|
78
|
-
|
|
79
|
-
**Minimal Frameworks (Hono, Express, Fastify):**
|
|
80
|
-
- ✅ Maximum performance
|
|
81
|
-
- ✅ Complete freedom in architecture
|
|
82
|
-
- ✅ Fastest prototyping
|
|
83
|
-
- ✅ Smallest bundle size
|
|
84
|
-
- ✅ Edge/serverless deployments
|
|
85
|
-
- ⚠️ Architecture decisions left to developer
|
|
86
|
-
- ⚠️ Patterns must be implemented manually
|
|
87
|
-
|
|
88
|
-
**Enterprise Frameworks (NestJS, LoopBack):**
|
|
89
|
-
- ✅ Battle-tested patterns
|
|
90
|
-
- ✅ Comprehensive documentation
|
|
91
|
-
- ✅ Large community & ecosystem
|
|
92
|
-
- ✅ Excellent for large teams
|
|
93
|
-
- ✅ Strong conventions prevent chaos
|
|
94
|
-
- ⚠️ Higher resource consumption
|
|
95
|
-
- ⚠️ Steeper learning curve
|
|
96
|
-
- ⚠️ More boilerplate
|
|
97
|
-
|
|
98
|
-
**Ignis (The Middle Ground):**
|
|
99
|
-
- ✅ Enterprise patterns without the weight
|
|
100
|
-
- ✅ Hono's performance foundation
|
|
101
|
-
- ✅ Gradual complexity adoption
|
|
102
|
-
- ✅ TypeScript-first with Zod validation
|
|
103
|
-
- ⚠️ Smaller community (new framework)
|
|
104
|
-
- ⚠️ Less documentation than mature frameworks
|
|
105
|
-
- ⚠️ Fewer third-party integrations
|
|
106
|
-
|
|
107
|
-
## Inspired By The Best
|
|
108
|
-
|
|
109
|
-
### From LoopBack 4
|
|
110
|
-
|
|
111
|
-
[LoopBack 4](https://loopback.io/doc/en/lb4/index.html) proved that enterprise patterns work:
|
|
112
|
-
|
|
113
|
-
| Pattern | Benefit |
|
|
114
|
-
|---------|---------|
|
|
115
|
-
| **Dependency Injection** | Loosely coupled, testable code |
|
|
116
|
-
| **Layered Architecture** | Clear separation (Controllers → Services → Repositories) |
|
|
117
|
-
| **Component-Based** | Modular, reusable features |
|
|
118
|
-
| **Decorators** | Declarative metadata for routes and DI |
|
|
119
|
-
|
|
120
|
-
### From Hono
|
|
121
|
-
|
|
122
|
-
[Hono](https://hono.dev/) provides the performance foundation:
|
|
123
|
-
|
|
124
|
-
| Feature | Why It Matters |
|
|
125
|
-
|---------|----------------|
|
|
126
|
-
| **Ultrafast** | One of the fastest web frameworks |
|
|
127
|
-
| **Lightweight** | Minimal core, fast startup |
|
|
128
|
-
| **Modern API** | Clean, intuitive developer experience |
|
|
129
|
-
| **Multi-Runtime** | Works on Node.js, Bun, Deno, Cloudflare Workers |
|
|
130
|
-
|
|
131
|
-
### The Ignis Synthesis
|
|
132
|
-
|
|
133
|
-
Ignis = LoopBack patterns + Hono performance:
|
|
134
|
-
|
|
135
|
-
```
|
|
136
|
-
┌─────────────────┐ ┌──────────────┐ ┌──────────────┐
|
|
137
|
-
│ LoopBack 4 │ + │ Hono │ = │ Ignis │
|
|
138
|
-
│ │ │ │ │ │
|
|
139
|
-
│ • DI Container │ │ • Speed │ │ • DI + Speed │
|
|
140
|
-
│ • Layered Arch │ │ • Minimal │ │ • Structure │
|
|
141
|
-
│ • Components │ │ • Modern API │ │ • Components │
|
|
142
|
-
└─────────────────┘ └──────────────┘ └──────────────┘
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
**What you get:**
|
|
146
|
-
- Familiar structure for LoopBack/NestJS developers
|
|
147
|
-
- Hono's performance and flexibility
|
|
148
|
-
- Pre-built components (auth, logging, database, etc.)
|
|
149
|
-
|
|
150
|
-
## When Should You Use Ignis?
|
|
151
|
-
|
|
152
|
-
### Decision Matrix
|
|
153
|
-
|
|
154
|
-
| Your Situation | Use Ignis? | Why |
|
|
155
|
-
|----------------|------------|-----|
|
|
156
|
-
| Building 10+ endpoint API | ✅ Yes | Structure prevents spaghetti code |
|
|
157
|
-
| Team of 2+ developers | ✅ Yes | Patterns improve collaboration |
|
|
158
|
-
| Need database + auth + docs | ✅ Yes | Built-in components save time |
|
|
159
|
-
| Coming from NestJS/LoopBack | ✅ Yes | Familiar patterns, better performance |
|
|
160
|
-
| Prototyping quickly | ❌ No | Use plain Hono for speed |
|
|
161
|
-
| Simple proxy/webhook | ❌ No | Too much structure |
|
|
162
|
-
| 3-5 endpoints, solo dev | 🤔 Maybe | Start with Hono, migrate later if needed |
|
|
163
|
-
|
|
164
|
-
### ✅ Perfect For
|
|
165
|
-
|
|
166
|
-
**E-commerce Backends:**
|
|
167
|
-
- Controllers for products, orders, users, payments
|
|
168
|
-
- Services for business logic (tax, inventory)
|
|
169
|
-
- Repository pattern for data access
|
|
170
|
-
- JWT authentication + OpenAPI docs
|
|
171
|
-
|
|
172
|
-
**SaaS Platform APIs:**
|
|
173
|
-
- Multi-tenant architecture
|
|
174
|
-
- Complex business rules
|
|
175
|
-
- Modular components
|
|
176
|
-
- Easy testing with DI
|
|
177
|
-
|
|
178
|
-
**Enterprise Tools:**
|
|
179
|
-
- CRUD operations via `ControllerFactory`
|
|
180
|
-
- Team collaboration with clear patterns
|
|
181
|
-
- Type-safe database operations
|
|
182
|
-
- Automatic validation
|
|
183
|
-
|
|
184
|
-
## Choose the Right Tool
|
|
185
|
-
|
|
186
|
-
### Use Hono/Fastify/Express When:
|
|
187
|
-
|
|
188
|
-
| Scenario | Why It's Better |
|
|
189
|
-
|----------|-----------------|
|
|
190
|
-
| Building a simple webhook handler | No structure overhead needed |
|
|
191
|
-
| Edge/serverless functions | Minimal cold start, tiny bundle |
|
|
192
|
-
| Rapid prototyping | Get something running in minutes |
|
|
193
|
-
| Microservices with 1-5 endpoints | Structure adds unnecessary complexity |
|
|
194
|
-
| You want maximum control | No conventions to follow |
|
|
195
|
-
| Learning web development | Simpler mental model |
|
|
196
|
-
|
|
197
|
-
### Use NestJS/LoopBack When:
|
|
198
|
-
|
|
199
|
-
| Scenario | Why It's Better |
|
|
200
|
-
|----------|-----------------|
|
|
201
|
-
| Large team (10+ developers) | Strong conventions prevent chaos |
|
|
202
|
-
| Enterprise with strict standards | Mature, battle-tested, auditable |
|
|
203
|
-
| Need extensive ecosystem | Many official and community modules |
|
|
204
|
-
| Complex microservices architecture | Built-in support for messaging, CQRS |
|
|
205
|
-
| Hiring developers easily | Large talent pool familiar with it |
|
|
206
|
-
| Long-term support is critical | Corporate backing, LTS versions |
|
|
207
|
-
|
|
208
|
-
### Use Ignis When:
|
|
209
|
-
|
|
210
|
-
| Scenario | Why It's Better |
|
|
211
|
-
|----------|-----------------|
|
|
212
|
-
| Medium-sized API (10-100 endpoints) | Right balance of structure and speed |
|
|
213
|
-
| Small team wanting patterns | DI without enterprise complexity |
|
|
214
|
-
| Performance is critical | Hono's speed with structure |
|
|
215
|
-
| Coming from LoopBack/NestJS | Familiar patterns, lighter weight |
|
|
216
|
-
| Bun-first development | Native Bun support |
|
|
217
|
-
| Growing project | Start simple, add complexity gradually |
|
|
218
|
-
|
|
219
|
-
## The Trade-off
|
|
220
|
-
|
|
221
|
-
Every choice has trade-offs. Here's an honest look:
|
|
222
|
-
|
|
223
|
-
### What You Gain with Ignis
|
|
224
|
-
|
|
225
|
-
| Benefit | Compared To |
|
|
226
|
-
|---------|-------------|
|
|
227
|
-
| ~5x faster than NestJS | Enterprise frameworks |
|
|
228
|
-
| Built-in DI, validation, OpenAPI | Minimal frameworks |
|
|
229
|
-
| Structured codebase | DIY architecture |
|
|
230
|
-
| Easier testing with DI | Manual mocking |
|
|
231
|
-
| Team-friendly patterns | Individual coding styles |
|
|
232
|
-
|
|
233
|
-
### What You Give Up with Ignis
|
|
234
|
-
|
|
235
|
-
| Trade-off | Compared To |
|
|
236
|
-
|-----------|-------------|
|
|
237
|
-
| ~10% slower than raw Hono | Minimal frameworks |
|
|
238
|
-
| Smaller community | NestJS/Express |
|
|
239
|
-
| Less documentation | Mature frameworks |
|
|
240
|
-
| Learning curve for patterns | No-structure approach |
|
|
241
|
-
| Convention requirements | Total freedom |
|
|
242
|
-
|
|
243
|
-
### Honest Assessment
|
|
244
|
-
|
|
245
|
-
| Aspect | Ignis Reality |
|
|
246
|
-
|--------|---------------|
|
|
247
|
-
| **Maturity** | New framework, evolving API |
|
|
248
|
-
| **Community** | Small but growing |
|
|
249
|
-
| **Documentation** | Good but not comprehensive |
|
|
250
|
-
| **Production Use** | Early adopters only |
|
|
251
|
-
| **Breaking Changes** | Possible before v1.0 |
|
|
252
|
-
| **Support** | Community-driven |
|
|
253
|
-
|
|
254
|
-
**Bottom line:** Ignis is ideal for developers who want enterprise patterns without enterprise overhead. If you need battle-tested stability and extensive community support, consider NestJS. If you need maximum simplicity, stick with Hono.
|
|
255
|
-
|
|
256
|
-
## Migration Paths
|
|
257
|
-
|
|
258
|
-
### From Hono to Ignis
|
|
259
|
-
|
|
260
|
-
If your Hono project grows complex:
|
|
261
|
-
|
|
262
|
-
```
|
|
263
|
-
1. Add Ignis as dependency
|
|
264
|
-
2. Wrap existing Hono app with Ignis Application
|
|
265
|
-
3. Gradually introduce DI for new features
|
|
266
|
-
4. Migrate routes to controllers over time
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
### From NestJS to Ignis
|
|
270
|
-
|
|
271
|
-
If you want better performance:
|
|
272
|
-
|
|
273
|
-
```
|
|
274
|
-
1. Controllers → Ignis Controllers (similar decorators)
|
|
275
|
-
2. Services → Ignis Services (same pattern)
|
|
276
|
-
3. Repositories → Ignis Repositories (Drizzle instead of TypeORM)
|
|
277
|
-
4. Modules → Ignis Components (simpler structure)
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
### From Ignis to NestJS
|
|
281
|
-
|
|
282
|
-
If you outgrow Ignis:
|
|
283
|
-
|
|
284
|
-
```
|
|
285
|
-
1. Patterns are similar - migration is straightforward
|
|
286
|
-
2. Main changes: ORM, module system, interceptors
|
|
287
|
-
3. DI concepts transfer directly
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
## Next Steps
|
|
291
|
-
|
|
292
|
-
Ready to get started?
|
|
293
|
-
|
|
294
|
-
1. [Check Prerequisites](./prerequisites.md) - Install required tools
|
|
295
|
-
2. [Quickstart Guide](./quickstart.md) - Build your first endpoint
|
|
296
|
-
3. [CRUD Tutorial](./building-a-crud-api.md) - Build a complete API
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
# Prerequisites
|
|
2
|
-
|
|
3
|
-
Before starting with Ignis, ensure you have the following installed and configured.
|
|
4
|
-
|
|
5
|
-
> **New to Ignis?** This is a TypeScript REST API framework that combines enterprise patterns with high performance. [Learn more about the philosophy](./philosophy.md).
|
|
6
|
-
|
|
7
|
-
## Required Software
|
|
8
|
-
|
|
9
|
-
| Tool | Version | Purpose | Installation |
|
|
10
|
-
|------|---------|---------|--------------|
|
|
11
|
-
| **Bun** | ≥ 1.3 | JavaScript runtime & package manager | [bun.sh](https://bun.sh) |
|
|
12
|
-
| **PostgreSQL** | ≥ 14.x | Database server for storing your data | [postgresql.org/download](https://www.postgresql.org/download/) |
|
|
13
|
-
|
|
14
|
-
### Installation Quick Links
|
|
15
|
-
|
|
16
|
-
**Bun:**
|
|
17
|
-
```bash
|
|
18
|
-
# macOS/Linux
|
|
19
|
-
curl -fsSL https://bun.sh/install | bash
|
|
20
|
-
|
|
21
|
-
# Windows (requires WSL)
|
|
22
|
-
# First install WSL, then run the command above
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
**PostgreSQL:**
|
|
26
|
-
- **macOS:** `brew install postgresql@14` (requires [Homebrew](https://brew.sh))
|
|
27
|
-
- **Ubuntu/Debian:** `sudo apt-get install postgresql-14`
|
|
28
|
-
- **Windows:** Download installer from [postgresql.org](https://www.postgresql.org/download/windows/)
|
|
29
|
-
|
|
30
|
-
### Verify Installation
|
|
31
|
-
|
|
32
|
-
After installing, verify everything works:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
# Check Bun
|
|
36
|
-
bun --version
|
|
37
|
-
# Expected: 1.3.0 or higher
|
|
38
|
-
|
|
39
|
-
# Check PostgreSQL
|
|
40
|
-
psql --version
|
|
41
|
-
# Expected: psql (PostgreSQL) 14.x or higher
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## Required Knowledge
|
|
45
|
-
|
|
46
|
-
You should be comfortable with:
|
|
47
|
-
|
|
48
|
-
- **TypeScript basics** - Variables, functions, classes, interfaces
|
|
49
|
-
- **REST APIs** - What GET, POST, PUT, DELETE mean
|
|
50
|
-
- **Async/await** - Handling asynchronous code in JavaScript
|
|
51
|
-
- **SQL basics** - What a database table is, basic SELECT/INSERT/UPDATE/DELETE
|
|
52
|
-
|
|
53
|
-
**Don't have these?** You can still follow along, but consider bookmarking these resources:
|
|
54
|
-
- [TypeScript Handbook](https://www.typescriptlang.org/docs/handbook/intro.html)
|
|
55
|
-
- [REST API Tutorial](https://restfulapi.net/)
|
|
56
|
-
|
|
57
|
-
## Database Setup
|
|
58
|
-
|
|
59
|
-
Create a database for your application:
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
# Start PostgreSQL service (if not already running)
|
|
63
|
-
# macOS with Homebrew:
|
|
64
|
-
brew services start postgresql@14
|
|
65
|
-
|
|
66
|
-
# Ubuntu/Debian:
|
|
67
|
-
sudo service postgresql start
|
|
68
|
-
|
|
69
|
-
# Connect to PostgreSQL
|
|
70
|
-
psql -U postgres
|
|
71
|
-
|
|
72
|
-
# Inside psql, create your database:
|
|
73
|
-
CREATE DATABASE my_app_db;
|
|
74
|
-
|
|
75
|
-
# Verify it was created:
|
|
76
|
-
\l
|
|
77
|
-
|
|
78
|
-
# Exit psql:
|
|
79
|
-
\q
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
**What just happened?**
|
|
83
|
-
- `psql -U postgres` - Connect as the default "postgres" superuser
|
|
84
|
-
- `CREATE DATABASE my_app_db;` - Creates an empty database to store your app's data
|
|
85
|
-
- `\l` - Lists all databases (you should see `my_app_db` in the list)
|
|
86
|
-
|
|
87
|
-
**Troubleshooting:**
|
|
88
|
-
- **"postgres" user doesn't exist?** Try `psql -U your_username` (your system username)
|
|
89
|
-
- **Password prompt?** Default PostgreSQL installations often have no password. If prompted, check your installation docs.
|
|
90
|
-
- **Connection refused?** PostgreSQL service isn't running. Check the `brew services start` or `sudo service postgresql start` command.
|
|
91
|
-
|
|
92
|
-
## Text Editor Setup (Optional but Recommended)
|
|
93
|
-
|
|
94
|
-
Any editor works, but **VS Code** has the best TypeScript support:
|
|
95
|
-
|
|
96
|
-
1. Install [VS Code](https://code.visualstudio.com/)
|
|
97
|
-
2. Install these extensions:
|
|
98
|
-
- **ESLint** - Catches code errors
|
|
99
|
-
- **Prettier** - Auto-formats code
|
|
100
|
-
- **TypeScript + JavaScript** - Built-in, enables autocomplete
|
|
101
|
-
|
|
102
|
-
## Ready to Start?
|
|
103
|
-
|
|
104
|
-
✅ Bun installed and working
|
|
105
|
-
✅ PostgreSQL installed and running
|
|
106
|
-
✅ Database created
|
|
107
|
-
✅ Basic TypeScript knowledge
|
|
108
|
-
|
|
109
|
-
Continue to the [Quickstart Guide](./quickstart.md) to build your first API!
|
|
110
|
-
|
|
111
|
-
**Alternative paths:**
|
|
112
|
-
- Want to understand "why Ignis"? Read [Philosophy](./philosophy.md) first
|
|
113
|
-
- Want to see the full picture? Check [Getting Started Overview](./index.md)
|