This project comprises a dashboard connected to Amazon's SP-API for seller accounts, providing real-time insights into sales data. The goal is to offer a convenient way for users, particularly sellers, to monitor their sales status and track sales patterns over time through visually informative graphs.
Link to Site: https://ecom-alarm.netlify.app
-
Real-time Sales Data: The dashboard is linked to your Amazon seller account, allowing you to view the current status of your sales at any given moment.
-
Data Visualization: Visual representation of sales data over time through graphs and charts to facilitate a better understanding of sales patterns.
-
Threshold Notifications (Under Construction): Work in progress feature that enables users to set sales thresholds and receive notifications when a predefined dollar amount is reached from a specific subset of sales.
-
script.py
: Retrieves data from the Amazon SP-API. This script serves as the main data-fetching component. -
trial.py
: A Flask application responsible for forwarding data between the frontend and backend. It calls the main function inscript.py
.
-
client/
: Folder containing the React frontend files.-
src/
: React source files including components, styles, and utilities.-
Chart.jsx
: React component for the visual display of graph data. -
Other React files: Add descriptions for other React files as necessary.
-
-
npm dependencies
: Dependencies for the React project managed by npm. Install dependencies usingnpm install
. -
styles.css
: CSS file for styling the React components.
-
actions.yaml
: Defines a cron schedule to periodically execute thescript.py
function. This ensures that the data is regularly updated from Amazon, and Flask routing calls to the frontend are made to reflect the changes.
The application is hosted on Render to prevent it from spinning down every 15 minutes. The cron schedule serves a dual purpose: keeping the app running and updating the frontend data.
-
Clone the Repository:
git clone https://github.com/your-username/amazon-sp-api-dashboard.git cd amazon-sp-api-dashboard
-
Install Dependencies:
pip install -r requirements.txt cd client npm install
-
Configure Secrets:
- Ensure that the necessary credentials and secrets are correctly set as environment variables or in a configuration file.
-
Run the Application:
python trial.py
-
Access the Dashboard: Open your web browser and navigate to http://localhost:5000.
Contributions are not advised at this time.
This project is licensed under the MIT License.
Feel free to further customize this template according to your specific project structure and details.