{"id":20853698,"url":"https://github.com/wolfeidau/hotwire-golang-website","last_synced_at":"2025-10-11T07:33:31.431Z","repository":{"id":40625162,"uuid":"334592564","full_name":"wolfeidau/hotwire-golang-website","owner":"wolfeidau","description":"This project provides some working examples using Go and Hotwire Turbo.","archived":false,"fork":false,"pushed_at":"2023-03-10T18:11:15.000Z","size":64,"stargazers_count":213,"open_issues_count":2,"forks_count":15,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-12T18:03:01.803Z","etag":null,"topics":["golang","hotwire-turbo","stimulusjs"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wolfeidau.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}},"created_at":"2021-01-31T06:50:24.000Z","updated_at":"2025-04-18T13:32:32.000Z","dependencies_parsed_at":"2024-06-18T22:37:29.560Z","dependency_job_id":"062afd5f-c407-4661-8b81-97d1cc10e5ae","html_url":"https://github.com/wolfeidau/hotwire-golang-website","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wolfeidau/hotwire-golang-website","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfeidau%2Fhotwire-golang-website","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfeidau%2Fhotwire-golang-website/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfeidau%2Fhotwire-golang-website/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfeidau%2Fhotwire-golang-website/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wolfeidau","download_url":"https://codeload.github.com/wolfeidau/hotwire-golang-website/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfeidau%2Fhotwire-golang-website/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006622,"owners_count":26084131,"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-10-11T02:00:06.511Z","response_time":55,"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":["golang","hotwire-turbo","stimulusjs"],"created_at":"2024-11-18T03:22:50.837Z","updated_at":"2025-10-11T07:33:31.410Z","avatar_url":"https://github.com/wolfeidau.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hotwire-golang-website\n\nThis project provides some working examples using [Go](https://golang.org) the [hotwire/turbo](https://turbo.hotwire.dev/) library published by [basecamp](https://basecamp.com/). This is based on a great post about [Hotwire: HTML Over The Wire](https://delitescere.medium.com/hotwire-html-over-the-wire-2c733487268c) by [@delitescere](https://twitter.com/delitescere).\n\n# Overview\n\nThis service illustrates how to use turbo to enable updates to a website using primarily service side code.\n\n1. Uses [html/template](https://golang.org/pkg/html/template/) via my helper library [echo-go-templates](github.com/wolfeidau/echo-go-templates) which provides layout helpers, and embedded assets with [io/fs](https://pkg.go.dev/io/fs) for [views](views).\n2. Uses [echo](https://echo.labstack.com/) library to simplify routing.\n3. Uses a CDN to host all css / JS libraries [base.html](views/layouts/base.html).\n4. Uses [esbuild](https://esbuild.github.io) to automatically bundle JS assets on startup using [echo-esbuild-middleware](https://github.com/wolfeidau/echo-esbuild-middleware) to serve them.\n\n# Hotwire Turbo\n\nIn this site I have implemented:\n\n1. [Turbo Drive](https://turbo.hotwire.dev/handbook/drive)\n2. [Turbo Frames](https://turbo.hotwire.dev/handbook/frames)\n3. [Turbo Streams](https://turbo.hotwire.dev/handbook/streams) with [Server Sent Events (SSE)](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events) and [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket)\n4. [stimulus](https://stimulus.hotwire.dev/)\n\nMost of the server side logic is in [hotwire.go](internal/server/hotwire.go).\n\n\n# Prerequisites\n\n* Go 1.13 or later with support for Go Modules, used to build the service.\n* [Node.js](https://nodejs.org/en/) 12 or later, which is only used to install our asset building dependencies.\n# Running\n\nTo get this project running you need to setup some certificates, in my case I use https://github.com/FiloSottile/mkcert and there is a target in the makefile.\n\n```\nmake certs\n```\n\nTo install node dependencies\n\n```\nmake install\n```\n\nTo start the service just run.\n\n```\nmake start\n```\n\nFor development you can use the following command, this will check for code updates and restart the service.\n\n```\nmake watch\n```\n\nThe service should be listening on https://hotwire.localhost:9443/\n\n# License\n\nThis application is released under Apache 2.0 license and is copyright [Mark Wolfe](https://www.wolfe.id.au).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolfeidau%2Fhotwire-golang-website","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwolfeidau%2Fhotwire-golang-website","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolfeidau%2Fhotwire-golang-website/lists"}