In this project, a 3-tier distributed application design implementing the functions of Amazon website is done. Different types of users are managed and implemented in Amazon Prototype. Though Amazon.com has wide range of features, this project is limited to only few important functionalities which cover all the essential features required to place an order and implement the functionalities which involve different roles. For each type of object, an associated database schema responsible for representing how a given object should be stored in a database is implemented.
System is built upon distributed architecture. Message queues is used as the middleware technology.
System supports the following types of entities:
a. Customers
b. Sellers
c. Admin users.
Project consists of multiple tiers:
- The client tier, where the user will interact with system
- The API tier, where all the server endpoints are, which takes requests from clients
- The middle tier/middleware/messaging system, which directs the requests from API layer to microservices in form of Kafka messages
- The sevices tier - this is where all the business logic reside which communicates with the Databases
- The Database tier, comprising a database to store the state of your entity objects
Functionalities like,
- Customers can Log/Sign In to the system
- Customer can also Search/Filter/Sort through 10000 available products via different criteria like Rating, Seller Name, Product Name, Price, etc.
- Customer can Add product to Cart/Wishlist and swap products between them, can Checkout and Place an order and can also track orders which are placed.
- Apart from these customer can update his/her profile by adding Profile Picture which is stored in AWS S3 and Add/Update multiple address and payment methods.
- On the other hand Admin and Seller can add product
- Admin and Seller can view analytics and change the order status.
- All these functionalities are implemented using REST based Web Services as Middleware technology. Kafka is used as a messaging platform for communication between front-end channels with backend systems.
Clone code from the master branch and extract files on your local computer.
You need to have NodeJS and NPM(Node Package Manager) installed on your local device to succesfully run this project.
Node can be installed through this website[https://phoenixnap.com/kb/install-node-js-npm-on-windows] Node can also be installed through NVM.
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
A step by step series of examples that tell you how to get a development env running
Clone repository on your local computer. Traverse through the Backend folder, open terminal in this folder and enter
npm install
This will download all the dependencies required for the project. After Installing all the dependencies enter
node index.js
"index.js" is our root file which will create connection with database and handle all the APIs
Travser to Frontend folder and again install the dependencies by entering
npm install
After Installing all the dependencies enter
npm start
- You need to install Kafka on your local computer and start Kafka and Zookeeper server. Apache Kafka(https://kafka.apache.org/downloads)
Travser to Kafka-Backend folder and again install the dependencies by entering
npm install
After Installing all the dependencies enter
node server.js
It will create Kafka topics and will connect to Kafka server.
Everything is set and you are good to go.
To run test for this system. Traverse to test folder in Backend and enter
npm test
This will run the tests defined in the file. You can add new Tests by adding test cases in this file.
To deploy this on live system go to aws.amazon.com and follow the steps to instantiate EC2 instance for each Backend, Frontend and Kafka Backend with Auto-Scaling and Load Balancer.
- NodeJS - Run time open source development platform
- JavaScript - Programing Language used
- React - The library used
- Redux - The library used
- Apache Kafka - A distributed streaming platform and Message Queues
- Passport-JWT Token - Authentication Strategy used
- MongoDB - NoSQL Database used
- Redis - Used for SQL Caching
- MySQL - SQL Database used
- Aayush Sukhadia
- Aditya Patel
- Deepen Patel
- Deep Khajanchi
- Harshil Shah