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.
-
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
- Ensure you have Go (version 1.24 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.
-
Clone this repository:
git clone https://github.com/dedyf5/resik.git cd resik go mod tidy -
(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.
Copy .env.example to .env and modify the values:
cp .env.example .envBefore 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 upgo run main.go restgo run main.go grpcgo run main.go --help- Server Address:
- Default:
http://localhost:8081 - Configurable in
.envusing:REST_APP_PUBLIC_SCHEMA,REST_APP_PUBLIC_HOST,REST_APP_PUBLIC_PORT.
- Default:
- Swagger UI:
- Accessible at the server address (e.g., http://localhost:8081/docs/swagger/index.html) after running the app.
- Server Address:
- Default:
grpc://localhost:7071 - Configurable in
.envusing:GRPC_APP_HOST,GRPC_APP_PORT.
- Default:
- API Definitions (Proto Files):
You can run the tests using the following command:
make testgo test ./...- Dedy F. Setyawan (Author)