Marketplace Strategy works with a variety of clients to sustainably increase Amazon sales. They needed an application that would allow them to analyze competing products, find trends and identify opportunities within the Amazon marketplace. I designed and developed Insights, a proprietary application built in Vue, Node and PostgreSql.
- Users can create searches and associate them with clients
- Schedule searches and send results via email
- Track results to identify product ranking over time
- Search for multiple keywords at once
- Optionally filter duplicates from search results
- Download results to a csv file
- Database that supports one-to-one and one-to-many relationships
- Ability to send email
- Ability to run cron jobs
- Protected resource server
After reviewing the requirements I knew we needed to get product listings. There were a few similar products, like Jungle Scout that might be worth reverse engineering. However since most scrape product data through browser extensions they were not viable solutions. First off, they wouldn't work on mobile. Second, our IPs would eventually be blacklisted from Amazon since this approch is frowned upon. We needed an sustainable way to query results, not something that would work for a few months. After a little more research I found an API that worked perfectly. I used express to make requests to the api endpoints in order to fetch the data we needed.
Each product has a number of data points. These were not always important, so I made a reusable filter component. It’s a child component takes a list of properties as arguments. When a checkbox is clicked, the filter component passes the updated state to the parent, which in turn hides the property’s column.
Getting the search feature in front of users was the primary goal for v1. Thus, I set up Okta for authentication since it was, lightweight, simple and faster than coding my own. I was able to focus entirely on the search feature by delegating authentication to Okta. While I knew we would eventually outgrow Okta, it allowed users to provide feedback on v1 while I focused on more important features.
findUserByEmail(). Here is a high level overview of the sign-in flow.
Step by Step Auth Flow
- A users tries to log-in by providing an email and password
- A post request is sent to the login endpoint
- The submitted email is passed to the
- If we don’t find a user we display an error message on the form
- If we find a user we send the provided password is passed to the isPasswordValid function.
- Bcrypt unhashes the password stored in the database then compares it to the submitted password.
- If the passwords don’t match we display an error message.
- If the passwords match we create a JWT token and redirect to the Dashboard