{"id":20414490,"url":"https://github.com/codecov/gazebo","last_synced_at":"2025-04-06T09:09:18.290Z","repository":{"id":184011254,"uuid":"310336565","full_name":"codecov/gazebo","owner":"codecov","description":"React SPA","archived":false,"fork":false,"pushed_at":"2025-03-27T22:08:23.000Z","size":73771,"stargazers_count":56,"open_issues_count":39,"forks_count":26,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-30T08:08:52.283Z","etag":null,"topics":["codecov","fair-source","react","test-coverage","typescript","vite"],"latest_commit_sha":null,"homepage":"https://app.codecov.io/login","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codecov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2020-11-05T15:12:50.000Z","updated_at":"2025-03-30T00:47:28.000Z","dependencies_parsed_at":"2023-09-26T20:58:59.449Z","dependency_job_id":"8eb603e6-e293-4de6-9585-263113b9f9f3","html_url":"https://github.com/codecov/gazebo","commit_stats":{"total_commits":4925,"total_committers":42,"mean_commits":"117.26190476190476","dds":0.8322842639593908,"last_synced_commit":"324ff6c7c411ddace00d0b8b91201d13a4707962"},"previous_names":["codecov/gazebo"],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecov%2Fgazebo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecov%2Fgazebo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecov%2Fgazebo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecov%2Fgazebo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codecov","download_url":"https://codeload.github.com/codecov/gazebo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247457802,"owners_count":20941906,"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":["codecov","fair-source","react","test-coverage","typescript","vite"],"created_at":"2024-11-15T06:10:20.086Z","updated_at":"2025-04-06T09:09:18.270Z","avatar_url":"https://github.com/codecov.png","language":"TypeScript","readme":"# Gazebo\n\n[![codecov](https://codecov.io/gh/codecov/gazebo/branch/main/graph/badge.svg?token=UAP786D58M)](https://codecov.io/gh/codecov/gazebo)\n\n\u003e We believe that everyone should have access to quality software (like Sentry), that’s why we have always offered Codecov for free to open source maintainers.\n\u003e\n\u003e By making our code public, we’re not only joining the community that’s supported us from the start — but also want to make sure that every developer can contribute to and build on the Codecov experience.\n\nGazebo is the Front-end SPA of Codecov. It's a greenfield project we kicked off in November 2020 with the ambition of rewriting all the legacy pages from [codecov.io](https://github.com/codecov/codecov.io) and [codecov-client](https://github.com/codecov/codecov-client) in a single repository with a more modern approach.\n\nThis project was bootstrapped with [Vite](https://vitejs.dev/).\n\n## Prerequisites\n\nWe recommend using the same Node version as defined in the `package.json`, you can also refer to the `.nvmrc` in the root folder.\n\nIn order to use the Makefile to build a Docker image, you'll need to set an environment variable for `CODECOV_GAZEBO_IMAGE`. Set it to a string that will be used as a Docker image name to build to.\n\n## Run the project\n\nTo run the project in development mode\n\n```bash\n\u003e yarn\n\u003e yarn start\n```\n\nNote: The first run of `yarn start` may take 5-10 minutes to finish building.\n\nThe page will reload when you make edits. There is a local proxy to the staging API so you can develop against it. You can overwrite it by creating a `.env.development.local` file with it with the following:\n\n```text\nPROXY_TO=http://localhost:5100\n```\n\n## Run tests\n\nYou can run the tests with\n\n```bash\n\u003e yarn test\n```\n\nThis script is using Vitest, so any valid Vitest options can be added to the command.\n\nWe are using the [Testing Library](https://testing-library.com/docs/react-testing-library/intro) to test the React components.\n\n## Linting\n\n```bash\n\u003e yarn lint\n```\n\nwill lint the whole project.\n\n## Build the application for production\n\n```bash\n\u003e yarn build\n```\n\nwill build the application in the `build` folder.\n\n## Config\n\nThe config are centralized in one place in the file `config.js`. The file merges multiple configuration in one object:\n\n- hardcoded configuration in that file\n- the configuration from [process.env](#processenv) which is set on build-time\n- the configuration from `window.configEnv` which can be set on start-time\n\n### process.env\n\nGazebo supports [env files](https://vite.dev/guide/env-and-mode.html#env-variables-and-modes) by default which become environment variables at build-time.\n\nTo override environment variables when working locally create a `.env.development.local` file, this file is ignored by git.\n\nYou must prepend env variables with `REACT_APP`.\n\n```text\n# .env.development.local\nPROXY_TO=https://stage-api.codecov.dev\nREACT_APP_MY_CUSTOM_VAR=foobar\nREACT_APP_BASE_URL=http://localhost\n```\n\n```js\n// src/somefile.js\n\nimport config from 'config'\nconsole.log(config.MY_CUSTOM_VAR) // foobar\n```\n\nCurrently there's three env variables you may want to change when working locally:\n\n- PROXY_TO (Change where Gazebo API services are pointing to)\n- REACT_APP_MSW_BROWSER (boolean to enable mocking api requests in browser, see [How to mock HTTP responses in the browser](#How-to-mock-HTTP-responses-in-the-browser))\n- REACT_APP_BASE_URL (This is the base url where the legacy web container resides, needed for login/signout links)\n\n## How to mock HTTP responses in the browser:\n\nSometimes when working locally it helps to control API responses. For edge cases, for investigating support or on call incidents.\n\nIf you need to mock a response add `REACT_APP_MSW_BROWSER=true` to `.env.development.local` to enable browser mocks.\nMocks are located in `src/mocks/handlers`\n\nExample:\n\n```js\nimport { http, HttpResponse } from 'msw'\n\nexport const handlers = [\n  http.get('internal/user', (req, res, ctx) =\u003e {\n    return HttpResponse.json({ data: { mock: 'data' } })\n  }),\n]\n```\n\nRead more at the [official documentation.](https://mswjs.io/docs/getting-started/mocks/rest-api)\n\n## Contributing\n\nThis repository, like all of Codecov's repositories, strives to follow our general [Contributing guidelines](https://github.com/codecov/contributing).\nIf you're considering making a contribution to this repository, we encourage review of our Contributing guidelines first.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodecov%2Fgazebo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodecov%2Fgazebo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodecov%2Fgazebo/lists"}