This application serves as a mechanism for reading energy usage data and presenting this in a readable manner.
- Prove stack connectivity:
- React -> GraphQL (Apollo) -> InfluxDB
- This will be done when data can be requested from influx and displayed without formatting in a React component.
- Display in graph format
- Highchart.js to represent the data as a timeseries
- This will be done when an interactive graph is displayed to the user
- Improve design
- Allow user to choose timeframe to query data
- Tests desperately need improving
- General style is slightly outdated
- Query could be adapted to choose which datapoints are being retrieved
- Select the interval for polling
- Validation for time input
- update useEffect to conduct deep equality check on data object (lodash/useDeepCompareEffect?)
- Add authentication
- Cognito User Pool
- JWT stored as http cookie
- Improve networking for local dev env
- Nginx reverse proxy container
- Setup hosts file using shell script hosts.sh
- SSL cert
- CI
- GitHub Actions?
- lint -> build -> test
- Deployment
- EKS in private subnet + load balancers in public subnet?
- CloudFormation
- Bash to execute
- Data is streamed from source
- Data is normalised/validated in-flight by a function (csvParser.ts)
- Data is stored in InfluxDB
- ReactJS client
- ApolloClient to query GraphQL service
- User selects range and poll settings (stored in Context rather than redux)
- useQuery polls every
$POLL_INTERVAL
- useEffect parses response when response data changes and updates state for each metric
- The state for each metric is passed to the relevant display component (graph/metric cards)
- Ensure you have docker and Task installed
- Export the
INFLUX_TOKEN
env var for local use -export INFLUX_TOKEN=local_token
- Run
task init seed up
- Navigate to the http://localhost/3000