exisjs 0.7.12 β 0.7.14
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 +195 -39
- package/dist/cli/commands/run.d.ts.map +1 -1
- package/dist/cli/commands/run.js +3 -1
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/config/types.d.ts +2 -2
- package/dist/config/types.d.ts.map +1 -1
- package/dist/decorators/params.d.ts +21 -0
- package/dist/decorators/params.d.ts.map +1 -1
- package/dist/decorators/params.js +21 -1
- package/dist/decorators/params.js.map +1 -1
- package/dist/di/container.d.ts +15 -6
- package/dist/di/container.d.ts.map +1 -1
- package/dist/di/container.js +26 -3
- package/dist/di/container.js.map +1 -1
- package/dist/di/index.d.ts +1 -1
- package/dist/di/index.d.ts.map +1 -1
- package/dist/di/index.js.map +1 -1
- package/dist/di/inject.d.ts +2 -1
- package/dist/di/inject.d.ts.map +1 -1
- package/dist/di/inject.js +2 -1
- package/dist/di/inject.js.map +1 -1
- package/dist/docs/ARCHITECTURE.md +130 -78
- package/dist/docs/BENCHMARKS.md +4 -4
- package/dist/docs/content/README.md +43 -44
- package/dist/docs/content/boundaries.mdx +138 -61
- package/dist/docs/content/cli/commands.mdx +151 -128
- package/dist/docs/content/cli/overview.mdx +61 -47
- package/dist/docs/content/cli/usage.mdx +107 -30
- package/dist/docs/content/config.mdx +145 -158
- package/dist/docs/content/controllers.mdx +193 -464
- package/dist/docs/content/cron.mdx +183 -69
- package/dist/docs/content/decorators.mdx +449 -154
- package/dist/docs/content/errors.mdx +202 -305
- package/dist/docs/content/exisjs-mcp.mdx +59 -49
- package/dist/docs/content/installation.mdx +243 -157
- package/dist/docs/content/introduction.mdx +220 -48
- package/dist/docs/content/middleware.mdx +171 -497
- package/dist/docs/content/modules.mdx +141 -83
- package/dist/docs/content/providers.mdx +216 -180
- package/dist/docs/content/requests.mdx +168 -488
- package/dist/docs/content/responses.mdx +200 -533
- package/dist/docs/content/routing.mdx +235 -598
- package/dist/docs/content/security.mdx +233 -57
- package/dist/docs/content/structure.mdx +151 -240
- package/dist/docs/content/swagger.mdx +192 -91
- package/dist/docs/content/testing.mdx +205 -74
- package/dist/docs/content/validation.mdx +479 -341
- package/dist/docs/reference/README.md +34 -2
- package/dist/docs/reference/config.mdx +277 -75
- package/dist/docs/reference/context.mdx +197 -106
- package/dist/docs/reference/cron.mdx +266 -152
- package/dist/docs/reference/database.mdx +135 -53
- package/dist/docs/reference/decorators.mdx +234 -116
- package/dist/docs/reference/di.mdx +146 -112
- package/dist/docs/reference/error.mdx +155 -178
- package/dist/docs/reference/exis.mdx +141 -70
- package/dist/docs/reference/logger.mdx +110 -126
- package/dist/docs/reference/middleware.mdx +235 -158
- package/dist/docs/reference/plugin.mdx +136 -64
- package/dist/docs/reference/router.mdx +275 -293
- package/dist/docs/reference/sanitize.mdx +91 -87
- package/dist/docs/reference/swagger.mdx +280 -100
- package/dist/docs/reference/testing.mdx +223 -89
- package/dist/docs/reference/validator.mdx +194 -206
- package/dist/lib/start-server.js +22 -8
- package/dist/lib/start-server.js.map +1 -1
- package/dist/module/module.d.ts +6 -3
- package/dist/module/module.d.ts.map +1 -1
- package/dist/module/module.js +17 -3
- package/dist/module/module.js.map +1 -1
- package/dist/router/controller-registrar.d.ts.map +1 -1
- package/dist/router/controller-registrar.js +26 -4
- package/dist/router/controller-registrar.js.map +1 -1
- package/dist/router/scanner/fs-scanner.d.ts.map +1 -1
- package/dist/router/scanner/fs-scanner.js +22 -0
- package/dist/router/scanner/fs-scanner.js.map +1 -1
- package/dist/router/types.d.ts +6 -4
- package/dist/router/types.d.ts.map +1 -1
- package/dist/server/app.d.ts +3 -1
- package/dist/server/app.d.ts.map +1 -1
- package/dist/server/app.js +24 -8
- package/dist/server/app.js.map +1 -1
- package/dist/server/bootstrapper.d.ts.map +1 -1
- package/dist/server/bootstrapper.js +19 -0
- package/dist/server/bootstrapper.js.map +1 -1
- package/dist/server/request.d.ts +2 -0
- package/dist/server/request.d.ts.map +1 -1
- package/dist/server/request.js +11 -0
- package/dist/server/request.js.map +1 -1
- package/dist/server/response.d.ts +10 -5
- package/dist/server/response.d.ts.map +1 -1
- package/dist/server/response.js +65 -18
- package/dist/server/response.js.map +1 -1
- package/dist/swagger/generator.d.ts.map +1 -1
- package/dist/swagger/generator.js +130 -10
- package/dist/swagger/generator.js.map +1 -1
- package/dist/telemetry/index.d.ts +12 -0
- package/dist/telemetry/index.d.ts.map +1 -0
- package/dist/telemetry/index.js +121 -0
- package/dist/telemetry/index.js.map +1 -0
- package/dist/testing/client.d.ts +1 -0
- package/dist/testing/client.d.ts.map +1 -1
- package/dist/testing/client.js +4 -1
- package/dist/testing/client.js.map +1 -1
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +11 -4
- package/dist/testing/index.js.map +1 -1
- package/dist/validator/builder.d.ts +26 -1
- package/dist/validator/builder.d.ts.map +1 -1
- package/dist/validator/builder.js +31 -0
- package/dist/validator/builder.js.map +1 -1
- package/dist/validator/engine.d.ts +23 -0
- package/dist/validator/engine.d.ts.map +1 -1
- package/dist/validator/engine.js +228 -31
- package/dist/validator/engine.js.map +1 -1
- package/dist/validator/index.d.ts +8 -4
- package/dist/validator/index.d.ts.map +1 -1
- package/dist/validator/index.js +4 -1
- package/dist/validator/index.js.map +1 -1
- package/dist/validator/tex-types.d.ts +19 -4
- package/dist/validator/tex-types.d.ts.map +1 -1
- package/dist/validator/tex-types.js +102 -0
- package/dist/validator/tex-types.js.map +1 -1
- package/dist/validator/tex.d.ts +1 -1
- package/dist/validator/tex.d.ts.map +1 -1
- package/dist/validator/tex.js +3 -1
- package/dist/validator/tex.js.map +1 -1
- package/dist/validator/types.d.ts +1 -0
- package/dist/validator/types.d.ts.map +1 -1
- package/package.json +46 -14
- package/dist/docs/content/dataloader.mdx +0 -170
- package/dist/docs/reference/dataloader.mdx +0 -91
package/dist/di/inject.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inject.js","sourceRoot":"","sources":["../../src/di/inject.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"inject.js","sourceRoot":"","sources":["../../src/di/inject.ts"],"names":[],"mappings":";;AAqBA,wBAQC;AA7BD,+CAAoD;AAGpD;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAgB,MAAM,CAAI,KAAuB;IAC/C,MAAM,KAAK,GAAG,0BAAgB,CAAC,QAAQ,EAAE,CAAA;IACzC,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CACb,4DAA4D,CAC7D,CAAA;IACH,CAAC;IACD,OAAO,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;AAChD,CAAC"}
|
|
@@ -1,110 +1,162 @@
|
|
|
1
1
|
# ExisJS Architecture Reference
|
|
2
2
|
|
|
3
|
-
This document
|
|
4
|
-
|
|
5
|
-
ExisJS core is a minimal, ultra-high-performance web framework runtime: file-system routing, dependency injection, validation (`tex`), sanitization, and an HTTP request pipeline. Everything else β databases, external auth providers, cache stores, queues, websockets β is extracted into official `@exisjs/*` packages.
|
|
3
|
+
This document serves as the architecture specification and technical reference for the internal subsystems, lifecycle execution pipeline, and design constraints of the ExisJS framework monorepo.
|
|
6
4
|
|
|
7
5
|
---
|
|
8
6
|
|
|
9
|
-
## 1.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
7
|
+
## 1. Monorepo Organization & Subsystems
|
|
8
|
+
|
|
9
|
+
ExisJS is architected as a modular TypeScript monorepo backed by a native Rust engine. Heavy compute tasks (path matching, memory LRU caching, rate limit buckets, and body sanitization) are handled by Rust native bindings via N-API (`@exisjs/rs`), with pure TypeScript fallbacks ensuring cross-platform stability.
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
packages/
|
|
13
|
+
βββ exisjs/ # Core TypeScript framework, HTTP pipeline, router, DI, Swagger, Telemetry
|
|
14
|
+
βββ rs/ # Native Rust engine (radix routing, token bucket rate limiter, fast LRU cache)
|
|
15
|
+
βββ fetch/ # Lightweight, zero-dependency typed HTTP/RPC client
|
|
16
|
+
βββ create/ # Scaffolding CLI tool (create-exisjs)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Framework Module Mapping
|
|
20
|
+
|
|
21
|
+
| Subsystem | Source Path | Key Responsibilities |
|
|
22
|
+
| :--- | :--- | :--- |
|
|
23
|
+
| **Router Engine** | `packages/exisjs/src/router/` | File-system directory scanning, `NativeRadixTree` route compilation, route grouping `(group)`, wildcard/param segments. |
|
|
24
|
+
| **Dependency Injection** | `packages/exisjs/src/di/` | Hierarchical IoC container, constructor injection reflection, custom providers (`useValue`, `useFactory`, `useExisting`, `useClass`), contextual `inject()`. |
|
|
25
|
+
| **Validation (`tex`)** | `packages/exisjs/src/validator/` | Schema definition AST (`tex.*`), discriminated unions, coercion primitives (`tex.coerce.*`), transforms, OpenAPI 3.1 duck-typing. |
|
|
26
|
+
| **HTTP Pipeline** | `packages/exisjs/src/server/` | `ExisRequest`, `ExisResponse`, lifecycle hooks (`onStart`, `onClose`), cookie parsing, proxy IP resolution. |
|
|
27
|
+
| **Folder Boundaries** | `packages/exisjs/src/router/boundary.ts` | Cascading directory configuration, CORS headers, security middleware, and directory-scoped DI providers. |
|
|
28
|
+
| **Decorators & OOP** | `packages/exisjs/src/decorators/` | `@Controller`, HTTP method decorators (`@Get`, `@Post`, `@RawBody`), `@Injectable`, `@Server`, `@Boundary`. |
|
|
29
|
+
| **Security & Middleware** | `packages/exisjs/src/middleware/` | `helmet()`, signed CSRF cookies, `hpp()`, CIDR `ipFilter()`, native `rateLimit()`, LRU `idempotency()`, streaming `upload()`. |
|
|
30
|
+
| **OpenAPI / Swagger** | `packages/exisjs/src/swagger/` | Interactive Swagger UI (`/docs`), OpenAPI 3.1 spec compiler from `tex` and Zod schemas. |
|
|
31
|
+
| **Telemetry & Observability** | `packages/exisjs/src/telemetry/` | Built-in OpenTelemetry tracing, span processors, and Prometheus metrics. |
|
|
32
|
+
| **Task Scheduling** | `packages/exisjs/src/cron/` | Drift-corrected background task scheduler (`cron()`, `@Cron()`). |
|
|
33
|
+
| **Testing Harness** | `packages/exisjs/src/testing/` | In-memory and HTTP integration test runner (`createTestApp`, `createTestContext`). |
|
|
20
34
|
|
|
21
35
|
---
|
|
22
36
|
|
|
23
|
-
## 2.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
37
|
+
## 2. Request Lifecycle & Execution Pipeline
|
|
38
|
+
|
|
39
|
+
Every HTTP request flows through a deterministic execution pipeline:
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
Incoming HTTP Request (Node HTTP / uWS)
|
|
43
|
+
β
|
|
44
|
+
βΌ
|
|
45
|
+
1. Core Server Hook & Request Context Initialization (AsyncLocalStorage)
|
|
46
|
+
β
|
|
47
|
+
βΌ
|
|
48
|
+
2. Global Boundary & Middleware Pipeline (CORS, Helmet, Rate Limiter, IP Filter)
|
|
49
|
+
β
|
|
50
|
+
βΌ
|
|
51
|
+
3. Radix Tree Route Matching (NativeRadixTree with Rust fallback)
|
|
52
|
+
β
|
|
53
|
+
βΌ
|
|
54
|
+
4. Scoped Folder Boundaries (Cascading boundary.ts configurations)
|
|
55
|
+
β
|
|
56
|
+
βΌ
|
|
57
|
+
5. Parameter Extraction & Schema Validation / Coercion (tex.* on Body, Query, Params)
|
|
58
|
+
β
|
|
59
|
+
βΌ
|
|
60
|
+
6. Controller Handler Execution (Functional handler or OOP controller method)
|
|
61
|
+
β
|
|
62
|
+
βΌ
|
|
63
|
+
7. Response Interceptors & Formatting (Fast serialization, ETag, Status Codes)
|
|
64
|
+
β
|
|
65
|
+
βΌ
|
|
66
|
+
8. Post-Response Tasks (after() deferred execution callbacks)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Context & AsyncLocalStorage
|
|
70
|
+
|
|
71
|
+
The execution pipeline utilizes `AsyncLocalStorage` via `executionContext` (`packages/exisjs/src/di/inject.ts`). This provides request isolation across concurrent async operations, powering:
|
|
72
|
+
- Contextual `inject(Token)` without parameter passing.
|
|
73
|
+
- `req.buffer()` lazy memoization for streaming webhooks.
|
|
74
|
+
- Deferred post-response cleanup tasks.
|
|
28
75
|
|
|
29
76
|
---
|
|
30
77
|
|
|
31
|
-
## 3.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
78
|
+
## 3. Dual-Paradigm Architecture
|
|
79
|
+
|
|
80
|
+
ExisJS maintains 100% feature parity between **Functional** and **Class-Based (OOP)** paradigms. An application chooses one paradigm consistently.
|
|
81
|
+
|
|
82
|
+
```text
|
|
83
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
84
|
+
β Unified Pipeline β
|
|
85
|
+
β (Validation Engine, Radix Dispatcher, OpenAPI Generator) β
|
|
86
|
+
ββββββββββββββββ¬ββββββββββββββββββββββββββββββββ¬βββββββββββββββ
|
|
87
|
+
β² β²
|
|
88
|
+
β β
|
|
89
|
+
ββββββββββββ΄βββββββββββ ββββββββββββ΄βββββββββββ
|
|
90
|
+
β Functional β β Class-Based β
|
|
91
|
+
β controller() β β @Controller() β
|
|
92
|
+
β route.get() β β @Get(), @Post() β
|
|
93
|
+
β defineBoundary() β β @Boundary() β
|
|
94
|
+
β exis({ onStart }) β β @Server() β
|
|
95
|
+
β inject(Token) β β @Inject(Token) β
|
|
96
|
+
βββββββββββββββββββββββ βββββββββββββββββββββββ
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Both paradigms compile down to identical internal `RouteDescriptor` structures registered in the route table.
|
|
36
100
|
|
|
37
101
|
---
|
|
38
102
|
|
|
39
|
-
## 4.
|
|
40
|
-
|
|
41
|
-
**What it is:** An IoC container supporting value, factory, and class providers, with singleton and request scoping.
|
|
42
|
-
|
|
43
|
-
**How it's implemented:** `Container` holds provider definitions and a singleton cache. Inside request handlers, `inject(token)` resolves dependencies dynamically using the request's context store.
|
|
103
|
+
## 4. The Graceful Fallback Pattern
|
|
44
104
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
## 5. Folder-Scoped Boundaries (`boundary.ts`) π’
|
|
105
|
+
Subsystems interfacing with `@exisjs/rs` (Radix router, LRU cache, rate limiting, and parameter validation) implement a strict fallback pattern. If N-API native binaries fail to load on non-standard architectures, the engine seamlessly activates pure TypeScript implementations:
|
|
48
106
|
|
|
49
|
-
|
|
107
|
+
```typescript
|
|
108
|
+
export class NativeSubsystemService {
|
|
109
|
+
private nativeEngine: any
|
|
110
|
+
private fallbackStore = new Map()
|
|
111
|
+
private isFallback = false
|
|
50
112
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
113
|
+
constructor() {
|
|
114
|
+
try {
|
|
115
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
116
|
+
const { NativeSubsystem } = require('@exisjs/rs')
|
|
117
|
+
this.nativeEngine = new NativeSubsystem()
|
|
118
|
+
} catch {
|
|
119
|
+
this.isFallback = true
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
```
|
|
56
124
|
|
|
57
125
|
---
|
|
58
126
|
|
|
59
|
-
##
|
|
60
|
-
|
|
61
|
-
**What it is:** A dependency-free, high-performance schema validator powered by Rust (`@exisjs/rs`) with strict typing, auto-coercion, and structured error responses.
|
|
127
|
+
## 5. Dependency Injection Architecture
|
|
62
128
|
|
|
63
|
-
|
|
129
|
+
The IoC container (`packages/exisjs/src/di/`) supports multiple provider token strategies:
|
|
64
130
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
131
|
+
1. **Class Providers**: `@Injectable()` decorated classes resolved via constructor metadata (`design:paramtypes`).
|
|
132
|
+
2. **Value Providers (`useValue`)**: Static configuration, database instances, or constants.
|
|
133
|
+
3. **Factory Providers (`useFactory`)**: Dynamic factory functions with dependency injection (`inject: [TokenA, TokenB]`).
|
|
134
|
+
4. **Alias Providers (`useExisting`)**: Token aliases mapping to an existing provider instance.
|
|
68
135
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
136
|
+
```typescript
|
|
137
|
+
// Custom Provider Registration
|
|
138
|
+
app.provide('DATABASE_CLIENT', {
|
|
139
|
+
useFactory: (url: string) => createClient(url),
|
|
140
|
+
inject: ['DATABASE_URL'],
|
|
141
|
+
})
|
|
142
|
+
```
|
|
72
143
|
|
|
73
144
|
---
|
|
74
145
|
|
|
75
|
-
##
|
|
146
|
+
## 6. Validation & Schema Engine (`tex`)
|
|
76
147
|
|
|
77
|
-
|
|
78
|
-
- **Response:** Chainable status, header, and cookie APIs, automatic ETag generation (weak ETags), and JSON auto-serialization.
|
|
148
|
+
The validation subsystem provides a zero-dependency schema builder and parser:
|
|
79
149
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
Structured `HttpError` hierarchy (`badRequest`, `unauthorized`, `forbidden`, `notFound`, etc.) with consistent JSON error envelopes and dev-mode formatting.
|
|
150
|
+
- **Type AST**: `TexType` instances represent individual property constraints (`string`, `number`, `boolean`, `date`, `object`, `array`, `enum`, `discriminatedUnion`).
|
|
151
|
+
- **Coercion**: String parameter conversion via `tex.coerce.*` for query and path parameters.
|
|
152
|
+
- **Transformations**: Output reshaping using `.transform((val) => ...)` at the field and object level.
|
|
153
|
+
- **OpenAPI 3.1 Extraction**: Recursive duck typing translates `tex` schemas and external validator schemas (e.g. Zod) directly into OpenAPI 3.1 JSON Schemas.
|
|
85
154
|
|
|
86
155
|
---
|
|
87
156
|
|
|
88
|
-
##
|
|
89
|
-
|
|
90
|
-
- **Security:** `helmet()`, `csrf()`, `hpp()`, `dbSanitize()`, `timeout()`.
|
|
91
|
-
- **Traffic & Performance:** In-memory off-heap `rateLimit()`, `idempotent()` (keyed response caching in off-heap memory), `dedupe()`, and `backpressure()`.
|
|
92
|
-
- **Utilities:** `cors()`, `requestId()`, `requestLogger()`, `serveStatic()`.
|
|
93
|
-
|
|
94
|
-
---
|
|
157
|
+
## 7. Build Pipeline & Manifest Generation
|
|
95
158
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
| Routing & Boundaries | `exisjs/router` | Core runtime |
|
|
101
|
-
| Schema & Validation | `exisjs/validator` (`tex`) | Core runtime |
|
|
102
|
-
| Data Sanitization | `exisjs/sanitize` | Core runtime |
|
|
103
|
-
| Dependency Injection | `exisjs/di` | Core runtime |
|
|
104
|
-
| Core Middleware | `exisjs/middleware` | Core runtime |
|
|
105
|
-
| CLI & Scaffolding | `exisjs/cli` | Core tooling |
|
|
106
|
-
| Database & ORM | `@exisjs/database` | Extracted package |
|
|
107
|
-
| Cache & Redis | `@exisjs/cache` | Extracted package |
|
|
108
|
-
| Background Queues | `@exisjs/queue` | Extracted package |
|
|
109
|
-
| WebSockets | `@exisjs/websocket` | Extracted package |
|
|
110
|
-
| Auth & OAuth | `@exisjs/auth` | Extracted package |
|
|
159
|
+
In production mode:
|
|
160
|
+
1. `exisjs build` compiles TypeScript files using `esbuild`, bundling path aliases (`@/*`).
|
|
161
|
+
2. `RouteScanner` crawls `src/http/*` and writes a static route manifest to `.exis/routes-manifest.js`.
|
|
162
|
+
3. In production (`exisjs start`), the server loads the precompiled manifest for $O(1)$ startup without directory traversals.
|
package/dist/docs/BENCHMARKS.md
CHANGED
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
|
|
19
19
|
| Framework | Req/Sec (median) | Latency avg (ms) | Latency p50 (ms) | Latency p99 (ms) | Errors | Server backend |
|
|
20
20
|
|---|---|---|---|---|---|---|
|
|
21
|
-
| Express |
|
|
22
|
-
| Fastify |
|
|
23
|
-
| Hono |
|
|
24
|
-
| Exis JS |
|
|
21
|
+
| Express | 24742.55 | 3.42 | 3.00 | 5.00 | 0 | n/a |
|
|
22
|
+
| Fastify | 41237.82 | 2.06 | 2.00 | 3.00 | 0 | n/a |
|
|
23
|
+
| Hono | 43640.73 | 2.01 | 2.00 | 3.00 | 0 | n/a |
|
|
24
|
+
| Exis JS | 47436.80 | 1.48 | 1.00 | 3.00 | 0 | uws |
|
|
25
25
|
|
|
26
26
|
### Handler Parity Note
|
|
27
27
|
|
|
@@ -1,44 +1,43 @@
|
|
|
1
|
-
# ExisJS Documentation
|
|
2
|
-
|
|
3
|
-
This directory contains the
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
* **`adapters.mdx`**: How to run ExisJS inside serverless environments or mount it seamlessly alongside Next.js.
|
|
1
|
+
# ExisJS Documentation Content Directory
|
|
2
|
+
|
|
3
|
+
This directory contains the user guides, conceptual explanations, and how-to manuals for ExisJS.
|
|
4
|
+
|
|
5
|
+
Documentation follows the [DiΓ‘taxis Framework](https://diataxis.fr/), separating conceptual overviews, procedural how-to guides, and reference materials.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Content Index
|
|
10
|
+
|
|
11
|
+
### 1. Getting Started & Architecture
|
|
12
|
+
- [`introduction.mdx`](./introduction.mdx): Overview of framework architecture, design decisions, and supported paradigms.
|
|
13
|
+
- [`installation.mdx`](./installation.mdx): Prerequisites, project scaffolding (`npm create exisjs@latest`), and manual setup.
|
|
14
|
+
- [`structure.mdx`](./structure.mdx): Standardized directory layout (`src/http/`, `src/database/`, `src/common/`, `src/config/`, `src/cron/`).
|
|
15
|
+
|
|
16
|
+
### 2. HTTP Routing & Request Pipeline
|
|
17
|
+
- [`routing.mdx`](./routing.mdx): File-system routing conventions (`route.ts`), path parameters, route groups, and handlers.
|
|
18
|
+
- [`controllers.mdx`](./controllers.mdx): Class-based routing, `@Controller` decorators, and parameter mappings.
|
|
19
|
+
- [`decorators.mdx`](./decorators.mdx): Reference guide for all decorators across routing, parameters, pipes, middlewares, security, and lifecycle.
|
|
20
|
+
- [`requests.mdx`](./requests.mdx): Request anatomy (`ExisRequest`), query strings, headers, cookies, and context augmentation.
|
|
21
|
+
- [`responses.mdx`](./responses.mdx): Response helpers, JSON output, HTTP status codes, SSE, and stream handling.
|
|
22
|
+
- [`boundaries.mdx`](./boundaries.mdx): Directory-scoped middleware cascading, hierarchical CORS inheritance, and boundary isolation.
|
|
23
|
+
|
|
24
|
+
### 3. Validation, Dependency Injection & Data
|
|
25
|
+
- [`validation.mdx`](./validation.mdx): Schema validation engine (`tex.*`), parameter coercion, custom validators, and sanitization.
|
|
26
|
+
- [`providers.mdx`](./providers.mdx): Dependency injection, constructor injection, `@Injectable()`, `@Inject()`, and `forwardRef()`.
|
|
27
|
+
- [`modules.mdx`](./modules.mdx): Module encapsulation, `@Module()`, dynamic module registration, and `@Global()` scopes.
|
|
28
|
+
|
|
29
|
+
### 4. Middleware, Security & Operations
|
|
30
|
+
- [`middleware.mdx`](./middleware.mdx): Global, boundary, and route-level middlewares, Express bridge, and execution order.
|
|
31
|
+
- [`security.mdx`](./security.mdx): Security headers (Helmet), CSRF tokens, CIDR IP filtering, parameter pollution, and probe blocking.
|
|
32
|
+
- [`errors.mdx`](./errors.mdx): HTTP exception classes, JSON error payloads, and custom error boundaries.
|
|
33
|
+
- [`cron.mdx`](./cron.mdx): Background task scheduling (`cron()` and `@Cron()`) with drift correction and overlap protection.
|
|
34
|
+
- [`swagger.mdx`](./swagger.mdx): Automatic OpenAPI 3.1 schema extraction, Swagger UI (`/docs`), and JSON documentation endpoints.
|
|
35
|
+
- [`testing.mdx`](./testing.mdx): Test harness (`createTestContext`, `createTestApp`), mocking utilities (`ex`), and CLI test runner.
|
|
36
|
+
- [`config.mdx`](./config.mdx): Global configuration options in `exis.config.ts`, lifecycle phases, clustering, and file watcher settings.
|
|
37
|
+
- [`exisjs-mcp.mdx`](./exisjs-mcp.mdx): Model Context Protocol (MCP) server integration for IDE AI assistants.
|
|
38
|
+
|
|
39
|
+
### 5. CLI Tooling (`cli/`)
|
|
40
|
+
- [`cli/overview.mdx`](./cli/overview.mdx): CLI architecture and runtime execution.
|
|
41
|
+
- [`cli/usage.mdx`](./cli/usage.mdx): Basic usage and script execution.
|
|
42
|
+
- [`cli/commands.mdx`](./cli/commands.mdx): Reference for all CLI commands (`dev`, `build`, `start`, `routes`, `test`, `doctor`, `init`).
|
|
43
|
+
|