-
Notifications
You must be signed in to change notification settings - Fork 8
Proposal: Rebuild Auth App using mix phx.gen.auth when Phoenix@1.7 Ships #207
Copy link
Copy link
Open
Labels
chorea tedious but necessary task often paying technical debta tedious but necessary task often paying technical debtdiscussShare your constructive thoughts on how to make progress with this issueShare your constructive thoughts on how to make progress with this issueenhancementNew feature or enhancement of existing functionalityNew feature or enhancement of existing functionalityepicA feature idea that is large enough to require a sprint (5 days) or more and has smaller sub-issues.A feature idea that is large enough to require a sprint (5 days) or more and has smaller sub-issues.help wantedIf you can help make progress with this issue, please comment!If you can help make progress with this issue, please comment!needs-uiA feature idea that needs UI in order to be discussed/built.A feature idea that needs UI in order to be discussed/built.priority-2Second highest priority, should be worked on as soon as the Priority-1 issues are finishedSecond highest priority, should be worked on as soon as the Priority-1 issues are finishedresearchResearch required; be specificResearch required; be specifictech-debtA feature/requirement implemented in a sub-optimal way & must be re-writtenA feature/requirement implemented in a sub-optimal way & must be re-writtentechnicalA technical issue that requires understanding of the code, infrastructure or dependenciesA technical issue that requires understanding of the code, infrastructure or dependencies
Metadata
Metadata
Labels
chorea tedious but necessary task often paying technical debta tedious but necessary task often paying technical debtdiscussShare your constructive thoughts on how to make progress with this issueShare your constructive thoughts on how to make progress with this issueenhancementNew feature or enhancement of existing functionalityNew feature or enhancement of existing functionalityepicA feature idea that is large enough to require a sprint (5 days) or more and has smaller sub-issues.A feature idea that is large enough to require a sprint (5 days) or more and has smaller sub-issues.help wantedIf you can help make progress with this issue, please comment!If you can help make progress with this issue, please comment!needs-uiA feature idea that needs UI in order to be discussed/built.A feature idea that needs UI in order to be discussed/built.priority-2Second highest priority, should be worked on as soon as the Priority-1 issues are finishedSecond highest priority, should be worked on as soon as the Priority-1 issues are finishedresearchResearch required; be specificResearch required; be specifictech-debtA feature/requirement implemented in a sub-optimal way & must be re-writtenA feature/requirement implemented in a sub-optimal way & must be re-writtentechnicalA technical issue that requires understanding of the code, infrastructure or dependenciesA technical issue that requires understanding of the code, infrastructure or dependencies
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
No status
Status
Backlog (Prioritized)
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
authfrom 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
authapp 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
elsewho 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]
AuthExperience in First Place ...? 💭As we've recently seen on a recent Client project,
building
authdirectly into the "main"PhoenixApp adds2klocto the codebaseand has nowhere near the level of features, docs or tests this project has.
We didn't want to use
authfor the Client project because it's not "polished" enough.The
auththat 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.authhas 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
Appon theirlocalhostso that we can streamline contribution.What? 📝
Create an
/authfolder in https://github.com/dwyl/book with various.mdfiles e.g.README.md,part1.md,part2.mdetc. to capture the journey.Use
TailwindTailwind CSS technology-stack#94 for UI as it'll be inPhoenix v1.7✨App!Use
LiveViewwhere appropriate Optimizing User Experience with LiveView phoenix-liveview-counter-tutorial#74 e.g. "Who is Online" viaPresenceUse
Swoosh(which also didn't exist when we createdAuthoriginally)Keep
auth.dwyl.comas a independent/separate deployed Appso that we can keep the "core" of the
Appso that people running itonly have ONE environment variable they can get in less than 1 minute.
Run
authon TCP Port4001onlocalhostto make easier to run both theAppon the same machine if the person is busy testing while offline.Create a comprehensive
AdminDashboardPHPis 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,Phoenixand other language apps!! Initial success would be anyone else inPhoenix-landusing ourAuthimplementation, long-term success would be people inPython,Node.jsor evenRailsusing it!But in the first instance, we just want to make it easier for ourselves to maintain
and others to contribute.
Appsetup e.g. pasteURLof a logo.localhostto 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
/tutorialand first video should be just:mix phx.newandmix phx.gen.authwith 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.