{"id":15154126,"url":"https://github.com/mongodb/devhub","last_synced_at":"2025-09-30T01:32:31.160Z","repository":{"id":38425150,"uuid":"238064745","full_name":"mongodb/devhub","owner":"mongodb","description":null,"archived":true,"fork":false,"pushed_at":"2023-10-05T02:04:11.000Z","size":68691,"stargazers_count":11,"open_issues_count":36,"forks_count":12,"subscribers_count":9,"default_branch":"staging","last_synced_at":"2024-12-20T20:04:26.985Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"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/mongodb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"code-of-conduct.md","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-02-03T21:22:09.000Z","updated_at":"2024-01-14T00:00:54.000Z","dependencies_parsed_at":"2024-08-22T23:57:24.376Z","dependency_job_id":"c38846b3-9f94-4356-ac33-1d6f5b0d8ae3","html_url":"https://github.com/mongodb/devhub","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fdevhub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fdevhub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fdevhub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fdevhub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mongodb","download_url":"https://codeload.github.com/mongodb/devhub/tar.gz/refs/heads/staging","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234687209,"owners_count":18871714,"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":[],"created_at":"2024-09-26T17:02:43.583Z","updated_at":"2025-09-30T01:32:30.350Z","avatar_url":"https://github.com/mongodb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![DevHub npm test](https://github.com/mongodb/devhub/workflows/DevHub%20npm%20test/badge.svg)\n![DevHub CI test](https://github.com/mongodb/devhub/workflows/DevHub%20CI%20test/badge.svg)\n\n# MongoDB Developer Hub Front-End\n\nUses [Gatsby](https://www.gatsbyjs.org/) to build static site.\n\n## Installation\n\nStarting in September 2021, we use Artifactory (MongoDB's internal package repository) as our primary source of dependencies. With this comes the requirement to login to Artifactory using some credentials. At the time of updating this guide, we are working out our service account on artifactory and getting our API key, but for now you will need to set the following ENV variables in `~/.bash_profile` (which can be 0bined from a team member) `NPM_AUTH` and `NPM_EMAIL`.\n\n```shell\nnpm ci\n```\n\n### .env file setup\n\nYou'll need to set some environment variables in two separate files at the root of this directory for separate production/development environments.\n\n#### `.env.production`\n\nSnooty's `build` and `serve` stages use the `production` environment. Your `.env.production` file should be as follows:\n\n```\nGATSBY_SITE=\u003cSITE\u003e\nGATSBY_PARSER_USER=\u003cUSER\u003e\nGATSBY_PARSER_CI_USER=jordanstapinski\nGATSBY_PARSER_BRANCH=\u003cBRANCH\u003e\nGATSBY_SNOOTY_DEV=true\n```\n\n#### `.env.development`\n\nSnooty's `develop` stage uses the `development` environment. Your `.env.development` file should be as follows:\n\n```\nGATSBY_SITE=\u003cSITE\u003e\nGATSBY_PARSER_USER=\u003cUSER\u003e\nGATSBY_PARSER_CI_USER=jordanstapinski\nGATSBY_PARSER_BRANCH=\u003cBRANCH\u003e\nGATSBY_SNOOTY_DEV=true\n```\n\nThe `GATSBY_SNOOTY_DEV` variable is what allows Gatsby to know that when the application is built it should use the snooty branch name as part of the file paths. When not set, the file paths will use the value of `GATSBY_PARSER_BRANCH`.\n\nIt should be set to `true` when working on snooty locally.\n\n## Running locally\n\nTo serve a \"hot-reloadable\" development build of the site at `localhost:8000`, run:\n\n```shell\nnpm run develop\n```\n\nTo build and serve a production build of the site, run the following commands:\n\n```shell\n$ npm run build\n$ npm run serve\n```\n\nTo production build and serve without using Gatsby prefix-paths:\n\n```shell\n$ npm run buildTest\n$ npm run serveTest\n```\n\nThis will then serve the site at `localhost:9000`\n\n## Staging\n\nInstall [mut](https://github.com/mongodb/mut) and ensure that you have properly configured your Giza/AWS keys. Then, from root, run:\n\n```shell\nmake stage\n```\n\n### Unit tests\n\nUnit tests are located in the `tests/unit/` directory. To run only unit tests, use:\n\n```shell\nnpm run test:unit\n```\n\n### Integration tests\n\nIntegration tests are located in the `cypress` directory and are run on the Cypress framework. First, build a production build of the site without prefix-paths using the following command:\n\n```shell\n$ npm run buildTest\n$ npm run serveTest\n```\n\nand then load the Cypress UI using:\n\n```shell\n$ npm run test:e2e:start\n```\n\nor run headless with:\n\n```shell\n$ npm run test:e2e:headless\n```\n\n### Running individual suites\n\nJest includes configurations for running individual test suites:\n\n```shell\nnpm test -- my-test   # or\nnpm test -- path/to/my-test.js\n```\n\nFor more information, see the [Jest CLI Options](https://jestjs.io/docs/en/cli) documentation, or run `npm test -- --help`.\n\n## Linting \u0026 Style\n\nWe use [ESLint](https://eslint.org) and [Prettier](https://prettier.io) to help with linting and style.\n\n### Style\n\nTo format code using Prettier, run the following command:\n\n```shell\nnpm run format:fix\n```\n\nWe have set up a precommit hook that will format staged files. Prettier also offers a variety of editor integrations to automatically format your code.\n\nCheck out the [internal wiki](https://wiki.corp.mongodb.com/display/DE/Developer+Hub+Front-End) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb%2Fdevhub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmongodb%2Fdevhub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb%2Fdevhub/lists"}