-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Rebuild Auth
App using mix phx.gen.auth
when Phoenix@1.7
Ships
#207
Comments
@SimonLab please have a read through this and LMK if it makes sense. Thanks. 👍 |
Going to add an |
There have been some recent developments in |
Auth
App using mix phx.gen.auth
Auth
App using mix phx.gen.auth
when Phoenix@1.7
Ships
Looking like this will happen pretty soon: dwyl/learn-phoenix#152 🤞 |
Reading through all the changes - many of them breaking changes - in: https://github.com/dwyl/phoenix-liveview-counter-tutorial/pull/104/files I'm a little put off by continuing to pour my time into If we look back at I feel like I'm being forced to adopt features I never signed up to because of Sunk Cost Bias: https://en.wikipedia.org/wiki/Sunk_cost To be 100% clear: if I was completely new to Hmm ... 💭 |
Side-quest: #284 |
In light of the maturity of
mix phx.gen.auth
🎉(that didn't exist #133 when we originally started building
Auth
...),I propose that we re-build
auth
from first principals 0️⃣but with a similar goal & feature-set: 🎯 🔐
to enable 1-EnVar SetupTM of the ("core")
App
. 🚀Why? 🤷♂️
Why would we do this when our
auth
app already works: https://auth.dwyl.com ??Firstly, as noted by @SimonLab in #153 the application workflow is unclear. 😕
If Simon finds it convoluted, then heaven help someone
else
who is unfamiliar with it. 🤦♂️I find the code reasonably readable because I wrote much of it.
But that's meaningless if the second highest contributor finds it unwieldy.
We need it to be immediately obvious to a complete beginner what's going on.
Why We Built our Own [Custom]
Auth
Experience in First Place ...? 💭As we've recently seen on a recent Client project,
building
auth
directly into the "main"Phoenix
App adds2kloc
to the codebaseand has nowhere near the level of features, docs or tests this project has.
We didn't want to use
auth
for the Client project because it's not "polished" enough.The
auth
that we've built for the Client project is suuupper slimmed down; it only has email+password and basic verification. No OAuth - e.g. Google Auth which we determined was a no-brainer for startups and small B2B apps -mix phx.gen.auth
has only basic Session Management, No support for being logged in on Multiple Devices, No Roles, Permissions or Dashboards.Those are the "batteries included" we already have in
auth
"v1" and we want for "v2.0".Our objective is to have a seamless Auth UX for people
running the
App
on theirlocalhost
so that we can streamline contribution.What? 📝
Create an
/auth
folder in https://github.com/dwyl/book with various.md
files e.g.README.md
,part1.md
,part2.md
etc. to capture the journey.Use
Tailwind
Tailwind CSS technology-stack#94 for UI as it'll be inPhoenix v1.7
✨App
!Use
LiveView
where appropriate Optimizing User Experience with LiveView phoenix-liveview-counter-tutorial#74 e.g. "Who is Online" viaPresence
Use
Swoosh
(which also didn't exist when we createdAuth
originally)Keep
auth.dwyl.com
as a independent/separate deployed Appso that we can keep the "core" of the
App
so that people running itonly have ONE environment variable they can get in less than 1 minute.
Run
auth
on TCP Port4001
onlocalhost
to make easier to run both theApp
on the same machine if the person is busy testing while offline.Create a comprehensive
Admin
DashboardPHP
is horrible...!)At present we have this basic dashboard of the
people
: https://auth.dwyl.com/peopleBut we could go much further.
e.g: https://auth.dwyl.com/people/3
You can immediately tell from the UI that it's inconsistent and built by someone who is very clearly not a "designer" ... We can do muuuuch better!!
Potential Enhancements
Elixir
,Phoenix
and other language apps!! Initial success would be anyone else inPhoenix-land
using ourAuth
implementation, long-term success would be people inPython
,Node.js
or evenRails
using it!But in the first instance, we just want to make it easier for ourselves to maintain
and others to contribute.
App
setup e.g. pasteURL
of a logo.localhost
to speed-up development.How? 👩💻
I propose that in addition to writing a step-by-step tutorial, similar to /dwyl/phoenix-chat-example etc ...
We use this as an opportunity to create a tutorial mini series of videos that we upload to YouTube!
Where to Start? > Entity Relationship Diagram (ERD)!
Start by creating a Entity Relationship Diagram (ERD) that maps out all the features we've already built in
v1
.The page of the
/tutorial
and first video should be just:mix phx.new
andmix phx.gen.auth
with aNext we can go through the ERD and breakdown the required features.
Will need to return to this later.
But wanted to open the issue to reference it.
The text was updated successfully, but these errors were encountered: