API Endpoint Template for Backend Agent (Node.js / NestJS) Demonstrates the Router -> Service -> Repository pattern using NestJS, Prisma, and Zod validation. File layout (split into real modules in production): src/modules/resources/
// Source: https://github.com/first-fluke/oh-my-agent | License: MIT | Copyright 2026 Eunkwang Shin, Gahyun Kim // Provided via justclaw.it.com; keep this notice with the code. /** * API Endpoint Template for Backend Agent (Node.js / NestJS) * * Demonstrates the Router -> Service -> Repository pattern * using NestJS, Prisma, and Zod validation. * * File layout (split into real modules in production): * src/modules/resources/ * resources.controller.ts <- this file (controller + decorators) * resources.service.ts <- business logic * resources.repository.ts <- Prisma data access * dto/resource.dto.ts <- Zod schemas + inferred types * resources.module.ts <- DI wiring */ // ----------------------------------------------------------------- ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key