{"id":13906304,"url":"https://github.com/bcgov/range-web","last_synced_at":"2025-07-18T04:31:00.275Z","repository":{"id":29517596,"uuid":"120951690","full_name":"bcgov/range-web","owner":"bcgov","description":"The Range Mobile Pathfinder project is developing a suite of applications to support the sustainable management of cattle range on crown lands in British Columbia.","archived":false,"fork":false,"pushed_at":"2024-05-27T23:25:32.000Z","size":23839,"stargazers_count":9,"open_issues_count":169,"forks_count":11,"subscribers_count":11,"default_branch":"dev","last_synced_at":"2024-05-28T08:21:42.191Z","etag":null,"topics":["flnr","myra","range","react","reactjs"],"latest_commit_sha":null,"homepage":"https://myrangebc.gov.bc.ca","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bcgov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-09T20:21:54.000Z","updated_at":"2024-05-30T02:52:06.101Z","dependencies_parsed_at":"2023-01-14T15:15:27.144Z","dependency_job_id":"29d5e257-eed8-4a67-b5cb-cd9eeedcb4db","html_url":"https://github.com/bcgov/range-web","commit_stats":{"total_commits":2196,"total_committers":25,"mean_commits":87.84,"dds":0.5742258652094718,"last_synced_commit":"45c3e35abf74163be92f8c3e9f52b4db0c6a2cff"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcgov%2Frange-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcgov%2Frange-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcgov%2Frange-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcgov%2Frange-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcgov","download_url":"https://codeload.github.com/bcgov/range-web/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226344605,"owners_count":17610174,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flnr","myra","range","react","reactjs"],"created_at":"2024-08-06T23:01:33.140Z","updated_at":"2024-11-25T14:31:17.437Z","avatar_url":"https://github.com/bcgov.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"[![img](https://img.shields.io/badge/Lifecycle-Maturing-007EC6)](https://github.com/bcgov/repomountie/blob/master/doc/lifecycle-badges.md)\n\n# About My Range Application (MyRangeBC) for Web\n\nThe Range Mobile Pathfinder project is developing a suite of applications to support the sustainable management of cattle range on crown lands in British Columbia. [Learn more about the Range Program](https://www.for.gov.bc.ca/hra/)\n\nThe goal is to move important crown land management documents from paper to digital, and to make this information accessible in the field through disconnected mobile devices. This also supports a new and consistent process for Range staff across the province to support decision making processes.\n\nAn Agile Scrum team developed the Alpha product to test basic fuctions and was done March 31, 2018. Future releases by the Kamloops Range team at Kamloops Innovation Centre will lead towards an application that can be used by staff and public range use agreement holders, on multiple platforms.\n\nFor the Alpha Release, the web application documented here allows Range Branch Staff to view Range Use Plans that have been created in the iOS application. Soon, Range Officers will also be able to create and maintain records on web, but the offline abilities remain an iOS only feature for the time being. It also enables users to assign staff to a set of agreements they are responsible for managing.\n\n### Related MyRangeBc Documentation\n\n- [MyRangeBC iOS application Github Repository](https://github.com/bcgov/range-ios)\n- [MyRangeBC Web application Github Repository](https://github.com/bcgov/range-web)\n- [MyRangeBC API Github Repository](https://github.com/bcgov/range-api)\n- Our current Sprint Backlog is visible on GitHub Issues, see each repo for what is going on.\n- [See the database Schema on Schema-Spy](http://schema-spy-range-myra-dev.pathfinder.gov.bc.ca/)\n\n## Folder Structure\n\n```\nroot/\n  .eslintrc           // Displaying Lint Output in the Editor\n  LICENSE\n  README.md\n  package.json\n  semantic.json       // Semantic UI build settings for gulp\n  coverage/           // Test coverage\n  openshift/\n  public/             // Images, index.html etc...\n  semantic/           // Semantic UI custum styling definitions and overrides\n  src/\n    actionCreators/   // Network related Redux actions\n    actions/          // Redux actions\n    components/       // React components\n    constants/        // Variables, strings, etc...\n    reducers/         // Redux reducers\n    semantic/         // Minified Semantic UI\n    styles/           // All the Sass files\n    tests/            // Integration and Unit testing\n    utils/            // Helper functions\n    index.js\n```\n\nFor the project to build, **these files must exist with exact filenames**:\n\n- `public/index.html` is the page template;\n- `src/index.js` is the JavaScript entry point.\n\n## Environment variables\n\n```bash\nREACT_APP_SSO_REALM_NAME= # Realm name for SSo\nREACT_APP_SSO_CLIENT_ID= # Client ID for SSO\nREACT_APP_API_URL= # API URL. Hosted dev API is at https://web-range-myra-dev.pathfinder.gov.bc.ca/api.\n```\n\nThere are example environment variables in `.env.example` that you can copy into `.env`.\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm start`\n\nRuns the app in the development mode.\nOpen [http://localhost:3000](http://localhost:3000) to view it in the browser.\n\n### `npm test`\n\nLaunches the test runner in the interactive watch mode.\u003cbr\u003e\n\n### `npm test -- --coverage`\n\nLaunches the test runner with a coverage report.\u003cbr\u003e\n\n### `npm run build`\n\nBuilds the app for production to the `build` folder.\nIt correctly bundles React in production mode and optimizes the build for the best performance.\u003cbr\u003e\u003cbr\u003e\n\nIn `/semantic` directory, you can also run:\n\n## Running E2E tests with Cypress\n\nTo begin, start the E2E API. This is a separate docker-compose environment from what you may use normally for local development, and must be running for the end-to-end tests to work.\n\n```bash\nnpm run test:e2e:api:start\n```\n\n\u003e If you want to completely remove the end-to-end API, you can run `npm run test:e2e:api:clean`.\n\nThen, to open Cypress in development mode:\n\n```bash\nnpm run test:e2e:dev\n```\n\nAlternatively, if you just want to run the E2E tests in a headless environment:\n\n```bash\nnpm run test:e2e:run\n```\n\n### `gulp build`\n\nBuilds all files for Semantic UI including js, css, and assets. Build tool settings are stored in semantic.json.\n\n## Create React App\n\nThe application was built on top of [Create-React-App](https://github.com/facebook/create-react-app) with [Redux selector pattern](https://github.com/markerikson/react-redux-links/blob/master/redux-reducers-selectors.md#selectors) for state management and [React Router v4](https://github.com/ReactTraining/react-router) for routing \u0026 code splitting. The project was ejected once to add more plugins and make changes in Webpack configuration, then it was switched back to the unejected state with the newer version since it took care of all the demands.\n\n## Routing \u0026 Code Splitting\n\nThis project takes advantage of React Router v4 to acheive many things such as authentication, authorizing users based on their roles, code splitting, dynamic route matching and so on.\n\nCreate React App allows us to dynamically import parts of our app using the `import()` proposal to reduce initial load time. Related reference can be found [here](https://serverless-stack.com/chapters/code-splitting-in-create-react-app.html).\n\n## Styling\n\n- [Semantic UI React](https://react.semantic-ui.com/usage) was chosen for the main css framework. It includes Gulp build tools so the project can preserve its own theme changes, allowing us to customise the style variables. Detailed documentation on theming in Semantic UI can be found [here](http://learnsemantic.com/developing/customizing.html).\n\n- [BEM(Block Element Modifier)](http://getbem.com/introduction) methodology was chosen for naming convention.\n\n- Integration with Sass\n\n- Post-Processing CSS\n\n  ```css\n  .App {\n    display: flex;\n  }\n  ```\n\n  becomes this:\n\n  ```css\n  .App {\n    display: -webkit-box;\n    display: -ms-flexbox;\n    display: flex;\n  }\n  ```\n\n## Openshift Deployment Cheatsheet:\n\n- image-stream: range-myra-web\n- app build-config: range-myra-web-dev-build\n- outputs to: range-myra-web:latest\n\n- image-stream: range-myra-web-caddy\n- caddy build-config: range-myra-web-caddy-dev-build\n- input image stream tag: range-myra-web:latest\n- output image stream tag: range-myra-web-caddy:latest\n\n- deploy-config: range-myra-web-caddy\n- trigger: range-myra-web-caddy:test\n\n* [Github Action Openshift image build + tag](https://github.com/bcgov/range-web/blob/dev/.github/workflows/deploy-test.yml)\n  Make sure your SA can only build and tag!\n\n## License\n\n    Copyright 2018 Province of British Columbia\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n\u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by/4.0/\"\u003e\u003cimg alt=\"Creative Commons Licence\" style=\"border-width:0\" src=\"https://i.creativecommons.org/l/by/4.0/80x15.png\" /\u003e\u003c/a\u003e\u003cbr /\u003e\u003cspan xmlns:dct=\"http://purl.org/dc/terms/\" property=\"dct:title\"\u003erange-web\u003c/span\u003e by \u003cspan xmlns:cc=\"http://creativecommons.org/ns#\" property=\"cc:attributionName\"\u003ethe Province of Britich Columbia\u003c/span\u003e is licensed under a \u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by/4.0/\"\u003eCreative Commons Attribution 4.0 International License\u003c/a\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcgov%2Frange-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcgov%2Frange-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcgov%2Frange-web/lists"}