Documentation
Project Structure
What goclean generates and where things live.
A newly generated project looks like this:
my-saas
my-saas/
├── cmd/
│ └── api/
├── internal/
│ ├── domain/
│ ├── usecase/
│ ├── delivery/
│ └── infrastructure/
├── migrations/
├── config/
├── pkg/
├── Dockerfile
├── docker-compose.yml
├── Makefile
└── go.modDirectories
cmd/api— the API entry point. Loads config, wires dependencies, starts the server.internal/domain— entities and repository interfaces.internal/usecase— application business rules.internal/delivery— HTTP handlers, DTOs and routes.internal/infrastructure— database, GORM repositories, logging.migrations— database migrations.config— Viper configuration.pkg— small reusable packages.