{"id":26227612,"url":"https://github.com/go-deck/routeflow","last_synced_at":"2026-05-07T06:38:24.550Z","repository":{"id":283351931,"uuid":"948874893","full_name":"go-deck/routeflow","owner":"go-deck","description":"RouteFlow is a high-performance, declarative API routing framework for Go that accelerates backend development using YAML. Define RESTful endpoints, middleware, DB connections, and server settings without boilerplate. Switch between Gin, Fiber, or Echo with zero code changes. Ideal for scalable microservices, REST APIs, and rapid prototyping.","archived":false,"fork":false,"pushed_at":"2025-11-20T02:02:33.000Z","size":87,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-28T23:57:33.426Z","etag":null,"topics":["apidevelopment","backenddevelopment","cloudnative","devops","echo","gin","gin-framework","goframeworks","golang","microservices","opensource","restapi","webdevelopment"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/go-deck/routeflow","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/go-deck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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":"2025-03-15T06:35:45.000Z","updated_at":"2025-05-15T12:22:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"fe30fef7-4a94-489f-b43c-ab69dd14b0c8","html_url":"https://github.com/go-deck/routeflow","commit_stats":null,"previous_names":["go-deck/routeflow"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/go-deck/routeflow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-deck%2Frouteflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-deck%2Frouteflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-deck%2Frouteflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-deck%2Frouteflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-deck","download_url":"https://codeload.github.com/go-deck/routeflow/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-deck%2Frouteflow/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32726515,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["apidevelopment","backenddevelopment","cloudnative","devops","echo","gin","gin-framework","goframeworks","golang","microservices","opensource","restapi","webdevelopment"],"created_at":"2025-03-12T20:18:06.708Z","updated_at":"2026-05-07T06:38:24.545Z","avatar_url":"https://github.com/go-deck.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 RouteFlow: Declarative API Routing for Go\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/go-deck/routeflow.svg)](https://pkg.go.dev/github.com/go-deck/routeflow)\n[![Go Report Card](https://goreportcard.com/badge/github.com/go-deck/routeflow)](https://goreportcard.com/report/github.com/go-deck/routeflow)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n[![View Documentation](https://img.shields.io/badge/View-Documentation-2ea44f?style=for-the-badge\u0026logo=go\u0026logoColor=white)](https://pkg.go.dev/github.com/go-deck/routeflow)\n\n```go\nimport \"github.com/go-deck/routeflow\"  // [Documentation](https://pkg.go.dev/github.com/go-deck/routeflow)\n```\n\n## 🔍 Overview\nRouteFlow is a high-performance, declarative API routing library for Go that simplifies RESTful API development. Define your entire API structure, including routes, middlewares, and database configurations, in a clean YAML file for better maintainability and scalability.\n\n## 🌟 Key Features\n- **Declarative Configuration** - Define your entire API in YAML\n- **Middleware Support** - Built-in and custom middleware chaining\n- **Request Validation** - Schema-based request validation\n- **Database Integration** - Seamless ORM support with GORM\n- **RESTful Routes** - Intuitive route definitions\n- **High Performance** - Optimized for speed and low latency\n- **Extensible** - Easy to extend with custom functionality\n\n## 🚀 Quick Start\n\n### Prerequisites\n- Go 1.16+\n- Database (PostgreSQL/MySQL/SQLite3)\n\n### Installation\n\n```bash\ngo get -u github.com/go-deck/routeflow\n```\n\n### Basic Project Structure\n\n```\nmyapp/\n├── main.go\n├── go.mod\n├── go.sum\n├── lib.yaml\n└── handlers/\n    └── user_handler.go\n```\n\n\n## 🛠 Middleware System\n\n### Built-in Middlewares\n\n| Middleware | Description |\n|------------|-------------|\n| `logging`  | Request/response logging |\n| `cors`     | CORS headers management |\n| `auth`     | Basic authentication |\n| `recovery` | Panic recovery |\n\n### Custom Middleware Example\n\n```go\n// Define your middleware methods\ntype AuthMiddleware struct{}\n\n\n// JWT Authentication Middleware\nfunc (m *AuthMiddleware) JWTValidation(c *ctx.Context) (interface{}, int) {\n    token := c.GetHeader(\"Authorization\")\n    if token == \"\" {\n        return map[string]string{\"error\": \"Authorization header required\"}, 401\n    }\n    \n    // Add your JWT validation logic here\n    if !isValidToken(token) {\n        return map[string]string{\"error\": \"Invalid or expired token\"}, 401\n    }\n    \n    return nil, 0 // Continue to next middleware/handler\n}\n\n// Rate Limiting Middleware\nfunc (m *AuthMiddleware) RateLimit(c *ctx.Context) (interface{}, int) {\n    ip := c.ClientIP()\n    if isRateLimited(ip) {\n        return map[string]string{\"error\": \"Too many requests\"}, 429\n    }\n    return nil, 0\n}\n```\n\n### Registering Middleware\n\n```yaml\nmiddlewares:\n  built_in: [logging, recovery]\n  custom: [JWTValidation, RateLimit]\n\n## 💾 Database Integration\n\nRouteFlow provides seamless integration with multiple databases through GORM:\n\n### Supported Databases\n\n| Database | Connection String Example |\n|----------|--------------------------|\n| PostgreSQL | `postgres://user:pass@localhost:5432/dbname` |\n| MySQL      | `user:pass@tcp(127.0.0.1:3306)/dbname` |\n| SQLite3    | `file:test.db` |\n\n### `lib.yaml` Example:\n\n```yaml\ndatabase:\n  type: postgres  # postgres, mysql, sqlite3\n  host: localhost\n  port: 5432\n  username: dbuser\n  password: dbpass\n  database: myapp_db\n  sslmode: disable\n  max_idle_connections: 10\n  max_open_connections: 100\n  conn_max_lifetime: 1h\n  migrate: true  # Auto-migrate models\n```\n\n## 🚀 Getting Started\n\n### Example Project Structure\n\n```\nmyapp/\n├── cmd/\n│   └── server/\n│       └── main.go\n├── internal/\n│   ├── config/\n│   │   └── config.go\n│   ├── handler/\n│   │   └── user_handler.go\n│   ├── middleware/\n│   │   └── auth.go\n│   └── model/\n│       └── user.go\n├── migrations/\n│   └── 001_initial_schema.sql\n├── pkg/\n│   └── utils/\n├── .env\n├── .gitignore\n├── go.mod\n├── go.sum\n└── lib.yaml\n```\n\n### Example Handler\n\n```go\n// handlers/user_handler.go\npackage handlers\n\nimport (\n\t\"net/http\"\n\t\"github.com/go-deck/routeflow/context\"\n)\n\ntype UserHandler struct{}\n\n// GetUser handles GET /users/:id\nfunc (h *UserHandler) GetUser(c *context.Context) (interface{}, int) {\n\tid := c.Param(\"id\")\n\tvar user User\n\t\n\tif err := c.DB.First(\u0026user, id).Error; err != nil {\n\t\treturn map[string]string{\"error\": \"User not found\"}, http.StatusNotFound\n\t}\n\t\n\treturn user, http.StatusOK\n}\n\n// CreateUser handles POST /users\nfunc (h *UserHandler) CreateUser(c *context.Context) (interface{}, int) {\n\tvar input struct {\n\t\tName     string `json:\"name\" binding:\"required\"`\n\t\tEmail    string `json:\"email\" binding:\"required,email\"`\n\t\tPassword string `json:\"password\" binding:\"required,min=8\"`\n\t}\n\n\tif err := c.ShouldBindJSON(\u0026input); err != nil {\n\t\treturn map[string]string{\"error\": err.Error()}, http.StatusBadRequest\n\t}\n\n\tuser := User{\n\t\tName:     input.Name,\n\t\tEmail:    input.Email,\n\t\tPassword: hashPassword(input.Password),\n\t}\n\n\tif err := c.DB.Create(\u0026user).Error; err != nil {\n\t\treturn map[string]string{\"error\": \"Failed to create user\"}, http.StatusInternalServerError\n\t}\n\n\treturn user, http.StatusCreated\n}\n```\n\n## 🔄 Development\n\n### Running Tests\n\n```bash\ngo test -v ./...\n```\n\n### Building\n\n```bash\ngo build -o app cmd/server/main.go\n```\n\n## 🤝 Contributing\n\nWe welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details.\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🔗 Useful Links\n\n- [Documentation](https://github.com/go-deck/routeflow/wiki)\n- [Examples](https://github.com/go-deck/routeflow/tree/main/examples)\n- [Report Bug](https://github.com/go-deck/routeflow/issues)\n- [Request Feature](https://github.com/go-deck/routeflow/issues/new?template=feature_request.md)\n\n## 🌟 Show Your Support\n\nGive a ⭐️ if this project helped you!\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  Made with ❤️ by RouteFlow Team\n\u003c/div\u003e\n\n🚀 **Happy coding!** 🎯","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-deck%2Frouteflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-deck%2Frouteflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-deck%2Frouteflow/lists"}