|
| 1 | + |
| 2 | +# ViriCiti Vue Assignment |
| 3 | +--- |
| 4 | + |
| 5 | + |
| 6 | +This repository holds the ViriCiti Vue assignment. In this project you will find the description regarding the assignment for you to do. This assignment represent what we do on a day to day basis. We receive raw data from vehicles store it on database then send it to browser app via web socket. |
| 7 | + |
| 8 | +--- |
| 9 | + |
| 10 | +## Getting Started |
| 11 | +First of all, fork the repository at: |
| 12 | + |
| 13 | +`https://github.com/viriciti/vue-assignment` |
| 14 | + |
| 15 | +Then open up your terminal and clone the forked repository |
| 16 | + |
| 17 | +<sup>Replace [YOUR_USERNAME] with your name</sup> |
| 18 | + |
| 19 | +`git clone https://github.com/[YOUR_USERNAME]/vue-assignment.git` |
| 20 | + |
| 21 | +Enter the directory |
| 22 | + |
| 23 | +`cd vue-assignment` |
| 24 | + |
| 25 | +Install all the dependencies |
| 26 | + |
| 27 | +`npm i` |
| 28 | + |
| 29 | +Run the app |
| 30 | + |
| 31 | +`npm start` |
| 32 | + |
| 33 | +--- |
| 34 | + |
| 35 | +## The Assignment |
| 36 | +We have provided you with a starter kit that broadcast vehicle data via web socket. You can find the HTTP server on `src/server/app.js`, it's a bare minimum setup containing an express server to serve HTML page and ws server that broadcast raw data. What you need to build is a front end application that should look like below: |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | +The whole front end application should be build with [Vue.js](https://vuejs.org/), but you're free to choose how it's build and composed. Data that are needed to render all those component is provided via the web socket connection. |
| 41 | + |
| 42 | +As you can see in this repository there are no webpack configuration and frontend server. You're free to create your own configuration, maybe you want different config for production and development. |
| 43 | + |
| 44 | +### Get Creative! |
| 45 | +You can also extend the functionality for both front end and back end of the application. For example, making a more informative front end or incident reporting on that alert the user when the vehicle went to fast on the road (this can be done both in the front end and back end, double points for back end implementation ;) ) |
| 46 | + |
| 47 | +### The data |
| 48 | +On websocket stream the data should look like this: |
| 49 | + |
| 50 | +```JS |
| 51 | +{ |
| 52 | + time: 1511512585495, |
| 53 | + energy: 85.14600000000002, |
| 54 | + gps: ["52.08940124511719","5.105764865875244"], |
| 55 | + odo: 5.381999999997788, |
| 56 | + speed: 12, |
| 57 | + soc: 88.00000000000007 |
| 58 | +} |
| 59 | +``` |
| 60 | + |
| 61 | +* time - Unix timestamp of the moment the datapoint was recorder |
| 62 | +* energy - Energy used in kWh |
| 63 | +* gps - Latitude and longitude where the datapoint was recorded |
| 64 | +* odo - The distance driven in km |
| 65 | +* speed - The speed the vehicle was going in km/h |
| 66 | +* soc - The state of charge (battery) of the vehicle in % |
| 67 | + |
| 68 | +## Read up material |
| 69 | +Looking to level up your knowledge and skills? These are some good articles/courses that you can check out. |
| 70 | +* [Vue JS](https://vuejs.org/) |
| 71 | +* [Chartjs](https://www.chartjs.org/) |
| 72 | +* [Node.js WebSocket](https://flaviocopes.com/node-websockets/) |
| 73 | +### General |
| 74 | +* Learn [Node.js and it's modules](http://nodeschool.io/#workshoppers) |
| 75 | + |
| 76 | +## Questions |
| 77 | +If you have any questions about the assignment or project setup feel free to contact us at <a href='mailto:e.tamames@viriciti.com'>e.tamames@viriciti.com</a> or <a href='mailto:s.surur@viriciti.com'>s.surur@viriciti.com</a>. You can also come by the office. We're always ready to help. |
| 78 | + |
| 79 | +Good luck with the assignment! |
0 commit comments