Getting rid of products that are of no use to you anymore can always be a hassle. Whether it is the hassle of finding someone to take it off of your hands or figuring out how you are going to take it off of your hands, things can easily take an overwhelming turn the more products you need to get rid of. On the bright side, having a list of items you need to purchase can be just as overwhelming, making it a two party process. “How am I going to find these products? How am I going to make them in my possession? Where do I even start?”
The bigger picture
As times are constantly changing and knowledge is always evolving, all of us human beings are able to output more efficiently. Whether you are a furniture manufacturer or a software developer, new products are always being created which tend to leave some of the older products outdated. Let’s say a new way to display an indoor garden has been invented. It looks beautiful and takes away the hassle of having to water your cacti/flowers weekly, but there is one problem. It is expensive… meaning not everyone can afford it. Someone who can afford it, though, buys it the day it comes out and is now having to face the fact that he needs get rid of his old garden displayer. There must be a solution to making this process as easy as his new garden display watering his plants for him. Does he just throw it away? Maybe do some research to figure to see if it can be recycled? Does he just store it in his garage? Surely, there are many ways to go about this predicament, but why not just find someone who has been looking for this product to get it off of your hands AND make some money doing it. This is what Merchant Marketplace is for.
Having the ability to upload as many products that you are trying to get rid of is always a great feeling… it just means more space in your home when sold. To make sure you make the sale, merchants are able to upload pictures displaying what they are wanting to sell, add tags to let the buyers know what shape the product is in, and also having the ability to put category labels onto their products. These are all great ways to ensure that the buyers actually come across the seller’s products and make that purchase.
Looking for a garden displayer but can’t afford that new one? Don’t worry, Merchant Marketplace has your back. The merchants who have signed up and list their products WANT all of their inventories to be empty. This means that they have to commit to finding a buyer… which also means that their prices will always be reasonable. It may not be that new garden displayer, but hey you can officially say your indoor garden is looking great!
Let’s move onto what the buyers have the ability to do, and why they should use Merchant Marketplace. First off, it’s very easy to use. Having the ability to just type what you are looking for into a search, and finding many products that match your query is a great feeling. Not only that, but the products that will appear when searching are sorted by distance from your location. Next, buyers have the ability to get notified when something under their watchlist gets published onto the marketplace. If it’s more Persian rugs you are looking for, make sure to put it in your watch list to receive an email whenever a seller lists one for sale. Lastly, buyers just browse through all of the products that are listed for sale. Hey, who knows, maybe they have some extra cash and find something nice to accompany their garden.
How it all came together
In this section, I will be dedicating my words to give some insight on what went on behind the scenes. We did, of course, separate our Lambda Labs team into a backend team and frontend team, but we nonetheless managed to come together and stick together as one. Both sub teams were given repositories that had unfinished code, both joining together for an unfinished website. So the first step there was to go through the code, refactor if needed, and figure out exactly what needed to be done.
Figuring out what needed to be done wasn’t an issue. We basically just started the unfinished website (npm start), navigated through it like both a seller and buyer would, and checked to see what data wasn’t being stored or pulled up. From there, we took notes (using Trello) on what we found and proceeded to check the code out. We made sure to differentiate what migrations were already created and which ones needed to be created, which is what basically gave us our foundation when beginning to code.
Having most of the features that were already created fully functioning, we just had to adapt to the tables already made for the database and create new ones that intertwined with them. One example of this can be the orders table I created.
We had to link the orders table with both the profiles table and items table that were already created in order to successfully link an order to whoever chose to purchase this item and the actual item itself.
Moving on, I then was assigned to create the notifications feature. In order to make this work, I used the SendGrid API which allows your application to send emails to users from an authorized email.
What’s going on here is the following: a seller uploads a product to the marketplace with a category. The endpoint then searches for every user who has that category under their watchlist, and then sends an email to those users notifying them that a product they want has been listed to the marketplace.
Of course, just like diving straight into any learning material, challenges will surface and let it be known that it takes time to understand things in order to be utilized. Just like riding a bike, it will take time for you to stop falling and getting frustrated in order to appreciate the beauty of the creation. This API makes sending out emails one hundred times easier than it previously was, and also has a great website in which you can keep track of any email being sent out or received. It’s great.
Once I completed my assigned features for the backend, which truly did not take me a long time, I then decided to use my extra time to help out the front end where I can. From styling different pages on the website to grabbing data being sent from the backend, I then used everything I have learned in Lambda School to do the best I can. It did take me some time to get accustomed to how the code was structured, but once I figured out how everything is working I was able to jump right into coding and tackle anything that was being pushed aside or saved for later. I was able to create a fully functioning shopping cart that allows users to simply add products they are interested in to a page that saves even if they log out.
A pro, in my opinion, to being a full-stack developer is the fact that you know how to write both backend and frontend code. This is how I went about this feature, and since I knew exactly what was going on in the backend for this to function properly, it did not take too long to create a shopping cart page.
One thing I am proud of and will be forever grateful to Lambda School is that I was taught how to write clean code. Yes, there will always be room for improvement and growth within this industry, but I do hope that the next cohort in Labs that partakes in the Merchant Marketplace will be able to jump into the code with ease.