{"id":49313388,"url":"https://github.com/ashishkapoor1469/nestgo","last_synced_at":"2026-04-26T14:00:47.869Z","repository":{"id":352252023,"uuid":"1214355855","full_name":"Ashishkapoor1469/Nestgo","owner":"Ashishkapoor1469","description":"NestGo is a modern, scalable, and developer-first backend framework written in Go, inspired by the architecture and developer experience of NestJS.  It brings structured, modular design and powerful CLI tooling into the Go ecosystem—without sacrificing performance or simplicity.","archived":false,"fork":false,"pushed_at":"2026-04-26T13:47:48.000Z","size":11309,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-26T14:00:44.819Z","etag":null,"topics":["framework","go","golang","nestgo"],"latest_commit_sha":null,"homepage":"https://nestgo.vercel.app","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ashishkapoor1469.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2026-04-18T13:12:51.000Z","updated_at":"2026-04-26T13:47:52.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Ashishkapoor1469/Nestgo","commit_stats":null,"previous_names":["ashishkapoor1469/nestgo"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Ashishkapoor1469/Nestgo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ashishkapoor1469%2FNestgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ashishkapoor1469%2FNestgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ashishkapoor1469%2FNestgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ashishkapoor1469%2FNestgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ashishkapoor1469","download_url":"https://codeload.github.com/Ashishkapoor1469/Nestgo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ashishkapoor1469%2FNestgo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32299644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T09:34:17.070Z","status":"ssl_error","status_checked_at":"2026-04-26T09:34:00.993Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["framework","go","golang","nestgo"],"created_at":"2026-04-26T14:00:45.776Z","updated_at":"2026-04-26T14:00:47.860Z","avatar_url":"https://github.com/Ashishkapoor1469.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/logo.png\" alt=\"NestGo Logo\" width=\"100%\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eNestGo\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  A progressive Go framework for building efficient, reliable, and scalable server-side applications.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/Ashishkapoor1469/Nestgo/actions/workflows/ci.yml\"\u003e\n    \u003cimg src=\"https://github.com/Ashishkapoor1469/Nestgo/actions/workflows/ci.yml/badge.svg\" alt=\"CI Status\" /\u003e\n  \u003c/a\u003e\n  \u0026nbsp;\n  \u003ca href=\"https://pkg.go.dev/github.com/Ashishkapoor1469/Nestgo\"\u003e\n    \u003cimg src=\"https://pkg.go.dev/badge/github.com/Ashishkapoor1469/Nestgo.svg\" alt=\"Go Reference\" /\u003e\n  \u003c/a\u003e\n  \u0026nbsp;\n  \u003cimg src=\"https://img.shields.io/badge/version-v0.4.0-blue\" alt=\"Version\" /\u003e\n  \u0026nbsp;\n  \u003cimg src=\"https://img.shields.io/badge/Go-1.22+-00ADD8?logo=go\u0026logoColor=white\" alt=\"Go Version\" /\u003e\n  \u0026nbsp;\n  \u003cimg src=\"https://img.shields.io/badge/license-MIT-22c55e\" alt=\"License MIT\" /\u003e\n\u003c/p\u003e\n\n\u003cbr /\u003e\n\n---\n\n## What is NestGo?\n\nNestGo is an opinionated, modular backend framework for Go — inspired by NestJS — that brings **enterprise-grade architecture** to Go development without sacrificing performance.\n\nIt gives you:\n- **Modular architecture** with automatic dependency resolution\n- **A powerful CLI** (`nestgo`) that scaffolds, generates, and runs your app\n- **Compile-time dependency injection** — no reflection, no magic, full type safety\n- **Built-in middleware**, guards, interceptors, and lifecycle hooks\n- **Production-ready from day one** — not a toy, not a micro-library\n\n---\n\n## Why NestGo?\n\n| Feature | NestGo | Gin | Fiber |\n|---------|:------:|:---:|:-----:|\n| Modular Architecture | ✅ Built-in | ❌ Manual | ❌ Manual |\n| Dependency Injection | ✅ Compile-time | ❌ None | ❌ None |\n| CLI Tooling | ✅ Advanced | ❌ None | ❌ None |\n| Code Generation | ✅ Full CRUD | ❌ None | ❌ None |\n| Architecture Linting | ✅ Built-in | ❌ None | ❌ None |\n| Route Explorer | ✅ Built-in | ❌ None | ❌ None |\n| Migration System | ✅ Built-in | ❌ Manual | ❌ Manual |\n| Hot Reload Dev Server | ✅ Built-in | ❌ None | ❌ None |\n| Performance | ✅ Native Go | ✅ Native Go | ✅ Native Go |\n\n---\n\n## Installation\n\n```bash\ngo install github.com/Ashishkapoor1469/Nestgo/cmd/nestgo@latest\n```\n\nVerify:\n\n```bash\nnestgo version\n# CLI Version:       v0.4.0\n# Framework Version: v0.4.0\n# Go Version:        go1.22.x\n```\n\n---\n\n## Quick Start\n\nThree commands to a running API:\n\n```bash\nnestgo new myapp\ncd myapp\nnestgo dev\n```\n\nYour API is live at **`http://localhost:3000/api`**\n\n```bash\n# Built-in health check — works immediately, no setup needed\ncurl http://localhost:3000/api/health\n# → { \"status\": \"ok\" }\n```\n\n---\n\n## Generate a Resource\n\nThe signature feature of NestGo. One command generates a fully wired CRUD resource:\n\n```bash\nnestgo generate resource users\n```\n\nOutput:\n\n```\n  ✦ Scaffolding resource: users\n\n  ├── internal/modules/users/module.go        # Module with DI wiring\n  ├── internal/modules/users/controller.go    # 5 REST endpoints\n  ├── internal/modules/users/service.go       # Business logic\n  ├── internal/modules/users/dto.go           # Create + Update DTOs\n  ├── internal/modules/users/entity.go        # Data model\n  ├── internal/modules/users/users_test.go    # Table-driven tests\n  └── migrations/1714000000_create_users.sql  # SQL migration\n\n  Next steps:\n    1. Register in app_module.go\n    2. Run migrations: nestgo migration:run\n    3. Test: curl http://localhost:3000/api/users\n```\n\nRegister the module in `internal/modules/app_module.go`:\n\n```go\nImports: []common.Module{\n    \u0026health.HealthModule{},\n    \u0026users.UsersModule{},  // ← add this line\n},\n```\n\nYour CRUD endpoints are now live:\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| `GET` | `/api/users` | List all users (paginated) |\n| `GET` | `/api/users/{id}` | Get user by ID |\n| `POST` | `/api/users` | Create a user |\n| `PUT` | `/api/users/{id}` | Update a user |\n| `DELETE` | `/api/users/{id}` | Delete a user |\n\n---\n\n## Project Structure\n\n```\nmyapp/\n├── cmd/\n│   └── server/\n│       └── main.go               # Application entry point\n├── internal/\n│   ├── config/\n│   │   └── config.go             # Env → typed struct config\n│   └── modules/\n│       ├── app_module.go         # Root module — register features here\n│       └── health/               # Built-in health check module\n│           ├── health_controller.go\n│           └── health_module.go\n├── migrations/                   # SQL migration files\n├── test/                         # Integration tests\n├── .env                          # Environment variables (git-ignored)\n├── .env.example                  # Template env file (commit this)\n├── nestgo.json                   # NestGo project configuration\n├── Makefile                      # make dev / build / test\n└── go.mod\n```\n\n---\n\n## CLI Reference\n\n### Project\n\n```bash\nnestgo new \u003cname\u003e              # Scaffold a new NestGo project\nnestgo dev                     # Start dev server with hot reload\nnestgo dev --port 8080         # Override port\nnestgo build                   # Build production binary (bin/server)\nnestgo build --output bin/api  # Custom output path\nnestgo version                 # Show version info\n```\n\n### Code Generation\n\n```bash\n# Full CRUD resource — the fast path\nnestgo generate resource \u003cname\u003e\n\n# Individual pieces\nnestgo generate module \u003cname\u003e\nnestgo generate controller \u003cname\u003e\nnestgo generate service \u003cname\u003e\nnestgo generate guard \u003cname\u003e\nnestgo generate middleware \u003cname\u003e\nnestgo generate interceptor \u003cname\u003e\nnestgo generate dto \u003cname\u003e\nnestgo generate test \u003cname\u003e\n\n# Auth module (JWT + bcrypt)\nnestgo generate auth\n```\n\n### Database\n\n```bash\nnestgo migration:create \u003cname\u003e   # Create a new .sql migration file\nnestgo migration:run             # Run all pending migrations\nnestgo migration:rollback        # Rollback the last migration\nnestgo migration:status          # Show pending / applied migrations\n```\n\n### Diagnostics\n\n```bash\nnestgo doctor      # Full health check with actionable fix suggestions\nnestgo routes      # List all registered routes (parsed from AST)\nnestgo graph       # Visualize module dependency tree\nnestgo lint-arch   # Detect clean architecture violations\n```\n\n---\n\n## Configuration\n\nNestGo maps environment variables to a typed config struct at startup — no manual parsing:\n\n```go\n// internal/config/config.go\ntype AppConfig struct {\n    Port        string `env:\"PORT\"         default:\"3000\"`\n    Environment string `env:\"APP_ENV\"      default:\"development\"`\n    DBHost      string `env:\"DB_HOST\"      default:\"localhost\"`\n    DBPort      int    `env:\"DB_PORT\"      default:\"5432\"`\n    DBUser      string `env:\"DB_USER\"      default:\"postgres\"`\n    DBPassword  string `env:\"DB_PASSWORD\"`\n    DBName      string `env:\"DB_NAME\"`\n    JWTSecret   string `env:\"JWT_SECRET\"   default:\"change-me\"`\n}\n```\n\nYour `.env` file:\n\n```env\nPORT=3000\nAPP_ENV=development\n\nDB_HOST=localhost\nDB_PORT=5432\nDB_USER=postgres\nDB_PASSWORD=your-password\nDB_NAME=myapp\n\nJWT_SECRET=change-me-in-production\n```\n\n---\n\n## Migration System\n\n```bash\n# 1. Create a migration\nnestgo migration:create add_users_table\n# → creates migrations/1714000000_add_users_table.sql\n\n# 2. Run pending migrations\nnestgo migration:run\n\n# 3. Check status\nnestgo migration:status\n\n# 4. Rollback if needed\nnestgo migration:rollback\n```\n\n---\n\n## Examples\n\nFully working examples in the [`/examples`](./examples) directory:\n\n| Example | Description | Run |\n|---------|-------------|-----|\n| [`basic-api`](./examples/basic-api) | Health + users CRUD (in-memory) | `cd examples/basic-api \u0026\u0026 go run ./cmd` |\n| [`todo-api`](./examples/todo-api) | Todo app with persistence | `cd examples/todo-api \u0026\u0026 go run ./cmd` |\n\n```bash\ncd examples/basic-api\ngo run ./cmd\n\n# GET /api/health  → { \"status\": \"ok\", \"service\": \"basic-api\" }\n# GET /api/users   → { \"data\": [...], \"total\": 2 }\n# POST /api/users  → created user\n```\n\n---\n\n## `nestgo doctor` Output\n\n```\n  🩺 NestGo Doctor — Project Health Check\n\n  ✅ go.mod exists\n  ✅ nestgo.json exists\n  ✅ .env file exists\n  ✅ .env.example exists\n  ✅ cmd/ directory exists\n  ✅ internal/ directory exists\n  ✅ internal/modules/ exists\n  ✅ migrations/ directory exists\n  ✅ Entry point found (cmd/server/main.go)\n  ✅ Go toolchain: go1.22.3 linux/amd64\n  ✅ Dependencies verified\n  ⚠️  Test files found (0)\n      → Run: nestgo generate test \u003cmodule-name\u003e\n\n  ─────────────────────────────────\n  ✅ Passed:   11\n  ⚠️  Warnings: 1\n  ❌ Issues:   0\n  ─────────────────────────────────\n\n  🟡 Project is healthy but has some recommendations.\n```\n\n---\n\n## Roadmap\n\n- [x] Modular architecture with DI\n- [x] CLI with full code generation\n- [x] Hot reload dev server\n- [x] Route explorer (AST-based)\n- [x] SQL migration system\n- [x] Auth scaffolding (JWT + bcrypt)\n- [x] Architecture linter\n- [x] `nestgo doctor` health checks\n- [ ] WebSocket support\n- [ ] OpenAPI / Swagger auto-generation\n- [ ] Rate limiting middleware\n- [ ] Caching integration (Redis)\n- [ ] gRPC transport layer\n\n---\n\n## Contributing\n\nContributions are welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) first.\n\n```bash\n# Clone\ngit clone https://github.com/Ashishkapoor1469/Nestgo.git\ncd Nestgo\n\n# Run tests\ngo test ./...\n\n# Build the CLI locally\ngo build -o bin/nestgo ./cmd/nestgo\n\n# Try it\n./bin/nestgo --help\n```\n\n---\n\n## License\n\nMIT © [Ashish Kapoor](https://github.com/Ashishkapoor1469)\n\n---\n\n\u003cp align=\"center\"\u003e\n  Built with ❤️ for Go developers who want structure without complexity.\n  \u003cbr /\u003e\n  \u003ca href=\"https://github.com/Ashishkapoor1469/Nestgo\"\u003e⭐ Star us on GitHub\u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashishkapoor1469%2Fnestgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashishkapoor1469%2Fnestgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashishkapoor1469%2Fnestgo/lists"}