TypeScript HTTP Service
Scaffolds a production-ready TypeScript HTTP service using the Hono framework. Ships with structured request logging, error handling, Zod request validation, and OpenTelemetry instrumentation (traces + metrics). Optional Docker and Docker Compose configurations. The template is auth-neutral and persistence-neutral — stack `module-auth-ts` alongside when you need authentication, and `module-database-ts` when you need a database layer.
| Name | ts-service |
| Version | 0.1.0 |
| Category | applications |
| License | Apache-2.0 |
| Persona | engineering |
| Tags | typescript, hono, api, service, rest |
| Source | templates/ts-service |
Render it
Three front doors, one catalog. Pick whichever suits the caller.
# CLI
npx @nanohype/sdk render ts-service --out ./my-app
# SDK
import { LocalSource, renderTemplate } from "@nanohype/sdk";
const result = await renderTemplate(source, "ts-service", variables);
# MCP — from an agent
get_template({ name: "ts-service" })Prerequisites
| Tool | Version | Why |
|---|---|---|
node | >=22 | Node.js runtime for the HTTP service |
Variables
Required
ProjectNamestring- Kebab-case project name, used as package name and directory Must be lowercase kebab-case starting with a letter.
Optional
Descriptionstring — defaults toA TypeScript HTTP service- Short project description for package.json and README
Frameworkstring — defaults tohono- HTTP framework (hono is default; extensible to express, fastify)
IncludeDockerbool — defaults totrue- Include Dockerfile and docker-compose.yml
What it produces
46 files. Placeholder names such as __APP_NAME__ are what the renderer substitutes into.
.dockerignore
.env.example
.github/workflows/ci.yml
.gitignore
biome.json
docker-compose.yml
Dockerfile
drizzle/.gitkeep
load-test/k6/config.json
load-test/k6/script.js
load-test/README.md
package.json
README.md
src/__tests__/errors.test.ts
src/__tests__/health.test.ts
src/__tests__/helpers.ts
src/__tests__/idempotency.test.ts
src/__tests__/integration.test.ts
src/__tests__/mask.test.ts
src/__tests__/middleware.test.ts
src/__tests__/validate.test.ts
src/app.ts
src/bootstrap.ts
src/config.ts
src/domain/errors.ts
src/domain/types.ts
src/index.ts
src/metrics.ts
src/middleware/error-handler.ts
src/middleware/idempotency.ts
src/middleware/logger.ts
src/middleware/mask.ts
src/middleware/metrics.ts
src/middleware/request-id.ts
src/middleware/validate.ts
src/openapi.ts
src/routes/example.ts
src/routes/health.ts
src/routes/openapi.ts
src/routes/readiness.ts
src/schemas/example.ts
src/services/example.ts
src/telemetry/index.ts
src/types/hono.d.ts
tsconfig.json
vitest.config.tsComposes with
- Pairs with
module-auth-ts - Pairs with
module-database-ts - Pairs with
k8s-deploy - Nests inside
monorepo
Composites that use it
- AI Chatbot — Full-stack AI chatbot with agentic loop, HTTP service, authentication, evaluation harness, and deployment..
- AI Platform — Full AI platform with HTTP service, LLM gateway, vector store, data pipeline, auth, billing, and monitoring.
- Background Processor — Async job processing service with queue, database, storage, observability, and deployment.
- Document Intelligence — Document search and question-answering system with RAG pipeline, HTTP service, file storage, database, and deployment..
- Enterprise AI Infrastructure — Full enterprise AI stack with agents, tool servers, safety guardrails, evaluation, prompt management, observability, and Kubernetes deployment..
- Multi-Agent System — Multi-agent architecture with A2A protocol peers, MCP tool servers, and an orchestrating agent.
- Production API Service — Production-grade TypeScript API service with auth, database, caching, rate limiting, background jobs, observability, and deployment..
- RAG-Powered Agent — AI agent that uses retrieval-augmented generation as a tool.