Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bryanbill/transit-cannister
Logistics application cannister
https://github.com/bryanbill/transit-cannister
Last synced: 28 days ago
JSON representation
Logistics application cannister
- Host: GitHub
- URL: https://github.com/bryanbill/transit-cannister
- Owner: bryanbill
- Created: 2023-09-02T13:21:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-25T08:52:40.000Z (over 1 year ago)
- Last Synced: 2024-11-06T19:53:47.320Z (3 months ago)
- Language: TypeScript
- Homepage:
- Size: 88.9 KB
- Stars: 0
- Watchers: 1
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Transit - Logistics Application
This is a simple logistics application built on the DFINITY Internet Computer platform for managing users, orders, shipments, and payments.
## Prerequisites
Before you begin, ensure you have met the following requirements:
- [Node.js](https://nodejs.org/) installed.
- [DFINITY Canister SDK](https://sdk.dfinity.org/docs) installed.## Setup
1. Clone the repository:
```shell
git clone https://github.com/bryanbill/transit-canister.git
cd transit-canister
```2. Install dependencies:
```shell
npm install
```3. Build and Deploy the canister:
```shell
npm start
```4. Deploy the frontend:
Running the following command will deploy the frontend to the Internet Computer. The first
time it will take a while to deploy the frontend, but subsequent deploys will be much faster.```shell
npm run deploy
```## Usage
To use the application, open the URL generated in your browser then follow the steps below to get the core functionality of the application.
1. createUser - Create 3 different users, 2 as of type 'user' and 1 of type 'driver'
2. createUserLocation - Using the 3 users created in 1, create their respective locations
3. createOrder - Creating an order depends on the first two methods, it uses the user data and the location detail to calculate the transport amount `initial_amount`.
4. createShipment - Shipping requires an order id, a driver, a pickup location (sender location) and a delivery location (receiver location).