Skip to content

Minimal Example

A minimal API demonstrating VentureKit’s core features: layered config, file-based routing, and the unified handler.

Source: examples/minimal/

minimal/
├── config/
│ ├── base.ts # Project identity
│ ├── security.ts # OAuth scopes, app clients
│ ├── dev.ts # Dev environment (nano)
│ ├── stage.ts # Staging environment
│ └── prod.ts # Production environment
├── src/routes/
│ ├── health/get.ts # GET /health (public)
│ └── echo/post.ts # POST /echo (public, 201)
├── vk.config.ts
└── package.json
  • Layered configuration — base, security, and per-environment configs
  • Presetsnano for dev, micro for staging, medium for production
  • Data safetyrelaxed / standard / strict per environment
  • File-based routing — routes auto-discovered from src/routes/
  • Handler — public endpoints (no scopes)
  • Auto status codes — GET → 200, POST → 201

Public health check:

Terminal window
curl http://localhost:3000/health
{ "status": "healthy", "timestamp": "2026-03-10T00:00:00.000Z", "requestId": "..." }

Echoes the request body (returns 201 Created):

Terminal window
curl -X POST http://localhost:3000/echo \
-H "Content-Type: application/json" \
-d '{"message": "Hello, VentureKit!"}'
Terminal window
cd examples/minimal
npm install
vk dev