{"id":40990995,"url":"https://github.com/rom8726/airo","last_synced_at":"2026-01-22T07:40:05.382Z","repository":{"id":292742145,"uuid":"811911606","full_name":"rom8726/airo","owner":"rom8726","description":"GoLang project structure generator","archived":false,"fork":false,"pushed_at":"2025-11-07T20:20:56.000Z","size":1590,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-07T22:18:36.788Z","etag":null,"topics":["generator","golang","project","scaffold"],"latest_commit_sha":null,"homepage":"https://rom8726.github.io/airo.html","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rom8726.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-07T14:47:20.000Z","updated_at":"2025-11-07T20:21:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"41c65f42-a891-4570-b440-778f22ee2def","html_url":"https://github.com/rom8726/airo","commit_stats":null,"previous_names":["rom8726/airo"],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/rom8726/airo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rom8726%2Fairo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rom8726%2Fairo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rom8726%2Fairo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rom8726%2Fairo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rom8726","download_url":"https://codeload.github.com/rom8726/airo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rom8726%2Fairo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28658109,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["generator","golang","project","scaffold"],"created_at":"2026-01-22T07:40:05.214Z","updated_at":"2026-01-22T07:40:05.351Z","avatar_url":"https://github.com/rom8726.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# airo\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/rom8726/airo.svg)](https://pkg.go.dev/github.com/rom8726/airo)\n[![Go Report Card](https://goreportcard.com/badge/github.com/rom8726/airo)](https://goreportcard.com/report/github.com/rom8726/airo)\n[![Coverage Status](https://coveralls.io/repos/github/rom8726/airo/badge.svg?branch=main)](https://coveralls.io/github/rom8726/airo?branch=main)\n\n[![boosty-cozy](https://gideonwhite1029.github.io/badges/cozy-boosty_vector.svg)](https://boosty.to/dev-tools-hacker)\n\nSpec-first Golang project scaffold generator\n\n\u003cimg src=\"./docs/logo.png\" style=\"max-width: 500px\" alt=\"Logo\"/\u003e\n\n## Key features\n- **OpenAPI first** – start with a spec, everything else is generated around it.\n- **Code generation with [ogen-go/ogen]** – generation of request/response models \u0026 router.\n- **Dependency injection via [rom8726/di]** – constructor-based DI.\n- **Batteries included**\n  - PostgreSQL integration\n  - MySQL integration\n  - MongoDB integration\n  - Redis integration (optional)\n  - Kafka integration (optional)\n  - Memcache (optional)\n  - Etcd (optional)\n  - Aerospike (optional)\n  - ElasticSearch (optional)\n  - Nats (optional)\n  - RabbitMQ (optional)\n  - Database migrations support\n  - Database transactions manager (PostgreSQL and MySQL)\n  - Library for working with Kafka\n  - Testy **[rom8726/testy]** integration needed code for functional tests (for PostgreSQL and MySQL)\n  - Health-check, Prometheus metrics, pprof endpoints\n  - Structured logging with slog\n- **Docker-ready** – `Dockerfile`, `docker-compose.yml`, `Makefile` are scaffolded for you.\n- **WebSockets + JWT Auth** - support for WebSockets with JWT authentication.\n- **Static analysis out of the box** – `.golangci.yml` with commonly used linters.\n- **CLI powered by [spf13/cobra]**\n- **12-factor config** – environment variables parsed with `envconfig`, `.env` supported.\n\n## Quick start\n```bash\n# Install the generator binary\ngo install github.com/rom8726/airo/cmd/airo@latest\n\n# Run the TUI\nairo generate\n```\nThe wizard will ask:\n\n1. Project name (folder will be created in the current directory)\n2. Go module path (e.g. `github.com/acme/myservice`)\n3. Path to OpenAPI specification (YAML or JSON)\n4. Database choice (**PostgreSQL** \\ **MySQL** \\ **MongoDB**)\n5. Additional infrastructure (**Redis** \\ **Kafka**)\n\nScreenshots:\n\n\u003cimg src=\"./docs/wizard1.png\" style=\"max-width: 350px; width: 350px; \" alt=\"Enter project name\"/\u003e\n\n\u003cimg src=\"./docs/wizard2.png\" style=\"max-width: 350px; width: 350px; \" alt=\"Enter module name\"/\u003e\n\n\u003cimg src=\"./docs/wizard3.png\" style=\"max-width: 350px; width: 350px; \" alt=\"Enter OpenAPI specification file path\"/\u003e\n\n\u003cimg src=\"./docs/wizard4.png\" style=\"max-width: 350px; width: 350px; \" alt=\"Choose database type\"/\u003e\n\n\u003cimg src=\"./docs/wizard5.png\" style=\"max-width: 350px; width: 350px; \" alt=\"Choose additional infrastructure\"/\u003e\n\n\u003cimg src=\"./docs/wizard6.png\" style=\"max-width: 350px; width: 350px; \" alt=\"Confirmation\"/\u003e\n\nAfter confirmation, the scaffold is generated.  \nInfrastructure-specific sections (PostgreSQL container, Redis container, volumes, healthchecks, etc.) are automatically injected into `docker-compose.yml`.\n\n### Minimal OpenAPI example\nIf you don’t have a spec yet, start with the included template `example/server.yml` or something like this:\n```yaml\nopenapi: 3.1.0\ninfo:\n  title: Example API\n  version: 1.0.0\npaths:\n  /ping:\n    get:\n      summary: Ping-pong endpoint\n      operationId: ping\n      responses:\n        '200':\n          description: pong\n          content:\n            text/plain:\n              schema:\n                type: string\n```\n## Generated layout\n```\nmyservice/\n├── cmd/\n│   └── server/             # server command\n├── internal/\n│   ├── api/\n│   │   └── rest/           # your handlers (interfaces generated by ogen)\n│   ├── generated/          # ogen output (do not edit)\n│   ├── config/             # env-config structs \u0026 helpers\n│   └── app.go              # app, db, redis, etc.\n├── pkg/                    # reusable packages\n├── dev/\n│   ├── docker-compose.yml  # app + selected infra (PostgreSQL, Redis…)\n│   ├── compose.env.example # config file example for docker compose environment\n│   ├── config.env.example  # config file example for local environment\n│   └── dev.mk              # Makefile commands for operate docker compose\n├── main.go\n├── .golangci.yml           # linter configuration\n├── Dockerfile              # multi-stage build (scratch runtime)\n├── Makefile                # common targets: build, run, test, lint, etc.\n└── go.mod\n```\n## Running the generated service\n\n### 1. With Go directly\nCreate/adjust `.env` (or pass variables directly):\n```dotenv\nAPI_SERVER_ADDR=:8080\nTECH_SERVER_ADDR=:9090\n\nPOSTGRES_USER=postgres\nPOSTGRES_PASSWORD=secret\nPOSTGRES_HOST=localhost:5432\nPOSTGRES_DATABASE=mydb\n\nREDIS_HOST=localhost\nREDIS_PORT=6379\nREDIS_DB=0\n```\n\n```bash\ncd myservice\ngo run ./cmd/server --env-file=.env\n```\n### 2. Using Make \u0026 Docker\nMost repetitive commands are wrapped into make targets:\n```bash\n# Build the binary for your host\nmake build\n\n# Run unit tests \u0026 linters\nmake test          # go test ./...\nmake lint          # golangci-lint run\n\n# Build container image and start entire stack\nmake dev-up    # equivalent to: docker compose up\n```\n`make dev-up` relies on the generated `docker-compose.yml`.  \nOnly the services you selected in the wizard will be present (e.g. if you skipped Redis, the file will contain only the app + PostgreSQL).\n\nStop and clean resources:\n```bash\nmake dev-down  # docker compose down\n```\n## Available endpoints\n\n- `GET :8080/ping` – from your OpenAPI spec\n- `GET :8081/health` – liveness probe\n- `GET :8081/metrics` – Prometheus metrics\n- `GET :8081/debug/pprof/*` – pprof profiles\n\n---\n\nApache-2.0 License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2From8726%2Fairo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2From8726%2Fairo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2From8726%2Fairo/lists"}