@@ -18,29 +18,39 @@ Svalinn is a Deno-based HTTP gateway that validates container operation requests
1818
1919== Project Status
2020
21+ **Integration Complete (90%)** -- Core modules implemented and wired together (2026-01-25)
22+
2123[cols="1,1,3",options="header"]
2224|===
2325|Component |Status |Description
2426
2527|*Edge Gateway*
26- |Complete
27- |Hono-based HTTP server with JSON Schema validation (Deno)
28+ |✅ Complete
29+ |Hono-based HTTP server with JSON Schema validation (ReScript/ Deno, 400+ lines )
2830
2931|*Vörðr Integration*
30- |Complete
31- |MCP/JSON-RPC client delegating to Vörðr
32+ |✅ Complete
33+ |MCP client delegating to Vörðr via JSON-RPC 2.0 (ReScript, 330+ lines)
3234
3335|*Policy Engine*
34- |Complete
35- |Configurable allow/deny rules per operation
36+ |✅ Complete
37+ |Gatekeeper policy validation and enforcement (ReScript, 330+ lines)
3638
3739|*Authentication*
38- |Complete
39- |OAuth2/OIDC + JWT token validation middleware
40+ |✅ Complete
41+ |OAuth2/OIDC + JWT + API keys + mTLS middleware (ReScript, 430+ lines)
42+
43+ |*Request Validation*
44+ |✅ Complete
45+ |JSON Schema validation using Ajv (ReScript, 230+ lines)
4046
4147|*svalinn-compose*
42- |Complete
48+ |⏳ Planned
4349|Compose-compatible multi-container orchestration CLI
50+
51+ |*Total Implementation*
52+ |2,770+ lines
53+ |Type-safe ReScript compiled to JavaScript
4454|===
4555
4656== Architecture
@@ -218,20 +228,37 @@ x-svalinn:
218228----
219229svalinn/
220230├── src/
221- │ ├── main.ts # HTTP gateway entry point
222- │ ├── gateway/ # Request routing
223- │ ├── validation/ # JSON Schema validation
224- │ ├── policy/ # Policy engine (evaluator, store)
225- │ ├── auth/ # OAuth2, JWT middleware
226- │ ├── compose/ # svalinn-compose orchestrator
227- │ ├── integrations/ # Cerro Torre, verified-container-spec
228- │ ├── vordr/ # Vörðr MCP client
229- │ ├── mcp/ # MCP tool definitions
230- │ └── tests/ # Test suite
231- ├── spec/ # JSON Schema definitions
232- │ └── schemas/ # gateway-*.json, container-*.json
233- ├── Justfile # Build commands
234- └── deno.json # Deno configuration
231+ │ ├── gateway/
232+ │ │ ├── Gateway.res # HTTP server with Hono (400+ lines)
233+ │ │ └── Types.res # Type definitions
234+ │ ├── auth/
235+ │ │ ├── Types.res # Auth types, RBAC roles (270 lines)
236+ │ │ ├── JWT.res # JWT verification, JWKS caching (370+ lines)
237+ │ │ ├── OAuth2.res # OAuth2 flows (230+ lines)
238+ │ │ └── Middleware.res # Hono auth middleware (430+ lines)
239+ │ ├── mcp/
240+ │ │ └── McpClient.res # Vörðr MCP client (330+ lines)
241+ │ ├── validation/
242+ │ │ └── Validation.res # JSON Schema validation (230+ lines)
243+ │ ├── policy/
244+ │ │ └── PolicyEngine.res # Gatekeeper policies (330+ lines)
245+ │ └── bindings/
246+ │ ├── Hono.res # Hono framework bindings (90 lines)
247+ │ ├── Deno.res # Deno runtime bindings
248+ │ └── Fetch.res # Fetch API bindings
249+ ├── tests/
250+ │ └── integration_test.res # Integration test suite (330+ lines)
251+ ├── spec/
252+ │ └── schemas/ # JSON Schema definitions
253+ │ ├── gateway-run-request.v1.json
254+ │ ├── gateway-verify-request.v1.json
255+ │ ├── gatekeeper-policy.v1.json
256+ │ └── ...
257+ ├── INTEGRATION-STATUS.md # Current integration progress
258+ ├── SEAM-ANALYSIS.md # Integration seam analysis
259+ ├── Justfile # Build commands
260+ ├── rescript.json # ReScript configuration
261+ └── deno.json # Deno configuration
235262----
236263
237264== Integration with Svalinn Ecosystem
@@ -278,10 +305,16 @@ just precommit # fmt + lint + check + test
278305
279306=== Contributing
280307
281- * *Language Policy*: Deno/TypeScript only (no Node, npm, bun)
308+ * *Language Policy*: ReScript (compiles to JavaScript) + Deno runtime (no Node, npm, bun, TypeScript)
309+ * *Type Safety*: All code written in ReScript for compile-time type checking
282310* *Security*: HTTPS in production, no hardcoded secrets
283311* *Licensing*: PMPL-1.0 OR PMPL-1.0-or-later, SPDX headers required
284312
313+ **Implementation Language:**
314+ - Primary: ReScript (`.res` files → `.res.js`)
315+ - Runtime: Deno 2.0+ (executes compiled JavaScript)
316+ - Bindings: ReScript bindings for Hono, Deno APIs, Web Crypto, Ajv
317+
285318== License
286319
287320This project is dual-licensed under:
0 commit comments