Maybe you have read my last post about automating a NestJS authentication system. Now, of course, I had to automate the same for Angular. Since I code mostly with this stack, this is going to save me 3 to 4 hours in each new MEAN project I start from now, and so you can too now. Thank me later XD.
Follow along to know how I did it, how challenging it was, and how to use my script.
Automating an Authentication System UI?
Oh yes, of course. People often recommend being lazy to be able to be productive. That means, for those of you that didn’t understand, that the lazy worker is the one with the effort worth time-saving solution. In this case, I started with the NestJS part automation, later, just asked myself, why don’t repeat the same for the UI? And for sure, it is still the same problem: Setting up every project involves authentication.
So here I am, now trying to repeat the same, this time with the visual part of the task. I had the NestJS automation, so following it, copying some code from my last project I build a simple yet useful piece of automated code. Now, same as the last one, I just need to run one command from the terminal, and instantly I have a full authentication system. This auth system includes the same user profile as the API boilerplate. Maybe predictable, yes, but here are the components of my automated script:
- Login
- Signup
- Password Recovery (request)
- Password Reset
- User Profile
- An Authentication Interceptor
- Auth Service
- Tailwind Installation and configuration
- An environment file
- Every interface needed (API responses, user, and payloads)
Was it worth it?
Hell yeah. If you put this and the another one automation together, now I’m saving 3 to 4 hours to myself. Think of this like when you go camping, and you already have all you need packaged in a really large backpack. Maybe the day you were preparing that backpack, you feel way too awkward. But without any doubt, now you need it, it totally makes sense, right?
So a little insight here is for businesses, build yourself a system that save you as much time as possible, so you use your time just for the things that make you more money. In our case, developers, automate as much as you can to build yourself a concrete wall of productivity and become high performers in our field.
I get it, it’s awesome, but, how can I use it?
To use this automation script, it’s basically the same as the last one, once you’ve created your project go to the root directory in a terminal. Once there, just run the script with the raw file using curl:
curl -sSL https://gist.githubusercontent.com/kenliten/d6a7028310d43d87ed889c779f3b8007/raw | sh
Wait for it to complete, and, yes, that’s it.
If you like it, please consider sharing it with your friends or colleagues and follow me on social media.
That said, wish you a merry x-mas and happy new year.
Peace!