📄️ Overview
Tinh Tinh is a progressive Go framework designed to help developers build efficient, scalable, and enterprise-grade server-side applications. Its architecture is inspired by modern backend frameworks, providing a modular and extensible foundation with a strong focus on testability, maintainability, and developer productivity.
📄️ Module
A Module in Tinh Tinh is a fundamental building block that encapsulates a cohesive set of controllers, providers (services), middleware, guards, and configuration. Modules enable you to organize your code into logical, reusable, and testable units, supporting both small and large-scale applications.
📄️ Controller
A Controller in Tinh Tinh defines a set of route handlers responsible for processing incoming HTTP requests, extracting and validating data, invoking business logic, and returning responses. Controllers are grouped within modules and serve as the main entry point for API logic.
📄️ Provider
A Provider in Tinh Tinh is the core mechanism for dependency injection. Providers can represent values, structs, or factory functions. They are registered within modules and can be injected into controllers, other providers, or exported/imported across modules.
📄️ Middleware
Tinh Tinh middleware lets you run logic before your route handlers, at the controller or module level, or selectively with Consumers.
📄️ Pipe
A pipe in Tinh Tinh is a middleware mechanism for validating and transforming incoming request data before it reaches your controller logic. Pipes ensure that all data passed to your handlers is type-safe, validated, and ready to use—reducing boilerplate and improving application reliability.
📄️ Guard
Guards in Tinh Tinh help you control access to routes by defining logic that determines whether a request should be allowed to proceed.
📄️ Interceptor
An interceptor in Tinh Tinh is a middleware mechanism for transforming or shaping response data after your controller logic runs—but before the response is sent to the client. Interceptors allow you to enforce global response formats, clean up or mask fields, or benchmark response handling.