real-time-inventory-management-system Svelte Themes

Real Time Inventory Management System

This repo contains an eCommerce demo to show a very basic example of real-time inventory management using Tinybird to ingest data, transform it, and publish endpoints. The demo is built using Svelte and Tailwind CSS.

Slack Status

Real-time inventory management demo

This repo contains an eCommerce demo to show a very basic example of real-time inventory management using Tinybird to ingest data, transform it, and publish endpoints. The demo is built using Svelte and Tailwind CSS.

It is deliberately simple to be quickly showable in a demo.

You can visit the deployed apps here:

Requirements

  • Node.js < v. 18
  • Python < v. 3.8

Getting Started

Data

  1. Setup your Tinybird account

Click this button to deploy the data project to Tinybird 👇

Follow the guided process, and your Tinybird workspace is now ready to start receiving events.

  1. Setup this repository locally
git clone https://github.com/tinybirdco/real-time-inventory-management-system
cd signatures-POC
  1. Install dependencies
npm install
  1. Setup Tinybird CLI

The install script above will automatically install and configure the tinybird-cli for this project.

Choose your region: 1 for us-east, 2 for eu. A new .tinyb file will be created.tb

Go to https://ui.tinybird.co/tokens and copy the token with admin rights.

⚠️Warning! The Admin token, the one you copied following this guide, is your admin token. Don't share it or publish it in your application. You can manage your tokens via API or using the Auth Tokens section in the UI. More detailed info at Auth Tokens management

This script will also push the data project to your Tinybird workspace.

  1. Start generating data!

In the terminal, run the following command:

npm run seed

Go to your Tinybird workspace and check the data is flowing.

Frontend

Once you have your backend setup, and you have data from the data generator, you can start the front end.

  1. Go to the frontend directory
cd frontend
  1. Install dependencies
npm install
  1. Create the .env file
cp .env.example .env

Then be sure to paste the admin token from Step 3 into the .env file.

  1. Run the app locally
npm run dev
  1. Open http://localhost:5173 with your browser to see the result.

Data

The data used in this demo is stored in the data-generator directory.

The data is generated using a Javascript script that uses the Faker library to generate fake data for this demo. The script is run using the npm run seed command.

License

This project is licensed under the MIT License.

Contributors

We welcome contributions from the community! If you'd like to contribute to this project, please follow these steps:

  1. Fork the repository
  2. Create a new branch: git checkout -b feature/your-feature-name
  3. Make your changes and commit them: git commit -am 'Add your feature'
  4. Push the changes to your branch: git push origin feature/your-feature-name
  5. Open a pull request on GitHub

Feedback and Support

If you have any questions, feed back, or need support, please open an issue.

Need help?

Community SlackTinybird Docs

Authors

Top categories

Loading Svelte Themes