Goravel (github.com/goravel/framework) is the framework core package, not an application.
Application scaffold: goravel/goravel.
go test # unit tests
cd tests && go test ./... # integration tests
go tool mockery # regenerate mocks
golangci-lint run # lint- Main pattern:
contracts/-> module implementation ->facades/facades.go. - Each module uses
service_provider.gowith:Register(app)for bindingsBoot(app)for post-registration setupRelationship()for dependency order (ServiceProviderWithRelations)
- IoC container:
foundation/container.go(Bind,Singleton,BindWith,Instance,Make). - Binding registry:
contracts/binding/binding.go.
contracts/: public interfaces.foundation/: app bootstrap, container, provider repository.facades/: static-style service access.mocks/: generatedtestifymocks.support/: shared utilities.testing/: test helpers and framework.tests/: integration test module.packages/: package development support.
- Route:
goravel/gin,goravel/fiber - Database/ORM:
goravel/mysql,postgres,sqlite,sqlserver - Cache/Session/Queue:
goravel/redis - Storage:
goravel/s3,oss,cos,minio
- Use
anyinstead ofinterface{}. - Never edit
mocks/directly; rungo tool mockeryto regenerate. - Follow standard Go formatting/naming; add comments where logic isn't self-evident. Go version is in go.mod.
- Never create errors inline in logic (
fmt.Errorf,errors.New, etc.). Declare all errors as named variables inerrors/list.gousing the framework'sNew(...)constructor. This centralises error messages to support future i18n.
When writing tests, use the rules in .agents/prompts/tests.md for guidance.