Skip to content

Latest commit

 

History

History
110 lines (74 loc) · 5.29 KB

README.md

File metadata and controls

110 lines (74 loc) · 5.29 KB

WeatherXM Explorer

The WeatherXM Explorer project implements a top view of the WeatherXM network.

We use GitHub Flow as our branching model.

Environment Setup

All contributors could use any IDE platform or code editor they want as long as they use the appropriate linter (eslint) and code formatter (prettier) as their config files exist inside the project's root folder.

Building

To build the app from source, you need to create a .env file in the root directory, according to the .env.template and make sure to fill in all the required variables. Then, install all the required dependencies by running one of the following commands:

npm

npm install

yarn

yarn install

After the above steps, you could start the development server on http://localhost:3001 by running one of the following commands:

npm

npm run dev

yarn

yarn dev

If you want to customize the port and address of dev server, just change the dev server settings in the nuxt.confing.ts file.

Important

Be aware that the use of FontAwesome Pro icons requires a valid Font Awesome Pro license. Font Awesome Pro is a premium icon set that provides additional features and icons beyond the free version. However, if you do not own a Font Awesome Pro license, feel free to replace the icons with those from an alternative font package or your custom icons.

GitHub Actions

We have 3 different GitHub Actions:

  1. Deploy on Dev: An action that runs by hand every time a dev version needs to be tested internally, building the app using dev ENV vars and docker-compose script, in order to dockerize the app and make sure all the dependencies are met.
  2. Flow for PRs on develop and main for wxm-explorer: An action that runs on every push on feature branch, building the app using the dev ENV vars and the Dockerfile script, in order to dockerize the app on the dev cluster and make sure all the dependencies are met.
  3. Flow for creating a release of wxm-explorer: An action that runs on every tag pushed, building the app production ENV vars, and the Dockerfile script in order to dockerize the app on the prod cluster and make sure all the dependencies are met.

Different Flavors

We have 3 different app flavors (consider flavors as different “build variants”). For each flavor a different .env file can be created for different environment variables, such as API_URL.

The 3 different app flavors are:

  1. Remote Mock: This flavor communicates with our remote mock API. Currently only for internal use.

  2. Remote Dev: This flavor communicates with our dev API. Currently only for internal use.

  3. Remote Prod: This flavor communicates with our production API, found on app.weatherxm.com. The API_URL on that environment file should be https://api.weatherxm.com

How to merge feature/ in Git?

When merging a feature/ PR on Git, we do squash merge with an explanatory and human-friendly commit message.

Internal Testing Releases

Our only (for now) internal channel to distribute our app to the team in order to test it is by deploying it on the dev machine. Different Remote flavors are supported.

In order to upload a version up for testing, one way can be used:

  1. Using a GitHub Action to automatically build, upload and distribute the app through the dev machine.

Production Releases (How To)

In order to create a new production release some mandatory steps should be followed that we will explain below:

  1. Create and push a new commit in main bumping the version in package.json file.
  2. git checkout main and create a commit tag with the title being the version name (X.X.X).
  3. Push the tag, this will trigger the Flow for creating a release of wxm-explorer action to run.

Languages and Tools:

ts javascript nuxtjs vuejs vuetify docker