> For the complete documentation index, see [llms.txt](https://elchemist.gitbook.io/tinh-tinh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://elchemist.gitbook.io/tinh-tinh/core-fundamental/overview.md).

# Overview

<figure><img src="/files/A8aON5ZWX6ZBwGg3JYVb" alt=""><figcaption></figcaption></figure>

TinhTinh following modular architecture, with each module incluse components:

* Controllers (as Router): for registry router to handler http
* Providers: Instance with name only available in module have registered.
* Middlewares: common middleware will apply for all controller in module.

### Installation

First of all, download and install Go `1.22` or higher is required.

Init your go module:

```
go mod init your-package
```

Installation is done use the go get command:

```bash
go get -u github.com/tinh-tinh/tinhtinh
```

Install cli to easy to init project.&#x20;

```bash
go install github.com/tinh-tinh/tinhtinh-cli@latest
```

After then&#x20;

```
tinhtinh-cli init
```

The structure folder will be in:

<figure><img src="/files/d6WRGqGSz9qeTrYSPpHj" alt=""><figcaption></figcaption></figure>

Here's a brief overview of those core files:

* `app_controller.go`: A basic controller with a simple route.
* `app_service.go`: A basic service with crud method.
* `app_module.go`: The root module of the application.
* `main.go`: the entry file of the application which uses the core function \`CreateFactory\` to create a application instance.
