resik

command module
v0.0.0-...-9475084 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 1 Imported by: 0

README

Resik - Golang Clean Architecture Implementation

Go Version Build Status

Clean Architecture implementation in Golang for building REST and gRPC applications. This project provides various ready-to-use features for creating structured and maintainable applications.

Features

  • Dual Protocol Support

    • REST API
    • gRPC API
  • Core Functionality

    • Multi-language Support (English, Bahasa Indonesia, 日本語)
    • Form Validation
    • JWT Authentication & Authorization
    • Dependency Injection
    • Database Migration Support
    • Structured Logging
  • Developer Experience

    • API Documentation
    • Clean Architecture Implementation
    • Configuration Management

Getting Started

Prerequisites
  • Ensure you have Go (version 1.26 or higher) installed on your system.
  • You will need Make to run build commands.
  • If you plan to work with gRPC definitions, you'll need to install protoc (the Protocol Buffer compiler), protoc-gen-go, and protoc-gen-go-grpc.
  • If you intend to use API documentation generation, make sure you have swag installed.
  • For dependency injection, ensure wire is installed.
Installation
  1. Clone this repository:

    git clone https://github.com/dedyf5/resik.git
    cd resik
    go mod tidy
    
  2. (Optional) Generate necessary files using Make if you intend to modify proto definitions, API documentation, or dependency injection setup:

    make generate
    

    This command will:

    • Generate gRPC files.
    • Generate API documentation.
    • Generate Wire dependency injection code.
Configuration

Copy .env.example to .env and modify the values:

cp .env.example .env
Database Migration

Before running the application for the first time, or after any database schema changes, you need to run the database migrations. Use the following command:

go run main.go migrate up
How to run Resik?
Run REST app
go run main.go rest
Run gRPC app
go run main.go grpc
Help
go run main.go --help

API Documentation

REST API
  • Server Address:
    • Default: http://localhost:8081
    • Configurable in .env using: REST_APP_PUBLIC_SCHEMA, REST_APP_PUBLIC_HOST, REST_APP_PUBLIC_PORT.
  • Swagger UI:
gRPC API
  • Server Address:
    • Default: grpc://localhost:7071
    • Configurable in .env using: GRPC_APP_HOST, GRPC_APP_PORT.
  • API Definitions (Proto Files):

Testing

You can run the tests using the following command:

Using make test
make test
Using go test
go test ./...

Credits

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
app
rest/docs
Package docs Code generated by swaggo/swag.
Package docs Code generated by swaggo/swag.
cmd
core
health/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
merchant/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
transaction/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
user/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
ctx
jwt
log
entities
pkg
hash/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
utils
validator/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL