Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/healeycodes/order-tracking-microservice
Node/Express/Firebase microservice for sending users an auto-updating delivery tracking page! :hamburger::fries::beer:
https://github.com/healeycodes/order-tracking-microservice
express firebase nodejs
Last synced: about 2 months ago
JSON representation
Node/Express/Firebase microservice for sending users an auto-updating delivery tracking page! :hamburger::fries::beer:
- Host: GitHub
- URL: https://github.com/healeycodes/order-tracking-microservice
- Owner: healeycodes
- License: mit
- Created: 2019-02-04T19:09:49.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-24T12:18:48.000Z (almost 6 years ago)
- Last Synced: 2024-10-05T17:42:58.150Z (4 months ago)
- Topics: express, firebase, nodejs
- Language: JavaScript
- Homepage:
- Size: 188 KB
- Stars: 5
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/healeycodes/order-tracking-microservice.svg?branch=master)](https://travis-ci.org/healeycodes/order-tracking-microservice)
## Order Tracking Microservice :hamburger::fries::beer:
Node/Express/Firebase microservice for sending users an auto-updating delivery tracking page, controlled via RESTful API.
- Vanilla JS
- Mobile first
- Tested by Mocha
- Continuous integration by Travis CI
### UI
![Desktop](https://github.com/healeycodes/order-tracking-microservice/blob/master/preview.png)
### Workflow
Create an order and get its ID:
```
GET: /private/orders
-> 261df5c4-9d57-4d87-9323-fb995faa6cd5
```
Send that user to `/?orderId=261df5c4-9d57-4d87-9323-fb995faa6cd5`
Set their order's stage:
```
PUT: /private/orders
{
orderId: 261df5c4-9d57-4d87-9323-fb995faa6cd5,
stage: /* 1-5 */
}
-> OK
```
Their tracking page will update without a refresh.
### UI on an old iPhone
![Mobile](https://github.com/healeycodes/order-tracking-microservice/blob/master/mobile.png)
### Install
`npm install`
### Test
`$env:KEY='./path_to_serviceAccountKey.json'`
`$env:DB='https://your-firebase-test-db.firebaseio.com'`
`npm test`
### Run
`$env:KEY='./path_to_serviceAccountKey.json'`
`$env:DB='https://your-firebase-prod-db.firebaseio.com'`
`npm start`
Firebase uses a simple data store:
```
orders: {
id: {
started: Date.now(),
stage: 1
}
}
```
- MIT License, contributions welcome :heart: