Skip to content

Smart meter data analytics app built with the MEVN stack (MongoDB, Express, Vue, Node.js).

License

Notifications You must be signed in to change notification settings

gianantoniopini/meter-data-analytics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meter Data Analytics

Smart meter data analytics app built with the MEVN stack (MongoDB, Express, Vue, Node.js).

The app visualizes smart meter measurements time-series data and provides simple analytics.

The external-api simulates an external REST API providing smart meter measurements data. It implements authentication using JWT (JSON Web Tokens).
The back-end provides a REST API to retrieve the smart meter measurements data from the MongoDB database. It also provides an endpoint to import the data from the external-api into the database.
The front-end provides a single-page application to visualize the smart meter measurements data retrieved from the back-end REST API. It also provides simple analytics with graphs showing the data grouped by different time intervals.

All the smart meter data being used is just test data.

Requirements

Setup

1. external-api setup

1.1 Switch into the external-api directory

cd external-api

1.2 Install NPM packages

npm install

1.3 Create your .env file

See file .env.example for an example

1.4 Compiles and hot-reloads for development

npm run start

1.5 Runs tests

npm run test

1.6 Compiles for production

npm run build

1.7 Starts production

npm run start:production

2. back-end setup

2.1 Switch into the back-end directory

cd back-end

2.2 Install NPM packages

npm install

2.3 Create your .env file

See file .env.example for an example

2.4 Import some measurements data into MongoDB

File measurements.json.example contains some sample data and the following mongoimport command could be used to import it:

mongoimport --db=meter-data-analytics_db --collection=measurements --file=measurements.json.example

2.5 Compiles and hot-reloads for development

npm run start

2.6 Runs tests

npm run test

2.7 Compiles for production

npm run build

2.8 Starts production

npm run start:production

3. front-end setup

3.1 Switch into the front-end directory

cd front-end

3.2 Install NPM packages

npm install

3.3 Create your .env file

See file .env.example for an example.

3.4 Compile and hot-reload for development

npm run dev

3.5 Run unit tests

npm run test:unit

3.6 Type-check, compile and minify for production

npm run build

3.7 Preview production build

npm run preview