Adnan Zahir bb4e5d6e3e Merge branch 'development' into 'production'
Development

See merge request mbugroup/lti-api!469
2026-04-24 14:20:43 +07:00
2026-03-03 05:34:21 +00:00
:
2026-04-23 21:32:20 +07:00
2026-04-17 21:26:56 +07:00
2025-09-25 10:47:28 +07:00
2026-01-11 19:41:21 +07:00
2026-01-11 19:41:21 +07:00
2026-02-07 00:14:58 +07:00

Lumbung Telur Indonesia ERP API (lti-api)

RESTful API for Lumbung Telur Indonesia ERP, built with Go, Fiber, GORM and PostgreSQL.


📦 Tech Stack

  • Go + Fiber — Web framework
  • GORM — ORM for PostgreSQL
  • PostgreSQL — Relational database
  • go-playground/validator — Input validation
  • JWT — Authentication
  • Logrus — Logging
  • Fiber middleware — Rate limiting, CORS, recovery, logger
  • Air — Hot reload for development
  • Docker + Docker Compose — Containerization
  • golang-migrate — Database migration tool

🚀 Getting Started

1. Clone Project

git clone https://gitlab.com/mbugroup/lti-api.git
cd lti-api

2. Install Dependencies

go mod tidy

3. Configure Environment

Copy .env.example to .env and adjust the variables (e.g. DATABASE_URL, JWT secrets, etc).

cp .env.example .env

5. Setup Docker

Run initial docker.

make docker-local

4. Migrate Database

Run initial migrations and generate views.

make migrate-up

5. Run App

Run project via Docker

6. Create New Module

make gen feat=user

output:

cmd/
├── api/
│   └── main.go            # Application entrypoint (initialize Fiber, load config, connect DB, register route)

internal/
├── config/                # App config (env loader, logger, app settings)
│
├── database/              # Database connection + migration setup
│
├── middleware/            # Global Fiber middleware (auth, logger, recovery, rate limiting)
│
├── modules/               # Feature modules (users, products, suppliers, etc.)
│   ├── <module>/
│   │   ├── controllers/   # HTTP handler layer (receive request, call service, return response)
│   │   ├── dto/           # Data Transfer Objects (request & response payloads, separate from models)
│   │   ├── models/        # GORM models (represent database tables/entities)
│   │   ├── repositories/  # Data access layer (queries to DB, CRUD abstraction)
│   │   ├── services/      # Business logic layer (process rules, orchestrate repository calls)
│   │   ├── validation/    # Request validation (custom rules per module)
│   │   ├── module.go      # Module bootstrapper (wire controller, service, repository together)
│   │   └── route.go       # Module route (register module routes into Fiber app)
│
├── repository/            # Shared repositories (reusable DB access layer across multiple modules)
│
├── response/              # Standardized API responses (success, error, pagination)
│
├── utils/                 # Helper functions (JWT, hashing, constants, enums, etc.)
│
├── validation/            # Shared request validation structs & rules
│
└── route/                 # Central route aggregator (load all module routes into main app)

Author

IT Development PT Mitra Berlian Unggas Group

📃 License

This project is private. All rights reserved.

mr test Sat 7 Feb 2026 00:14:58 WIB

S
Description
No description provided
Readme 90 MiB
Languages
Go 95.8%
PLpgSQL 3.8%
Go Template 0.3%