A decentralized loan service written in Go, using the Echo framework and OpenAPI for handling requests. It provides functionality for creating and managing cryptocurrency-backed loans.
- Create loans with a specified amount and collateral.
- Repay loans and handle repayments securely.
- Implements Clean Architecture principles for maintainability.
- Uses
zapfor structured logging. - Interacts with blockchain (e.g., Ethereum) via
go-ethereum.
The project follows the Clean Architecture pattern, separating concerns into different layers:
internal/entity: Contains core domain models likeLoan.internal/service: Business logic for handling loans.internal/handler: API handlers for processing HTTP requests.internal/api: OpenAPI-generated code for request/response types and server interfaces.cmd: Entry point of the application.
- Go 1.23 or later
- Docker (optional, for running external services like a database or blockchain nodes)
golangci-lintfor linting
git clone git@github.com:yuzic/loan.git
cd loan