This project implements a MERN (MongoDB, Express.js, React.js, Node.js) stack application for managing product transactions.
The backend fetches data from a third-party API endpoint and initializes the database with seed data.
- ** Third Party API Endpoint**:
https://s3.amazonaws.com/roxiler.com/product_transaction.json
- New API Endpoint:
https://easy-cyan-coati-tux.cyclic.app/
- Request Method: GET
- Response Format: JSON
-
Initialize Database API
- Endpoint:
/api/products
- Method: GET
- Description: Initializes the database with data fetched from the third-party API.
- Endpoint:
-
List Transactions API
- Endpoint:
/api/search
- Sub-Endpoint:
/api/search?search=""&page=${page}&perPage=10
- Method: GET
- Description: Lists all transactions with support for search and pagination.
- Endpoint:
-
List Transactions API for Month
- Endpoint:
/api/search/search_month?month=""
- Method: GET
- Description: Lists all transactions with support for search and pagination.
- Endpoint:
-
Statistics API
- Endpoint:
/api/statistics/:month
- Method: GET
- Description: Provides statistics for the total sale amount, total sold items, and total not sold items for the specified month.
- Endpoint:
-
Bar Chart API
- Endpoint:
/api/barChart/:month
- Method: GET
- Description: Generates data for a bar chart displaying price ranges and the number of items in each range for the specified month.
- Endpoint:
-
Pie Chart API
- Endpoint:
/api/pieChart/:month
- Method: GET
- Description: Generates data for a pie chart showing unique categories and the number of items from each category for the specified month.
- Endpoint:
-
Combined Data API
- Endpoint:
/api/combinedData/:month
- Method: GET
- Description: Fetches data from all the above APIs for the specified month, combines the response, and sends a final response.
- Endpoint:
** https://frontend-azure-nine-78.vercel.app/
- Displays a table listing transactions for the selected month.
- Supports search and pagination.
- Default pagination values: page = 1, per page = 10.
- Displays total amount of sales, total sold items, and total not sold items for the selected month.
- Displays a bar chart showing price ranges and the number of items in each range for the selected month.
- Displays a bar chart showing Categories and the number of items in each range for the selected month.
- Clone the repository.
- Install dependencies for both frontend and backend.
- Start the backend server.
- Start the frontend development server.
- Access the application in your browser.
- MongoDB
- Express.js
- React.js
- Node.js
- Chart.js
- Axios
- Chakra UI
##Screenshort Of the App
- Dashboard Page