{"id":16777923,"url":"https://github.com/dgf/go-ssr-x","last_synced_at":"2025-07-04T17:03:51.875Z","repository":{"id":226498783,"uuid":"767224953","full_name":"dgf/go-ssr-x","owner":"dgf","description":"Go Server Side Rendering Experiment","archived":false,"fork":false,"pushed_at":"2025-03-15T12:57:21.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T13:35:44.608Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dgf.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}},"created_at":"2024-03-04T23:07:53.000Z","updated_at":"2025-03-15T12:57:26.000Z","dependencies_parsed_at":"2024-06-21T02:42:05.883Z","dependency_job_id":null,"html_url":"https://github.com/dgf/go-ssr-x","commit_stats":null,"previous_names":["dgf/go-ssr-x"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgf%2Fgo-ssr-x","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgf%2Fgo-ssr-x/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgf%2Fgo-ssr-x/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgf%2Fgo-ssr-x/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dgf","download_url":"https://codeload.github.com/dgf/go-ssr-x/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243918631,"owners_count":20368745,"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","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":[],"created_at":"2024-10-13T07:26:17.805Z","updated_at":"2025-07-04T17:03:51.861Z","avatar_url":"https://github.com/dgf.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Server Side Rendering Experiment\n\nUsing Golang with `templ` and `htmx` to serve an HDA with Tailwind layout.\n\n## How to get started\n\nInitialize environment\n\n```sh\nnpm install # to install dependencies\ncp node_modules/htmx.org/dist/htmx.min.js web/assets/js\ncp node_modules/htmx.org/dist/ext/response-targets.js web/assets/js\ncp node_modules/htmx.org/dist/ext/remove-me.js web/assets/js\ncp node_modules/hyperscript.org/dist/_hyperscript.min.js web/assets/js/hyperscript.min.js\nnpm run build # to create CSS asset\n\ngo install github.com/a-h/templ/cmd/templ@latest\ngo install github.com/air-verse/air@latest\ngo install github.com/nicksnyder/go-i18n/v2/goi18n@latest\n```\n\n## Hot deploy\n\nWatch CSS changes to update Tailwind\n\n```sh\nnpm run watch\n```\n\nWatch `templ` and Golang changes to restart the server\n\n```sh\nair\n```\n\n## Update Translations\n\nMerge translations iteratively after each code update\n\n```sh\ngoi18n extract -format toml --outdir locale\ncd locale\ngoi18n merge active.*.toml\n```\n\nProvide new translations and finally merge, e.g. `translate.*.toml`\n\n```sh\ncd locale\ngoi18n merge active.*.toml translate.*.toml\n```\n\n## Run Golang lint\n\nGolang lint requires \u003chttps://golangci-lint.run/\u003e\n\n```sh\ngolangci-lint run\n```\n\n## Use PostgreSQL\n\nConfigure a server and create a database, e.g. Docker based\n\n```sh\ndocker run --name task-db -p 5432:5432 \\\n  -e POSTGRES_USER=task-db-user \\\n  -e POSTGRES_PASSWORD=my53cr3tpa55w0rd \\\n  -d postgres:16-alpine\n```\n\nAccess the database\n\n```sh\ndocker exec -it task-db psql -U task-db-user\n```\n\nInstall database migration tool and run migrations\n\n```sh\ngo install github.com/pressly/goose/v3/cmd/goose@latest\ngoose -dir entity postgres \"postgres://task-db-user:my53cr3tpa55w0rd@localhost\" up\n```\n\n## Features (non functional techy stuff)\n\n- [x] server side rendering (Golang templ)\n- [x] hypermedia driven client interaction (htmx)\n- [x] notification snackbar (htmx OOB and extension)\n- [x] Markdown rending and styling (goldmark and Tailwind)\n- [x] table sorting\n- [x] table paging\n- [x] Golang enum string mapping\n- [x] browser history update and reload of subpages\n- [x] JSON logging (Golang slog)\n- [x] i18n - translate template labels and notification messages\n- [x] l10n - display dates in localized format (simple formatting helpers)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgf%2Fgo-ssr-x","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdgf%2Fgo-ssr-x","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgf%2Fgo-ssr-x/lists"}