Skip to content

Energy dashboard - customer-driven project in collaboration with Trondheim Kommune

License

Notifications You must be signed in to change notification settings

WilliamHLe/energy-dashboard

Repository files navigation

TRDK02: Interactive Energy Dashboard

Quickstart

Prerequisites

Setup:

  1. Navigate to the root project directory
  2. Configure the environment variables
    1. Copy and rename .env.example to .env
    2. Change the variable values inside .env
  3. Install backend cd backend && npm i
  4. Install frontend cd frontend && npm i
  5. Obtain Highcharts license and install Highcharts
$ cd frontend
$ npm i highcharts highcharts-more highcharts-react-official

Running locally with Docker:

  1. Start Docker
  2. Start the application with docker-compose up

Where to access the application?

If new packages are installed you may have to run docker-compose up --build

Running locally without Docker:

This requires feeding the applications their environment variables or it will run without a database/api connection.

  1. Start frontend cd frontend && npm start
  2. Start backend cd backend && npm run dev

Possible problems during installation

  • If you run Windows be sure to set line separator settings to LF (Windows), especially for the files init-mongo.sh and seed-mongo.sh
  • If you need to delete the Docker volume:
  1. Run docker-compose down
  2. Run docker volume ls and copy the name of the volume you want to delete
  3. Run docker volume rm <name of the volume>

Tests

The project is set up with unit tests. These can be run with npm run test or npm run test:watch for both the frontend and backend application.

License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details. Do note the project uses Highcharts which requires a custom license to use. To run the project you therefore need to obtain a Highcharts license and install the Highcharts dependencies by your self.

About

Energy dashboard - customer-driven project in collaboration with Trondheim Kommune

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published