The Ministry of Energy, Mines, and Low Carbon Innovation (EMLI), Ministry of Environment and Climate Change Strategy (ENV), and Environmental Assessment Office (EAO) have collaborated to make information on the Province’s oversight of major mines in British Columbia accessible.
The application is being developed as an open source solution.
To get a local copy up and running follow these steps.
Git commit signing is required for commits. How to setup git commit signing
Software Requirements
- Node 20 or higher must be installed.
- @angular/cli should be installed.
To connect to the openshift dev database:
- Login to openshift and copy the login token (Click your name in the top right)
- In a terminal paste and run the login command.
- Ensure no other postgres instance is running or choose another port (brew services stop postgresql)
- Run the command: (Note: If the pod restarts, the pod name may change.)
oc port-forward cms-postgres-1-2cn2c 5432:5432 -n f00029-dev
To connect to the frontend:
- Install angular/cli
npm i -g @angular/cli
cd bcmi
npm install
npm run start
To connect to Strappi and graphql:
- create an .env file in the cms folder using the .env.template, find secrets in openshift
npm install
cd cms
npm install
npm run develop
- go to the pods openshift secrets to find the strappi login details
- Login to strapi admin at http://localhost:1337/admin
- See graphql queries at http://localhost:1337/graphql (ensure the strappi content has the 'find' role enabled)
Set up via Jest.
- Run
npm test
to execute the unit tests.
Set up with BDDStack and BrowserStack. Modify GebConfig.groovy
to customise your preferred browser. Configured remotes, confirmed to work with current tests include Chrome, Firefox, and Edge. Internet explorer and Safari are available as well, but tests fail due to driver compatiblity with current tests.
Open Source projects have free access to Browserstack Live and Automate, for up to 5 team members. To run tests with Browserstack you need to set the following environemnt variables:
- BROWSERSTACK_USERNAME
- BROWSERSTACK_TOKEN
- DEBUG_MODE (true or false)
-
Run
ng run e2e
to automatically start the application locally and execute the end-to-end tests against a headless Chrome.OR
-
Download BrowserStack binary set
BASEURL
to your local application address, and run./gradlew remoteChrome
Note, e2e functional testing requires Java 10+.
- Determine the URL at which the application is running.
- Update the baseurl to the URL from step 1:
- Either modify the GebConfig.groovy baseUrl directly.
- Or set a
BASEURL
environment variable
- See
functional-tests/readme.md
for how to execute the tests.
See the BDDStack Wiki for more information.
BCMI is built using TypeScript and Angular for the front end, with Jest for testing. It employs PostgreSQL for database management and Node.js for the server, alongside Bootstrap and jQuery for design and interactivity. GraphQL facilitates data querying, while Strapi acts as the headless CMS.
Our production and staging environments run on an OpenShift container platform cluster. OpenShift templates for services are located in the openshift/
folder, along with more information about dev and staging environments on our cluster.
Feel free to create pull requests from the default "master" branch, click here to create one automatically: https://github.com/bcgov/mem-mmti-public/pull/new/master
Government employees, the public and members of the private sector are encouraged to contribute. Check the BC Developer Exchange website, where paid opportunities to build features are posted. Please read and follow our Code of Conduct.
All contributors retain original copyright, but are granting a world-wide, royalty-free, perpetual, irrevocable, non-exclusive, transferable license to all users. This project is covered by an Apache v2.0 license.
Code released under the Apache License, Version 2.0.
More documentation for the repository can be found in the following places