An ecommerce platform to buy or exchange items at your convenience
BarterOnly is single-page, full-stack web application built using ReactJS and Ruby on Rails. It is an ecommerce platform where customers can list items they no longer need in exchange for cash or an exchange item. Customers can search the marketplace with hundreds of items, sort products based on certain attributes(date, price, rating) and categorize items. After acquiring an account, customers can either make a purchase for the full value of product or acquire item by making an exchange. A key feature of this platform is that it automatically matches a customer with other customers who are looking for items that they have. In combination with ReactJS, BarterOnly uses Redux - a state management React library to hold the state of the front-end application in a single store so that any component can have access or modify the global state, effectively eliminates passing of props from parent to child. Additionally, BarterOnly utilizes dynamic routing using React Routers, RESTful JSON API using Rails to give a feel of a dynamic web application. Moreover, this application implements the core concept of relational database as a foundation to relate data to one another so that information can be efficiently retrieved. The relationships are formed using ActiveRecord associations.
Following is the Entity Relationship Diagram that describes the entities/models and associations between these entities:
Following is the tree-like React Component Hierarchy that describes the component structure of the application’s front-end:
- ┬
- ├ App
- ┬
- ├ NavBar
- ├ LoginForm
- ├ UserRegisterForm
- ├ ProductListingContainer
- ┬
- ├ Categories
- ├ SearchField
- ├ SortSelection
- └ ProductListingsCollection
- ├ PrivateProductListings
- ├ MatchingProductListings
- └ PurchasedProducts
Link to back-end application: https://github.com/ahamedali95/BarterOnly-back-end
To start, run npm install
&& npm start
to get the app up and running. This will start the app at PORT 3000. To designate a different port number for the app, modify the scripts in package.json from "start": "react-scripts start"
to "start": "PORT={PORT NO.} react-scripts start"