Pinned Tweet
Competed in an hackathon and each member on my team got rewarded with a certificate 馃ス. This is a small win in tech compared to what's coming but I'm so genuinely happy for this because it keeps me motivated 馃敟馃捇. We keep pushing, we keep building 馃ス馃捇
Another Monday , another week .
Make sure you do things differently this week and I am sure you are definitely going to see a positive result .
Skill up and have a good week my friend 馃憤馃徑
7
Man...I really need to get a MacBook pro frrr. My workflow would be elevated. I pray I claim a big win before the year ends 馃げ
8
The packages were initially on the package-lock.json file so I had to install the packages all over again and pushed to GitHub in which render redeployed based on my updated repo from my git. After testing the login, I cleared the cookies and that was all. Thank you
The challenges i faced were render not picking up my package.json, not using the server.js as root folder and for the frontend not picking enough cookies from the backend. I solved them by installing the packages so it can be added to package.jsoj
5
The challenges i faced were render not picking up my package.json, not using the server.js as root folder and for the frontend not picking enough cookies from the backend. I solved them by installing the packages so it can be added to package.jsoj
So the frontend was basically integrating APIs and designing UIs and making the UX a very good one. That's all for the frontend
Pages were the home page, email verify page, reset password page, login page. Components were the header and navbar to be able to be resued in the home page. useRef hook was also used in focus of the otp boxes to be able to paste otp at once and automatically move to boxes
Auth State management in the sense that you are trying to actually verify if the user is logged in or not and put some certain conditions. We had the pages folder, component folder, assets folder for pictures, src folder for your app.jsx and env file to keep my backend url
Axios was used in this particular project because it's better at handling error responses and converting those responses into json format. React Context was also used to get user Data and define Auth State management
The frontend was built on top React.Js. I also used tailwind CSS for the UI, react toastify for notifications and react router Dom for routing across different pages. There are two APIs you can use to fetch data from the backend API whuch are fetchAPI and axios API
Finally! The email design template when sending emails. Then the backend was finally deployed on render. That's all for the backend side. Let's dive into the frontend
inside the structure, from and to are properties which must be included. from means the email you are sending from and the to means the email that the message is being sent to. Subject also included which means the heading of why the email is sent
Then you need a sender's email which is the email you used to register your brevo account. Then in the controller function specifically the auth controller, you define a variable and send structure how you want the email to look like.
You also specity the type you want it to be for each properties. For examples name:string , password: string, otp: number and so on
Mongoose schemas is like the way you want the properties of the database to be structured in order. For this project, it was the name, password, email, verify otp, otp expired at and all other ones and I created a mongoose model inside my database to see the contents
3
I used nodemailer to send emails by integrating with a third party system that would enable me to send the emails. It's called Brevo. You need an host, an SMTP password, SMTP username and a port number to enable you send emails successfully.
Mongoose schemas is like the way you want the properties of the database to be structured in order. For this project, it was the name, password, email, verify otp, otp expired at and all other ones and I created a mongoose model inside my database to see the contents
Also applied the concept of controllers where you write the functions of what you want your product to perfom related to the database. Auth controllers and user controllers. Where I defined the login, logout, verify otp and all other authentication related functions





