Skip to content

Architecture

Automatically generated structure

The following structure is generated by Ava according to your choices (with or without a database). You can modify it at any time.

Limitations

  • Security management, complex migrations, or unit tests are not included by default.
  • Make sure to adapt the Docker and CI configuration to your environment.

Generated project structure

<service>/
├── cmd/server/main.go
├── internal/
│   ├── api/
│   │   ├── handlers/
│   │   └── routers/
│   ├── configs/
│   ├── server/
│   ├── helpers/
│   ├── db/ (if DB enabled)
│   ├── models/ (if DB enabled)
│   └── repositories/ (if DB enabled)
├── .env
├── .gitignore
├── Dockerfile
├── docker-compose.yaml

How it works

  • cmd/server/main.go: Service entry point.
  • internal/api/routers: Route declarations.
  • internal/api/handlers: HTTP handlers.
  • internal/configs: Configuration loading.
  • internal/server: Gin server initialization.
  • internal/db: PostgreSQL connection and migration (optional).
  • internal/models: GORM models (optional).

Automatic generation

The Ava command creates all these files and folders according to your choices.