This project is used in completion for my Capstone 2.
Used as the restful endpoint and socket.io server for 3 Systems:
- Parking Sensor
- An Android App
- A CodeIgniter Web Application (On the Browser)
Note: I can't post the Android App as well as the CodeIgniter Web App since it was made by a colleague of mine, and it is hosted on Bitbucket
The System Diagram
There are many routes that are created (due to Upfront design) but only the following are really used:
GET /parking_lots
returns the list of all parking lots in JSON formPUT /status
should contain payload{ id , status }
example:{ id: 1, status: 1 } where status of 0 is available or green and 1 is unavailable or red
Each time the Server receives a PUT /parking_lots/:id
request it broadcasts a status_changed
event to all connected clients along with the updated parking lot.
Signature:
socket.on('status_changed', (parking_lot))