# tcc | Lucas Zanoni⠀⠀⠀⠀⠀ ⠀╱|、 ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ (˚ˎ 。7 ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ |、˜〵 ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ じしˍ,)ノ | Knowledge Base | Instagit

Trabalho de Conclusão de Curso com título: Transformando APIs em Interfaces Conversacionais: Validação da Abordagem OpenAPI-MCP para Agentes Baseados em IA

GitHub Stars: 4

Repository: https://github.com/castrozan/tcc

---

## Articles

### [How to Deploy a Hono.js Application to Production: Complete Guide for the castrozan/tcc Repository](/castrozan/tcc/how-to-deploy-honojs-application-production)

Deploy your Hono.js application to production seamlessly. Follow this guide to build, install dependencies, set environment variables, and run your Hono app or Docker container.

- Tags: how-to-guide
- Published: 2026-02-27

### [How to Add New API Documentation Endpoints in castrozan/tcc](/castrozan/tcc/how-to-add-new-api-documentation-endpoints)

Learn to add new API documentation endpoints in castrozan/tcc. Create TypeScript controllers, implement the handle method, and register routes easily.

- Tags: how-to-guide
- Published: 2026-02-27

### [How to Implement Validation Logic in Controllers Using Zod and Chanfana](/castrozan/tcc/how-to-implement-validation-logic-in-controllers)

Learn how to implement validation logic in controllers using Zod and Chanfana. Define a Zod schema and use this.getValidatedData() for automatic request parsing and validation.

- Tags: how-to-guide
- Published: 2026-02-27

### [How to Configure the Server Port and Environment Variables in castrozan/tcc](/castrozan/tcc/how-to-configure-server-port-environment-variables)

Learn to configure server port and environment variables in castrozan/tcc using the loadConfig function. Command-line args override env vars, defaulting to port 3000.

- Tags: how-to-guide
- Published: 2026-02-27

### [How to Add Custom Decorators for Middleware Functionality in TypeScript](/castrozan/tcc/how-to-add-custom-decorators-middleware-functionality)

Learn how to add custom decorators for middleware functionality in TypeScript. This guide shows you how to wrap method descriptors with cross-cutting logic for logging, authentication, and more.

- Tags: how-to-guide
- Published: 2026-02-27

### [How to Write Unit Tests for Use Cases in Clean Architecture](/castrozan/tcc/how-to-write-unit-tests-for-use-cases)

Learn how to write unit tests for use cases by mocking repositories and injecting them into your constructor. Isolate and verify business logic effectively.

- Tags: tutorial
- Published: 2026-02-27

### [How Environment Configuration Is Loaded and Used in castrozan/tcc](/castrozan/tcc/how-environment-configuration-loaded-and-used)

Learn how castrozan/tcc loads environment configuration using dotenv and yargs. Discover how typed config objects power server components for efficient development.

- Tags: internals
- Published: 2026-02-27

### [How to Extend the API with New Modules in the MCP-OpenAPI Server: Equipment Example](/castrozan/tcc/how-to-extend-api-with-new-modules)

Extend the MCP-OpenAPI server with new modules like Equipment. Add REST controllers and update the OpenAPI spec to create new callable tools easily.

- Tags: how-to-guide
- Published: 2026-02-27

### [How the tcc Repository Enforces Separation of Concerns Across Domain, Application, Infrastructure, and Presentation Layers](/castrozan/tcc/how-project-structure-separates-concerns)

Discover how the tcc repository enforces separation of concerns across domain, application, infrastructure, and presentation layers using a strict onion architecture. Learn to isolate business logic and orchestrate use cases ef...

- Tags: architecture
- Published: 2026-02-27

### [How to Add New Database Operations Beyond Basic CRUD in Clean Architecture](/castrozan/tcc/how-to-add-new-database-operations-beyond-crud)

Learn how to add custom database operations beyond basic CRUD in castrozan/tcc. Extend repository contracts, implement methods with parameterized SQL, and expose via use-cases and controllers.

- Tags: deep-dive
- Published: 2026-02-27

### [How to Implement Global Error Handling in the Instagit MCP API](/castrozan/tcc/how-to-handle-global-error-handling-api)

Centralize Instagit MCP API errors by assigning a handler to transport.onerror. Capture network failures validation errors and downstream exceptions in one callback.

- Tags: how-to-guide
- Published: 2026-02-27

### [How Response Schemas Are Defined and Returned in the MCP OpenAPI Server](/castrozan/tcc/how-response-schemas-defined-and-returned)

Learn how response schemas are defined and returned by the castrozan/tcc MCP OpenAPI server. Discover how they are derived from OpenAPI specifications and returned as JSON.

- Tags: how-to-guide
- Published: 2026-02-27

### [How to Add New Database Migrations in the TCC Repository](/castrozan/tcc/how-to-add-new-database-migrations)

Learn how to add new database migrations in the castrozan/tcc repository by extending the migrations.ts file with SQL statements and IF NOT EXISTS clauses for idempotency.

- Tags: how-to-guide
- Published: 2026-02-27

### [How Dependency Injection Is Handled for Repositories and Use Cases in the TCC Repository](/castrozan/tcc/how-dependency-injection-handled-repositories-use-cases)

Learn how the TCC repository simplifies dependency injection for repositories and use cases using manual constructor injection and interface-driven design without an IoC container.

- Tags: how-to-guide
- Published: 2026-02-27

### [How OpenAPI Documentation is Auto-Generated from Decorators in the TCC Repository](/castrozan/tcc/how-openapi-documentation-auto-generated-decorators)

Learn how the TCC repository auto-generates OpenAPI documentation from decorators using the chanfana library. Eliminate manual spec files and streamline your API development.

- Tags: how-to-guide
- Published: 2026-02-27

### [How to Add New Controllers in the Castrozan TCC Repository: Complete Pattern Guide](/castrozan/tcc/how-to-add-new-controllers-following-existing-pattern)

Learn to add new controllers in the castrozan tcc repository. Follow this guide to extend OpenAPIRoute, define schemas, use @withErrorHandling, and register your route correctly.

- Tags: how-to-guide
- Published: 2026-02-27

### [How Bearer Authentication is Configured in the OpenAPI Schema](/castrozan/tcc/how-bearer-authentication-configured-openapi-schema)

Learn how to configure bearer authentication in OpenAPI schema using Hono by registering a bearerAuth component for JWT token authorization across all API endpoints.

- Tags: how-to-guide
- Published: 2026-02-27

### [How to Add New Repository Implementations for Different Data Sources in the castrozan/tcc Monorepo](/castrozan/tcc/how-to-add-new-repository-implementations-data-sources)

Learn how to add new repository implementations for different data sources in the castrozan/tcc monorepo. Implement domain interfaces and update index.ts to export your new classes.

- Tags: how-to-guide
- Published: 2026-02-27

### [How DTOs Are Structured and Validated in the Application Layer: A Complete Guide](/castrozan/tcc/how-dtos-are-structured-and-validated-application-layer)

Learn how to structure DTOs as TypeScript classes and validate them using Zod schemas in the presentation layer for efficient data transfer in your application.

- Tags: how-to-guide
- Published: 2026-02-27

### [How to Configure and Initialize the SQLite Database in the Castrozan TCC Project](/castrozan/tcc/how-to-configure-and-initialize-sqlite-database)

Configure and initialize the SQLite database in the Castrozan TCC project. Learn how to set up a singleton client, run DDL migrations, and implement shutdown hooks for seamless database management.

- Tags: how-to-guide
- Published: 2026-02-27

### [Presentation Layer Error Handling Decorator: How It Works in the TypeScript Dummy Apps](/castrozan/tcc/how-error-handling-decorator-works-presentation-layer)

Learn how the presentation layer error handling decorator in TypeScript provides a consistent JSON response for all errors, including validation and runtime exceptions.

- Tags: how-to-guide
- Published: 2026-02-27

### [How to Implement Use Cases Following the Clean Architecture Pattern in TypeScript](/castrozan/tcc/how-to-implement-use-cases-following-clean-architecture)

Learn to implement use cases effectively using the Clean Architecture pattern in TypeScript. This guide covers domain entities, repository ports, dependency injection, and infrastructure wiring for robust applications.

- Tags: how-to-guide
- Published: 2026-02-27

### [How to Add New CRUD Endpoints in Hono.js with OpenAPI: A Complete Guide](/castrozan/tcc/how-to-add-new-crud-endpoints-in-honojs-with-openapi)

Learn to add new CRUD endpoints in Hono.js with OpenAPI. Define entities DTOs use cases repositories controllers and routes for automatic OpenAPI spec generation.

- Tags: how-to-guide
- Published: 2026-02-27

