Skip to content

Task: Update Tutorial from Phoenix v1.7.x to 1.8.x ⬆️ #330

@nelsonic

Description

@nelsonic

With the recent release of Phoenix v1.8.5
Now is a good time to update this tutorial to the latest version including the new files that are created by the generator.
It's a good opportunity for us to see the differences between 1.7 and 1.8 in a more detailed project.

Note: at the time of writing, the Chat App is already using v1.8:

{:phoenix, "~> 1.8.1", override: true},

"phoenix": {:hex, :phoenix, "1.8.5", "919db335247e6d4891764dc3063415b0d2457641c5f9b3751b5df03d8e20bbcf", [:mix], [{:bandit, "~> 1.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.7", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:websock_adapter, "~> 0.5.3", [hex: :websock_adapter, repo: "hexpm", optional: false]}], "hexpm", "83b2bb125127e02e9f475c8e3e92736325b5b01b0b9b05407bcb4083b7a32485"},

But the instructions and several files are not the latest & greatest.

Todo

  • git clone this project to your localhost and rename it to phx-chat-OLD
  • use this "old" version as the basis for creating the new one, but ...
  • git clone the project again and then DELETE all the code in the directories and mix.exs/mix.lock file:
  • Create a new branch on your localhost e.g. phx-1.8-issue#X and
  • Follow the instructions in the REAMDE.md to create a new app from scratch.
  • Please remember to exclude all the noise that we don't need in a demo app like this e.g:
mix phx.new chat --no-mailer --no-dashboard --no-gettext

We really don't need all the noise from constant @dependabot updates for deps we aren't using in the example! ⏳

Note: this tutorial will NOT use LiveView.
We have a different one for that: https://github.com/dwyl/phoenix-liveview-chat-example
That is deliberate. We still use "MVC" (even though Phoenix has removed the "V" ... https://www.germanvelasco.com/blog/phoenix-1-7-is-view-less ... 🙄 )
So we want this tutorial to continue to showcase the "controller" workflow even if we use LiveView in some other places.
I have zero intention of using LiveView for the basic flow in Auth for example. It's just not appropriate.

  • Update the README.md as needed to match the updates in Phoenix.
  • Match all the features in the current example including the Tailwind UI/UX and auth
    • update auth.md as needed (shouldn't be too much)
  • Create a Pull Request with the update.
  • Review your own PR before assigning it for review.
  • Assign the PR for review. 🙏

I expect this update to take a couple of hours. (T2h? 🤷‍♂️)
The faster we can make this update the faster I (@nelsonic) can learn what I need to re-build auth dwyl/auth#207 🤞

Giving this priority-1 simply because anything lower will never get done. 🙃
But also because I think it's important to have a canonical "chat app" tutorial that is up-to-date. 💭
Both for my own edification (ensuring my knowledge is current) and helping the community. 🤞

Metadata

Metadata

Assignees

Type

Projects

Status

Backlog (Prioritized)

Relationships

None yet

Development

No branches or pull requests

Issue actions