{"id":15046453,"url":"https://github.com/go-gorf/gorf","last_synced_at":"2025-08-31T22:14:04.375Z","repository":{"id":150453599,"uuid":"622664131","full_name":"go-gorf/gorf","owner":"go-gorf","description":"Django inspired Golang Rest Framework","archived":false,"fork":false,"pushed_at":"2023-09-09T19:13:12.000Z","size":85,"stargazers_count":25,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T05:41:23.608Z","etag":null,"topics":["framework","gin","go","golang","gorf","rest-api"],"latest_commit_sha":null,"homepage":"https://go-gorf.github.io/","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-gorf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md ","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}},"created_at":"2023-04-02T19:09:25.000Z","updated_at":"2025-04-04T16:48:17.000Z","dependencies_parsed_at":"2024-06-21T17:30:34.530Z","dependency_job_id":"cee59439-10cf-4675-84df-5e841a4abb39","html_url":"https://github.com/go-gorf/gorf","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/go-gorf/gorf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-gorf%2Fgorf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-gorf%2Fgorf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-gorf%2Fgorf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-gorf%2Fgorf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-gorf","download_url":"https://codeload.github.com/go-gorf/gorf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-gorf%2Fgorf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273047150,"owners_count":25036302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"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":["framework","gin","go","golang","gorf","rest-api"],"created_at":"2024-09-24T20:53:07.615Z","updated_at":"2025-08-31T22:14:04.359Z","avatar_url":"https://github.com/go-gorf.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Golang Rest Framework (Gorf)\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/go-gorf/gorf/go.yml?branch=main\u0026style=for-the-badge)](https://github.com/go-gorf/gorf/actions?workflow=build)\n[![](http://img.shields.io/badge/godoc-reference-5272B4.svg?style=for-the-badge)](https://pkg.go.dev/github.com/go-gorf/gorf) \n\nDjango inspired Rest Framework for Golang.\n\n## Vision\n\nIntroducing Gorf, the Golang REST API framework that empowers developers to easily create and reuse modular apps. \nInspired by the simplicity and flexibility of Python Django, Gorf utilizes the full MVC architecture, providing\ndedicated model, URL, and view files for effortless understanding. Gorf's plug and play app concept enables infinite \nscalability and customization, making Gorf the go-to solution for anyone looking to kickstart a new project in Golang.\nJoin our community and contribute your ideas and innovations to build a framework that streamlines the development process for all.\n\nFeatures\n\n* Generic\n* Simplicity\n* Based on known architecture\n* Reusability\n* Support for apps\n* Custom database backends\n* More feature work in progress\n\n## Installation\n```bash\ngo get github.com/go-gorf/gorf\n```\nInstall gorf auth app\n```bash\ngo get github.com/go-gorf/auth\n```\n\n## Tutorial\n\nFirstly, Create a new main package with following code\n\n``` go\npackage main\n\nimport (\n\t\"log\"\n)\n\nfunc main() {\n\tr := BootstrapRouter()\n\terr := r.Run()\n\tif err != nil {\n\t\tlog.Fatal(\"Unable to create the gin server\")\n\t} // listen and serve on 0.0.0.0:8080 (for windows \"localhost:8080\")\n}\n```\n\n## settings.go\nNext, Create a settings.go file in the main package with the following code snippet\n\n``` go title=\"settings.go\"\npackage main\n\nimport (\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/go-gorf/auth\"\n\t\"github.com/go-gorf/gorf\"\n)\n\n// add all the apps\nvar apps = []gorf.GorfApp{\n\t\u0026auth.AuthApp,\n}\n\nfunc LoadSettings() {\n\t// jwt secret key\n\tgorf.Settings.SecretKey = \"GOo8Rs8ht7qdxv6uUAjkQuopRGnql2zWJu08YleBx6pEv0cQ09a\"\n\tgorf.Settings.DbConf = \u0026gorf.SqliteBackend{\n\t\tName: \"db.sqlite\",\n\t}\n}\n\n// bootstrap server\nfunc BootstrapRouter() *gin.Engine {\n\tgorf.Apps = append(apps)\n\tLoadSettings()\n\tgorf.InitializeDatabase()\n\tgorf.SetupApps()\n\tr := gin.Default()\n\tgorf.RegisterApps(r)\n\treturn r\n}\n```\n\n## Write your own apps\n\nCreate a new package named \"hello\"\n\nadd app.go file\n\n``` go\npackage hello\n\nimport (\n\t\"github.com/go-gorf/gorf\"\n)\n\nfunc setup() error {\n\t// Add setup here\n\treturn nil\n}\n\nvar HelloApp = gorf.GorfBaseApp{\n\tName:         \"Hello\",\n\tRouteHandler: Urls,\n\tSetUpHandler: setup,\n}\n\n```\n\nadd urls.go file\n\n``` go\npackage hello\n\nimport \"github.com/gin-gonic/gin\"\n\nfunc Urls(r *gin.Engine) {\n\tr.POST(\"/hello\", Hello)\n}\n```\n\nadd views.go file\n\n``` go\npackage hello\n\nimport (\n\t\"github.com/gin-gonic/gin\"\n\t\"net/http\"\n)\n\nfunc Hello(ctx *gin.Context) {\n\tctx.JSON(http.StatusOK, gin.H{\n\t\t\"message\": \"Hello world\",\n\t})\n}\n\n```\n## Check the Gorf project template\n\n\n[https://github.com/go-gorf/template](https://github.com/go-gorf/template)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-gorf%2Fgorf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-gorf%2Fgorf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-gorf%2Fgorf/lists"}