{"id":23459568,"url":"https://github.com/d-led/d-zen","last_synced_at":"2025-10-09T02:42:17.800Z","repository":{"id":146619620,"uuid":"468101564","full_name":"d-led/d-zen","owner":"d-led","description":"Phoenix + LiveView + Gigalixir","archived":false,"fork":false,"pushed_at":"2025-07-24T22:34:25.000Z","size":89,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-25T04:36:26.768Z","etag":null,"topics":["demo-app","elixir","elixir-phoenix","gigalixir","phoenix-framework","phoenix-liveview"],"latest_commit_sha":null,"homepage":"https://red-dark-honeyeater.gigalixirapp.com","language":"Elixir","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/d-led.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}},"created_at":"2022-03-09T21:45:43.000Z","updated_at":"2025-07-24T22:34:29.000Z","dependencies_parsed_at":"2024-04-03T20:26:40.552Z","dependency_job_id":"e3a708b9-bfe5-408b-b201-977dd11898d7","html_url":"https://github.com/d-led/d-zen","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/d-led/d-zen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-led%2Fd-zen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-led%2Fd-zen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-led%2Fd-zen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-led%2Fd-zen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d-led","download_url":"https://codeload.github.com/d-led/d-zen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-led%2Fd-zen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000773,"owners_count":26082906,"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-09T02:00:07.460Z","response_time":59,"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":["demo-app","elixir","elixir-phoenix","gigalixir","phoenix-framework","phoenix-liveview"],"created_at":"2024-12-24T06:15:42.583Z","updated_at":"2025-10-09T02:42:17.761Z","avatar_url":"https://github.com/d-led.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dzen\n\nTo start your Phoenix server:\n\n* Install dependencies with `mix deps.get`\n* Start Postgres, e.g. via `docker-compose up -d`\n* Start Phoenix endpoint with `mix phx.server` or inside IEx with `iex -S mix phx.server`\n\nNow you can visit [`localhost:4000`](http://localhost:4000) from your browser.\n\nReady to run in production? Please [check our deployment guides](https://hexdocs.pm/phoenix/deployment.html).\n\n## Deployed\n\nDeployed to [Gigalixir](https://gigalixir.com) \u0026rarr; https://red-dark-honeyeater.gigalixirapp.com\n\n## Log\n\n* Latest Elixir \u0026 Erlang installed\n* [Gigalixir Docs](https://gigalixir.readthedocs.io/en/latest/getting-started-guide.html)\n* installed latest phoenix\n  * `mix local.hex`\n  * `mix archive.install hex phx_new`\n* created the app `mix phx.new --no-ecto d-zen --app dzen`\n* fetched the dependencies `mix deps.get`\n* local live-reloadable start: `mix phx.server`\n* registered \u0026 then logged into gigalixir: `gigalixir login`\n* created the app: `APP_NAME=$(gigalixir create)`\n  * if not automatically set, `gigalixir git:remote $APP_NAME`\n* configured the versions\n  * `echo \"elixir_version=1.13.3\" \u003e elixir_buildpack.config`\n  * `echo \"erlang_version=23.3.2\" \u003e\u003e elixir_buildpack.config`\n  * `echo \"node_version=14.15.4\" \u003e phoenix_static_buildpack.config`\n* deploy to gigalixir: `git push gigalixir master`\n* visit https://red-dark-honeyeater.gigalixirapp.com\n  * wait for the load balancer start or restart the app in https://console.gigalixir.com\n* added an [Ecto Repo](https://hexdocs.pm/ecto/getting-started.html#adding-ecto-to-an-application)\n  * `mix ecto.create` after all the required code changes\n  * `mix ecto.gen.migration create_counters` to initialize the counters\n* created the free gigalixir DB tier: `gigalixir pg:create --free`\n\n### Changes\n\n- cleanup: [c1c3ba41d99179a169868d4161a8067cd0d1656a](https://github.com/d-led/d-zen/commit/c1c3ba41d99179a169868d4161a8067cd0d1656a)\n- begin with a live view: [0292d822379f6079fd2f07ed91e26a43cb55c5fc](https://github.com/d-led/d-zen/commit/0292d822379f6079fd2f07ed91e26a43cb55c5fc)\n- making websocket connections work on gigalixir: [66678ad5fc4f53e2e90bce790ecb1933f256b40d](https://github.com/d-led/d-zen/commit/66678ad5fc4f53e2e90bce790ecb1933f256b40d)\n- [PubSub](https://hexdocs.pm/phoenix_pubsub/Phoenix.PubSub.html) \u0026 [LiveView](https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.html) [b685c71233b9e200e9eb8a2dcb79b73e70c6b53e](https://github.com/d-led/d-zen/commit/b685c71233b9e200e9eb8a2dcb79b73e70c6b53e) + channel name fix [314b8191fb5e993038c3506bbbb89c87f9df1aa0](https://github.com/d-led/d-zen/commit/314b8191fb5e993038c3506bbbb89c87f9df1aa0)\n- refactoring to not repeat the channel name mismatch mistake [ecd14f02bf71bb33c330b6abfe680580560e126f](https://github.com/d-led/d-zen/commit/ecd14f02bf71bb33c330b6abfe680580560e126f)\n- added ecto to persist the counters: [diff before-ecto...master](https://github.com/d-led/d-zen/compare/before-ecto...master)\n\n## Learn more\n\n* Official website: https://www.phoenixframework.org/\n* Guides: https://hexdocs.pm/phoenix/overview.html\n* Docs: https://hexdocs.pm/phoenix\n* Forum: https://elixirforum.com/c/phoenix-forum\n* Source: https://github.com/phoenixframework/phoenix\n\n## Gigalixir Hands-On\n\n### IEx in the Container\n\n[docs](https://gigalixir.readthedocs.io/en/latest/runtime.html#how-to-ssh-into-a-production-container)\n\n- `gigalixir account:ssh_keys:add \"$(cat ~/.ssh/id_rsa.pub)\"` and wait a couple of minutes\n- `gigalixir ps:remote_console`\n\n### Resetting the DB\n\n[docs](https://gigalixir.readthedocs.io/en/latest/database.html#how-to-reset-the-database)\n\n```elixir\n# check the data\nDzen.Repo.all(Dzen.Counter)\n# drop\nApplication.app_dir(:dzen, \"priv/repo/migrations\"), :down, [all: true])\n# create\nEcto.Migrator.run(Dzen.Repo, Application.app_dir(:dzen, \"priv/repo/migrations\"), :up, [all: true])\n```\n\n### Changing an Entity\n\n```elixir\n# check the data\nDzen.Repo.all(Dzen.Counter)\n# change the entity\nDzen.Repo.get_by(Dzen.Counter, id: 2)\n|\u003e Ecto.Changeset.change(%{value: 42})\n|\u003e Dzen.Repo.update()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-led%2Fd-zen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd-led%2Fd-zen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-led%2Fd-zen/lists"}