Skip to content

Web UI for Normative's Industry CO₂ Insights

License

Notifications You must be signed in to change notification settings

normative-io/sme-public-profile-client-public

Repository files navigation

Public Sector Average Emissions Dashboard aka Industry CO2 Insigths

A public dashboard for emissions.

Installation

🚧 Warning

It is currently not possible for developers not associated with Normative to start this project as it requires access to protected resources.

# Log in to NPM so you can access private packages.
$ yarn npm login
# Install all the dependencies.
$ yarn

Running the app

# Run the local dev server connected to local services
$ yarn run dev

# Build deployment bundle
$ yarn run build

# Run ESLint
$ yarn run lint

# Run Prettier and format
$ yarn run format

Running against Normative dev environment

You will need to create a file .env.dev-staging (this is gitignored and should not be committed to the repository). In this file, set variables:

PUBLIC_VAR_SECTOR_AVERAGE_SERVICE_PROTO_DOMAIN=... https://... domain for the dev sector-average-service.
CLIENT_GOOGLE_ANALYTICS_ID=xyz

Then you can launch a local server connected to the staging services:

$ yarn run dev-staging

Running in container

This project is part of public profile infrastructure and can start along with other services in a docker environment. To find out more how docker image is created/started, look at this README file

Dev setup

NVM, Node/NPM version:
The project is currently set up for Node 14. There is a .nvmrc file in the repository root, so you can run nvm use to switch to the matching version. It's also possible to integrate nvm with your shell further (for bash, zsh, fish) to run nvm use automatically when changing directories. See documentation.

VSCode TypeScript version:
To use the package.json defined version of TypeScript, open a .ts or .tsx file, then bring up the command palette (ctrl+shift+p), run "Select TypeScript Version...", and pick "Use Workspace Version".

EditorConfig:
The repo includes a .editorconfig to specify basic editor settings for indentation, character-set, etc. Please install the VS Code EditorConfig extension, or the plugin for your preferred editor/IDE so that the project settings will be used.

Contributing

This project is maintained by Normative but currently not actively seeking external contributions. If you however are interested in contributing to the project please sign up here or come join us.

Thank you to all the people from Google.org who were critical in making this project a reality!

License

Copyright (c) Meta Mind AB. All rights reserved.

Licensed under the Apache-2.0 license