This is a project built using React and Giraffe Library integrated with InfluxDB and Express.
Visualise real time data for Internet of Things devices. Allow user to select different kinds of graph types. Users will also be able to customise their dashboard to fit any number of different graphs on their customizable dashboard.
Client
React app created with create-react-app that uses Giraffe and RGL to render plots and customize dashboard. See the client
directory.
Server
ExpressJS server that uses both the InfluxDB API and the influxdb-client-js library to query data from an InfluxDB instance. See server
directory. You will need to set up your own InfluxDB environment and add your credentials to dotenv file.
Uses Nodemon to allow automatic restart upon saving code in editor for continuous testing.
Environment
- Fill in the .env file and place it in root of client folder
-
DASH_INFLUX_URL_DEVELOPMENT
= -
DASH_INFLUX_BUCKET_DEVELOPMENT
= -
DASH_ORG_ID_DEVELOPMENT
= -
DASH_INFLUX_TOKEN_DEVELOPMENT
= -
STATIC_INFLUX_URL_DEVELOPMENT
= -
STATIC_INFLUX_BUCKET_DEVELOPMENT
= -
STATIC_ORG_ID_DEVELOPMENT
= -
STATIC_INFLUX_TOKEN_DEVELOPMENT
= -
MYSQL_USER_DEVELOPMENT
= -
MYSQL_PASS_DEVELOPMENT
= -
DB_URL_DEVELOPMENT
= -
DB_NAME_DEVELOPMENT
=
Start server
- Navigate to
server
directory npm install
npm run server:dev
to start server with Nodemon on development environmentnpm run server:prod
to start server with Nodemon on production environment- Server starts at
localhost:3001
Start UI Environment
- Fill in the .env file and place it in root of server folder
REACT_APP_BACKEND_URL
=http://localhost:3001REACT_APP_DEFAULT_DEVICE
=EC2AMAZ-5FRJVA8REACT_APP_DEFAULT_DRIVE
=/REACT_APP_REACT_APP_AWS_API_URL
=REACT_APP_AUTH
=
- Navigate to
client
directory in second terminal npm install
npm run start
- Navigate to
localhost:3000