forked from ebhomengo/niki
Reviewed-on: ebhomengo/niki#220 Reviewed-by: hossein <h.nazari1990@gmail.com> |
||
|---|---|---|
| adapter | ||
| benefactorapp | ||
| config | ||
| contract/sms | ||
| delivery/http_server | ||
| deploy | ||
| docs | ||
| entity | ||
| logger | ||
| param | ||
| pkg | ||
| repository | ||
| service | ||
| validator | ||
| vendor | ||
| .env.example | ||
| .gitignore | ||
| .golangci.yml | ||
| .mise.toml | ||
| .mockery.yaml | ||
| Dockerfile | ||
| Makefile | ||
| README.md | ||
| config.yml | ||
| docker-compose.yaml | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
README.md
Niki
Prerequisites
- Go 1.25.4 (Ensure your Go version matches this requirement)
- Docker 20.10+ (or higher)
- Git
Installation
1. Configure Go Module Mirror
To accelerate dependency downloads, set the Go module mirror to Megan (Iranian Go mirror):
https://megan.ir/hub/go
2. Install Dependencies
go mod tidy
go mod vendor
3. Configure Environment
Copy the example environment file and customize it:
cp .env.example .env
Running the Application
1. Start Services
Launch the database and Redis services using Docker Compose:
docker compose up -d
🌐 Docker images are sourced from Arvan Cloud's Docker repositories. Ensure your environment has access to these repositories.
2. Apply Database Migrations
Initialize the database schema:
go run main.go --migrate
3. Start the Application
Run the application in development mode:
go run main.go
✨ Alternative: Use the provided
Makefilefor streamlined execution: Makefile