One feature, one preá
A preá keeps a feature together, from its routes to its rules and its table. Your app is the list of its preás.
Split your app into small preás. Declare what each one needs, and Preá wires it, checks it and serves it.
curl -fsSL https://raw.githubusercontent.com/prea-framework/prea/main/install.sh | sh
prea new todo --with-db
cd todo
prea devA preá is a few plain Go files. You declare its components, and every component asks for what it needs:
var Module = &core.Module{
Name: "task",
Providers: []any{Repository{}, Service{}, Handler{}},
}
type Service struct {
Repo *Repository `inject:""` // Preá fills this when the app starts
}