{"id":32355735,"url":"https://github.com/deltegui/owl","last_synced_at":"2026-07-12T17:31:09.303Z","repository":{"id":257823075,"uuid":"868044822","full_name":"deltegui/owl","owner":"deltegui","description":"Owl is a highly opinionated server side rendering web framework. ","archived":false,"fork":false,"pushed_at":"2025-10-04T20:57:02.000Z","size":1010,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-04T22:25:09.651Z","etag":null,"topics":["framework","golang","localization","web"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deltegui.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-10-05T10:31:15.000Z","updated_at":"2025-10-04T20:56:37.000Z","dependencies_parsed_at":"2024-10-12T16:56:35.485Z","dependency_job_id":"e5f1e3f1-1b7c-4081-8cd6-1a3f3d9b65c7","html_url":"https://github.com/deltegui/owl","commit_stats":null,"previous_names":["deltegui/owl"],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/deltegui/owl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deltegui%2Fowl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deltegui%2Fowl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deltegui%2Fowl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deltegui%2Fowl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deltegui","download_url":"https://codeload.github.com/deltegui/owl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deltegui%2Fowl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35398566,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-12T02:00:06.386Z","response_time":87,"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","golang","localization","web"],"created_at":"2025-10-24T11:23:54.819Z","updated_at":"2026-07-12T17:31:09.297Z","avatar_url":"https://github.com/deltegui.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# owl\n\u003cimg src=\"https://raw.githubusercontent.com/deltegui/owl/refs/heads/main/owl.svg\" alt=\"logo\" width=\"200\"/\u003e\n\nOwl is a highly opinionated framework for Go.\n\n## Purpose\nOwl aims to be a web framework focused on building server-rendered websites with:\n\n* Server-side rendering\n* Localization (i18n)\n* Automatic cookie encryption\n* CORS support\n* CSRF tokens\n* Session management\n* Form validation with error rendering\n* Optional Dependency Injection Container\n\nAll features are tightly integrated with each other and implemented with a minimal number of external dependencies (currently only 3, one of which is developed in-house).\n\n## Example\n\nHere’s an example that demonstrates what the framework can do:\n\n```go\n// Define a struct for our login form.\ntype loginForm struct {\n\tName               string `valtruc:\"min=3, max=255, required\"`  // Use valtruc to define rules for validation\n\tPassword           string `valtruc:\"min=3, max=255, required\"`\n\tLangSelectList     owl.SelectList                               // A select list\n}\n\nfunc handleProcessLogin(service accountService, sessionManager *session.Manager) owl.Handler {\n\ttempl := template.Must(...) // Parse your views using plain Go template.\n\treturn func(ctx owl.Ctx) error {\n        var form loginForm\n\t\tctx.ParseForm(\u0026form) // Reads form serializes as  and fill loginForm struct\n\t\tctx.Validate(form) // Validate the struct now its filled.\n\n\t\tif !ctx.ModelState.Valid { // ModelState will tell you if the loginForm is valid or not.\n\t\t\tform.Password = \"\"\n            ctx.Status(http.BadRequest)\n\t\t    return ctx.Render(templ, views.AccountLogin, form) // Render the view\n\t\t}\n\n\t\tdto := accountDto{\n\t\t\tName:     form.Name,\n\t\t\tPassword: form.Password,\n\t\t}\n\n\t\taccount, _ = service.login(dto) // Call your service\n\n\t\tsessionManager.CreateSessionCookie(ctx.Res, session.User{\n\t\t\tId:    account.IdUser,\n\t\t\tName:  account.Name,\n\t\t})\n\t\t_ = ctx.ChangeLanguage(account.ProfileLang)\n\n\t\treturn ctx.Redirect(\"/panel\")\n    }\n}\n\nfunc main() {\n    cy := cypher.New()\n\n    r := owl.NewWithInjector() // Create a new router with a dependency injection container. If you dont like / need a dependency injection container you can just use owl.New().\n    r.StaticEmbedded(static.Files) // Create a mountpoint for static files.\n\tr.AddLocalization(locale.Files, locale.Shared, locale.Errors) // Adds loclaization. You can then use Localize(key) in your views.\n\n    r.Add(newAccountService()) // Register your account service\n    r.Add(func() *session.Manager {\n        return session.NewInMemoryManager()\n    }) // Register a session manager with in-memory persistence.\n\n    sub := r.CreateSubMux(\"/account\") // Creates a subrouter mounted in the URL /account\n    sub.Post(\"/login\", handleProcessLogin) // Automatically will wire your dependencies.\n\n\tctx.Mux.Listen(conf.ListenURL) // Start the server.\n}\n```\n\nYour view.html content:\n\n```html\n\u003chtml\u003e\n\u003cbody\u003e\n\n{{ template \"select_list\" (SelectList .Localizer .Model.LangSelectList) }}\n\n\u003cform action=\"/account/login\" method=\"post\"\u003e\n    {{ .PlaceCsrfInput }} \u003c!-- Create a hidden input with CSRF token. --\u003e\n    \u003cdiv class=\"mb-3\"\u003e\n        \u003clabel for=\"input-name\"\u003e{{ .Localize \"Name\" }}\u003c/label\u003e \u003c!-- This will search in view.html.json a localized string --\u003e\n        \u003cinput id=\"input-name\" type=\"text\" name=\"Name\" value=\"{{ .Model.Name }}\" /\u003e \u003c!-- Access to your model using .Model --\u003e\n        {{ PlaceErrorList . \"Name\" }} \u003c!-- Place a list with validation errors for the struct field named \"Name\" --\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"mb-3\"\u003e\n        \u003clabel for=\"input-password\"\u003e{{ .Localize \"Password\" }}\u003c/label\u003e\n        \u003cinput id=\"input-password\" type=\"password\" name=\"Password\" /\u003e\n        {{ PlaceErrorList . \"Password\" }}\n    \u003c/div\u003e\n\n    \u003cbutton type=\"submit\"\u003e\n        {{ .Localize \"Login\" }}\n    \u003c/button\u003e\n\n\u003c/form\u003e\n```\n\nStore your localized strings for your view in view.html.json:\n\n```json\n{\n    \"es\": {\n        \"Name\": \"Nombre\",\n        \"Password\": \"Contraseña\",\n        \"Login\": \"Inicia sesión\"\n    },\n    \"en\": {\n        \"Name\": \"Name\",\n        \"Password\": \"Password\",\n        \"Login\": \"Login\"\n    }\n}\n```\n\n# How to install\n\nJust run this inside your project:\n\n```\ngo get -u github.com/deltegui/owl\n```\n\n## Resources\n\n- [Go reference](https://pkg.go.dev/github.com/deltegui/owl)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeltegui%2Fowl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeltegui%2Fowl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeltegui%2Fowl/lists"}