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:
- Node.js < v. 18
- Python < v. 3.8
- 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.
- Setup this repository locally
git clone https://github.com/tinybirdco/real-time-inventory-management-system
cd signatures-POC
- Install dependencies
npm install
- 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.
This script will also push the data project to your Tinybird workspace.
- Start generating data!
In the terminal, run the following command:
npm run seed
Go to your Tinybird workspace and check the data is flowing.
Once you have your backend setup, and you have data from the data generator, you can start the front end.
- Go to the
frontend
directory
cd frontend
- Install dependencies
npm install
- Create the .env file
cp .env.example .env
Then be sure to paste the admin token from Step 3 into the .env
file.
- Run the app locally
npm run dev
- Open http://localhost:5173 with your browser to see the result.
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.
This project is licensed under the MIT License.
We welcome contributions from the community! If you'd like to contribute to this project, please follow these steps:
- Fork the repository
- Create a new branch:
git checkout -b feature/your-feature-name
- Make your changes and commit them:
git commit -am 'Add your feature'
- Push the changes to your branch:
git push origin feature/your-feature-name
- Open a pull request on GitHub
If you have any questions, feed back, or need support, please open an issue.
• Community Slack • Tinybird Docs •