{"id":17090985,"url":"https://github.com/lu4p/chat-hotwire-go","last_synced_at":"2025-04-12T22:30:58.800Z","repository":{"id":98728951,"uuid":"328801639","full_name":"lu4p/chat-hotwire-go","owner":"lu4p","description":"This is a simple chat app which shows how to use Go with Hotwire.","archived":false,"fork":false,"pushed_at":"2021-05-11T13:28:06.000Z","size":225,"stargazers_count":28,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-26T16:38:47.319Z","etag":null,"topics":["golang","hotwire","stimulusjs","turbo","websocket"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lu4p.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-11T21:58:18.000Z","updated_at":"2025-03-03T03:42:43.000Z","dependencies_parsed_at":"2023-05-25T01:00:30.028Z","dependency_job_id":null,"html_url":"https://github.com/lu4p/chat-hotwire-go","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lu4p%2Fchat-hotwire-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lu4p%2Fchat-hotwire-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lu4p%2Fchat-hotwire-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lu4p%2Fchat-hotwire-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lu4p","download_url":"https://codeload.github.com/lu4p/chat-hotwire-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248639752,"owners_count":21137900,"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":["golang","hotwire","stimulusjs","turbo","websocket"],"created_at":"2024-10-14T13:57:15.307Z","updated_at":"2025-04-12T22:30:58.774Z","avatar_url":"https://github.com/lu4p.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chat-hotwire-go\nThis is a simple chat app which shows how to use Go with [Hotwire](https://hotwire.dev/).\n\n![demo](demo.png)\n\n- Messages from another user are received via [Turbo Streams](https://turbo.hotwire.dev/reference/streams) over a websocket connection.\n- A [stimulus](https://stimulus.hotwire.dev/) controller is used to clear the message form.\n- The application can work without JavaScript \n\n## Setup\nYou need to have [go](https://golang.org/dl/) and [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) installed.\n\nThen run:\n```sh\ngo get -u github.com/cosmtrek/air\ngit clone https://github.com/lu4p/chat-hotwire-go.git\ncd chat-hotwire-go\nnpm install\nnpm run dev\n```\n\nAfter the above just run `air`, to start the webapp with hot reloading.\n\n**Note:** The generated `dist/main.css` file is rather large now at ~6MB, but don't worry this is only because every possible class of tailwind is included (there are many), once you build for production only ~4KB of CSS is left.\n\nIf you want to also rebuild the JS and CSS on change run `npm run watch` in a separate terminal session.\n\nTo build for production run `npm run prod` and then `go build`.\n\n## This project uses:\n- [html/template](https://pkg.go.dev/html/template), a html templating library included in the stdlib of Go\n- [Echo](https://echo.labstack.com/), a Go web framework\n- [Hotwire](https://hotwire.dev/) a new approach from Basecamp for writing modern web applications without much JavaScript\n- [tailwindcss](https://tailwindcss.com/), makes HTML look nice\n- [webpack](https://webpack.js.org/), for packing JS and CSS into single files, with minimization enabled, setup to extract CSS to a seperate file \n- [Air](https://github.com/cosmtrek/air), for hot reloading Go code and templates on change.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flu4p%2Fchat-hotwire-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flu4p%2Fchat-hotwire-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flu4p%2Fchat-hotwire-go/lists"}