This is the blueprint of an online store I built for a client. It contains both the administrator role section and public section. It simulates everything from making a purchase down to choosing between delivery and pickup
Project Purpose and Goal
The client wanted to create a website for their online sales business. The general idea was for users to be able to make purchases and then get to pick between pickup and delivery, with payments made in person instead of online. Moreover, the client wanted to have an admin section.
Web Stack
I used Next JS for the frontend and backend and MongoDB for authentication and storage. Mongoose handled the authentication and storage, but I still made use of OAuth2 and JWT for authentication using Access and Refresh Token. Context was used for state management and Next.js was great for handling conditional routing amongst other things
Thought Process
The most important part of the project was the Authentication and Authorization Flow, since there were only certain parts of the project meant for the general public. I also had to consider updating products inventory when purchases were made to notify users in case of product unavailability.
Lesson Learned
I learned the importance of implementing 0Auth authentication properly, making sure there were no leaks, and implementing role based security by assigning roles based on an algorithm that reads through the user's registration credentials.