{"id":51314580,"url":"https://github.com/jdwillmsen/usersrole","last_synced_at":"2026-07-01T06:05:29.302Z","repository":{"id":159610050,"uuid":"616742073","full_name":"jdwillmsen/usersrole","owner":"jdwillmsen","description":"This is a frontend application that  provides a template for users authentication and authorization","archived":false,"fork":false,"pushed_at":"2026-06-29T06:54:57.000Z","size":3038,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-29T08:17:21.443Z","etag":null,"topics":["authentication","authorization","github","google","template","twitter"],"latest_commit_sha":null,"homepage":"https://usersrole.web.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jdwillmsen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-21T01:39:40.000Z","updated_at":"2026-06-18T07:41:04.000Z","dependencies_parsed_at":"2023-07-23T22:27:27.657Z","dependency_job_id":"e47bcfb0-b6a4-41d1-9f5f-1e2d5d114d6a","html_url":"https://github.com/jdwillmsen/usersrole","commit_stats":null,"previous_names":["jdwillmsen/usersrole"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/jdwillmsen/usersrole","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdwillmsen%2Fusersrole","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdwillmsen%2Fusersrole/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdwillmsen%2Fusersrole/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdwillmsen%2Fusersrole/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdwillmsen","download_url":"https://codeload.github.com/jdwillmsen/usersrole/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdwillmsen%2Fusersrole/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34994885,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-01T02:00:05.325Z","response_time":130,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["authentication","authorization","github","google","template","twitter"],"created_at":"2026-07-01T06:05:26.113Z","updated_at":"2026-07-01T06:05:29.297Z","avatar_url":"https://github.com/jdwillmsen.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Users Role](https://usersrole.web.app/) \n\n[![Jest](https://github.com/jdwillmsen/usersrole/actions/workflows/jest.yml/badge.svg?branch=develop)](https://github.com/jdwillmsen/usersrole/actions/workflows/jest.yml)\n[![Lint](https://github.com/jdwillmsen/usersrole/actions/workflows/lint.yml/badge.svg)](https://github.com/jdwillmsen/usersrole/actions/workflows/lint.yml)\n[![Format](https://github.com/jdwillmsen/usersrole/actions/workflows/format.yml/badge.svg)](https://github.com/jdwillmsen/usersrole/actions/workflows/format.yml)\n[![CodeQL](https://github.com/jdwillmsen/usersrole/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/jdwillmsen/usersrole/actions/workflows/github-code-scanning/codeql)\n[![Cypress Component Tests](https://github.com/jdwillmsen/usersrole/actions/workflows/cypress-component.yml/badge.svg)](https://github.com/jdwillmsen/usersrole/actions/workflows/cypress-component.yml)\n[![Cypress E2E Tests](https://github.com/jdwillmsen/usersrole/actions/workflows/cypress-e2e.yml/badge.svg)](https://github.com/jdwillmsen/usersrole/actions/workflows/cypress-e2e.yml)\n[![Code Coverage](https://github.com/jdwillmsen/usersrole/actions/workflows/code-coverage.yml/badge.svg?branch=develop)](https://github.com/jdwillmsen/usersrole/actions/workflows/code-coverage.yml)\n![check-code-coverage](https://img.shields.io/badge/code--coverage-95.07%25-brightgreen)\n\nThis is a frontend application that is supposed to provide a template for\nusers authentication and authorization since these are common features to be\nused in most applications. It also includes features such as theme\nselection, snackbar service, alerts service, and a general site layout with\nheader, collapsable sidebar/navigation, and main content area. This\napplication is all a Progressive Web App (PWA) and can be downloaded as an app\non mobile and desktop devices.\n\nThe authentication is provided by Firebase with Google Identity Platform and\nthe authorization is built off of a node server that makes use of Firebase\nfunctions. The production server and all deployments are hosted with\nFirebase hosting.\n\nThe CI/CD tools used here are GitHub actions. There are two different\nactions/workflows for CD, one for deploying production and the other for raising\npreviews during pull requests. As well as few other checks within GitHub\n(CodeQL). Also, there is a server.js script in the repo that is used within\nCI/CD to retrieve and set up the environment file since they contain secrets.\nWhich are managed with GitHub secrets. For CI there are also various different\nactions for lint, format, jest (unit) tests, cypress (component, E2E) tests,\nand code coverage.\n\n## Development server\n\nRun `ng serve` for a dev server.\\\nNavigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.\\\nRun `firebase deploy` to upload the latest snapshot to the firebase servers.\\\nRun `firebase hosting:channel:deploy` to create and deploy a preview channel.\n\n## Code scaffolding\n\nRun `ng generate component [module-folder]/components/component-name --standalone` to generate a new component.\\\nRun `ng generate service [module-folder]/services/service-name` to generate a new service.\\\nYou can also use `ng generate directive|pipe|class|guard|interface|enum|module`.\n\n### Cypress scaffolding\n\nRunning `ng generate component component-name` will generate Cypress component test instead of default karma testing\nfile. This is due to the Cypress scaffolding declared in angular.json\n\n## Code Structure\n\n- src\n  - app\n    - modules\n      - components\n      - services\n      - etc\n    - shared\n      - components\n      - models\n    - core\n      - guards\n      - interceptors\n      - models\n      - services\n\nThe current code base is split it feature modules with there also being a shared module and a core module.\n\n## Build\n\nRun `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.\n\n## Format\n\nRun `npm run format` to format via [Prettier](https://prettier.io/)\n\n## Testing\n\n### Running lint test\n\nRun `npm run lint` or `ng lint` to execute the lint testing via [ESLint](https://eslint.org/)\n\n### Running unit tests\n\nRun `npm run jest` to execute the unit tests via [Jest](https://jestjs.io/).\n\n### Running component tests\n\nRun `npm run ct` to execute component tests in watch mode.\\\nRun `npm run ct:ci` to execute component tests in headless mode.\\\nThe component tests are making use of a testing framework called [Cypress](https://docs.cypress.io/guides/component-testing/overview).\n\n### Running end-to-end tests\n\nRun `npm run e2e` to execute e2e tests in watch mode.\\\nRun `npm run e2e:ci` to execute e2e tests in headless mode.\\\nThe e2e tests are making use of a testing framework called [Cypress](https://docs.cypress.io/guides/end-to-end-testing/writing-your-first-end-to-end-test).\n\n#### Setup test accounts\n\nIn order to run the tests you will have to set up the accounts.json fixture:\n\n```json\n{\n  \"basic\": {\n    \"uid\": \"rxF10vvSpTSWHQfD5FACZVGP8mm1\",\n    \"email\": \"cicd-basic-account@usersrole.com\",\n    \"displayName\": \"CICD Basic Account\",\n    \"password\": \"password here\",\n    \"roles\": [\n      \"user\"\n    ]\n  },\n  \"read\": {\n    \"uid\": \"r8MaoGbXzKSSFMQyBcdsN7Ed4t82\",\n    \"email\": \"cicd-read-account@usersrole.com\",\n    \"displayName\": \"CICD Read Account\",\n    \"password\": \"password here\",\n    \"roles\": [\n      \"user\",\n      \"read\"\n    ]\n  },\n  \"manager\": {\n    \"uid\": \"erRZHm1V63Sm13kUcmL2sH7i6cw2\",\n    \"email\": \"cicd-manager-account@usersrole.com\",\n    \"displayName\": \"CICD Manager Account\",\n    \"password\": \"password here\",\n    \"roles\": [\n      \"user\",\n      \"manager\"\n    ]\n  },\n  \"admin\": {\n    \"uid\": \"5O7R7eMdk8ZfhP5MeF6VDAzrXn13\",\n    \"email\": \"cicd-admin-account@usersrole.com\",\n    \"displayName\": \"CICD Admin Account\",\n    \"password\": \"password here\",\n    \"roles\": [\n      \"user\",\n      \"admin\"\n    ]\n  }\n}\n```\n\nThis will go in the cypress/fixtures folder and is not included in the repository for security reasons.\n\n## Code Coverage\n\nCode coverage will appear in the `coverage` folder in a structure like:\n\n- cypress-and-jest\n  - coverage\n    - .nyc_output\n    - cypress\n    - jest\n    - merged-report\n\n`.nyc_output` is the temporary directory where instrumented code output is placed.\\\n`cypress` is the directory where the coverage information/reports are for component and e2e tests.\\\n`jest` is the directory where the coverage information/reports are for the jest/unit tests.\\\n`merged-report` is the directory where the combine information/reports of jest, component, and e2e tests\n\n** Currently the merge code coverage report does not correctly combine all the reports. Hence the overall coverage is actually higher than the number listed.\n\n### Coverage commands\n\nRun `npm run jest:coverage` to get the unit tests coverage report.\\\nRun `npm run cypress:coverage` to get the cypress tests (component and e2e) report.\\\nRun `npm run all:coverage` to get the combined report (jest and cypress).\n\n## Project Info\n\nThis project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.2.4.\n\nProduction URL: https://usersrole.web.app/\n\n### Code Standards\n\nConventions followed for this project:\n\n- Data tags `data-*` should be kebab-case\n- For Cypress component \u0026 e2e testing use `data-cy` data tags\n\n### Developers\n\n- Jake Willmsen\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdwillmsen%2Fusersrole","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdwillmsen%2Fusersrole","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdwillmsen%2Fusersrole/lists"}