İçindekiler
cp .env.example .env
go run ./cmd/migrate up
go run ./cmd/seed
go run ./cmd/server
| Adres | Açıklama |
|---|---|
| http://localhost:8080/ | Web / panel |
| http://localhost:8080/api/v1 | REST API |
| http://localhost:8080/docs | Swagger UI |
| http://localhost:8080/openapi.yaml | OpenAPI 3.1 |
Seed admin (geliştirme): [email protected] / ZATRANO
Proje yapısı
cmd/ server, migrate, seed
internal/
domain/ entity, VO, repository portları
application/ use-case / CQRS
adapters/
http/ JSON API (Fiber)
goui/ panel sayfaları
persistence/ sqlc + postgres repo
infrastructure/ config, güvenlik, e-posta, SMS, ödeme, outbox…
bootstrap/ composition root (Build + wire_*.go)
pkg/ rbac, recipients, tabular, i18n, validation…
migrations/ 000001_schema + 000002_seed
db/queries/ sqlc kaynak SQL
api/openapi.yaml API sözleşmesi
Bağımlılık yönü: domain ← application ← adapters; infrastructure dışarıda; hepsi bootstrap içinde bağlanır.
İlk okuma: docs/READING.md — klasör haritası, isim sözlüğü, golden path (user list + login).
Geliştirme
go test ./...
go test -race ./...
golangci-lint run
sqlc generate
CI (.github/workflows/ci.yml): lint, race test, govulncheck, gosec, build.
İlk okuma: Okuma rehberi — klasör haritası, isim sözlüğü, golden path.