{"id":20923790,"url":"https://github.com/patternfly/patternfly-react-seed","last_synced_at":"2025-05-16T04:04:50.881Z","repository":{"id":33834250,"uuid":"157783184","full_name":"patternfly/patternfly-react-seed","owner":"patternfly","description":"A PatternFly seed for React web applications ","archived":false,"fork":false,"pushed_at":"2025-04-29T19:30:10.000Z","size":4257,"stargazers_count":90,"open_issues_count":14,"forks_count":263,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-05-14T08:56:04.170Z","etag":null,"topics":["hacktoberfest","patternfly","react","seed","webpack"],"latest_commit_sha":null,"homepage":"http://patternfly-react-seed.surge.sh/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/patternfly.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-11-15T22:59:10.000Z","updated_at":"2025-04-29T19:30:15.000Z","dependencies_parsed_at":"2023-11-30T22:26:58.785Z","dependency_job_id":"d50cbf8f-f9ac-4086-92e5-ea8da20a2129","html_url":"https://github.com/patternfly/patternfly-react-seed","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/patternfly%2Fpatternfly-react-seed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patternfly%2Fpatternfly-react-seed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patternfly%2Fpatternfly-react-seed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patternfly%2Fpatternfly-react-seed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patternfly","download_url":"https://codeload.github.com/patternfly/patternfly-react-seed/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254464895,"owners_count":22075570,"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":["hacktoberfest","patternfly","react","seed","webpack"],"created_at":"2024-11-18T20:17:45.076Z","updated_at":"2025-05-16T04:04:50.832Z","avatar_url":"https://github.com/patternfly.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Patternfly Seed\n\nPatternfly Seed is an open source build scaffolding utility for web apps. The primary purpose of this project is to give developers a jump start when creating new projects that will use patternfly. A secondary purpose of this project is to serve as a reference for how to configure various aspects of an application that uses patternfly, webpack, react, typescript, etc.\n\nOut of the box you'll get an app layout with chrome (header/sidebar), routing, build pipeline, test suite, and some code quality tools. Basically, all the essentials.\n\n\u003cimg width=\"1058\" alt=\"Out of box dashboard view of patternfly seed\" src=\"https://github.com/user-attachments/assets/0227b366-67f1-4df8-8d92-e8e95d6e08b3\" /\u003e\n\n## Quick-start\n\n```bash\ngit clone https://github.com/patternfly/patternfly-react-seed\ncd patternfly-react-seed\nnpm install \u0026\u0026 npm run start:dev\n```\n## Development scripts\n```sh\n# Install development/build dependencies\nnpm install\n\n# Start the development server\nnpm run start:dev\n\n# Run a production build (outputs to \"dist\" dir)\nnpm run build\n\n# Run the test suite\nnpm run test\n\n# Run the test suite with coverage\nnpm run test:coverage\n\n# Run the linter\nnpm run lint\n\n# Run the code formatter\nnpm run format\n\n# Launch a tool to inspect the bundle size\nnpm run bundle-profile:analyze\n\n# Start the express server (run a production build first)\nnpm run start\n```\n\n## Configurations\n* [TypeScript Config](./tsconfig.json)\n* [Webpack Config](./webpack.common.js)\n* [Jest Config](./jest.config.js)\n* [Editor Config](./.editorconfig)\n\n## Raster image support\n\nTo use an image asset that's shipped with PatternFly core, you'll prefix the paths with \"@assets\". `@assets` is an alias for the PatternFly assets directory in node_modules.\n\nFor example:\n```js\nimport imgSrc from '@assets/images/g_sizing.png';\n\u003cimg src={imgSrc} alt=\"Some image\" /\u003e\n```\n\nYou can use a similar technique to import assets from your local app, just prefix the paths with \"@app\". `@app` is an alias for the main src/app directory.\n\n```js\nimport loader from '@app/assets/images/loader.gif';\n\u003cimg src={loader} alt=\"Content loading\" /\u003e\n```\n\n## Vector image support\nInlining SVG in the app's markup is also possible.\n\n```js\nimport logo from '@app/assets/images/logo.svg';\n\u003cspan dangerouslySetInnerHTML={{__html: logo}} /\u003e\n```\n\nYou can also use SVG when applying background images with CSS. To do this, your SVG's must live under a `bgimages` directory (this directory name is configurable in [webpack.common.js](./webpack.common.js#L5)). This is necessary because you may need to use SVG's in several other context (inline images, fonts, icons, etc.) and so we need to be able to differentiate between these usages so the appropriate loader is invoked.\n```css\nbody {\n  background: url(./assets/bgimages/img_avatar.svg);\n}\n```\n\n## Adding custom CSS\nWhen importing CSS from a third-party package for the first time, you may encounter the error `Module parse failed: Unexpected token... You may need an appropriate loader to handle this file typ...`. You need to register the path to the stylesheet directory in [stylePaths.js](./stylePaths.js). We specify these explicitly for performance reasons to avoid webpack needing to crawl through the entire node_modules directory when parsing CSS modules.\n\n## Code quality tools\n* For accessibility compliance, we use [react-axe](https://github.com/dequelabs/react-axe)\n* To keep our bundle size in check, we use [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer)\n* To keep our code formatting in check, we use [prettier](https://github.com/prettier/prettier)\n* To keep our code logic and test coverage in check, we use [jest](https://github.com/facebook/jest)\n* To ensure code styles remain consistent, we use [eslint](https://eslint.org/)\n\n## Multi environment configuration\nThis project uses [dotenv-webpack](https://www.npmjs.com/package/dotenv-webpack) for exposing environment variables to your code. Either export them at the system level like `export MY_ENV_VAR=http://dev.myendpoint.com \u0026\u0026 npm run start:dev` or simply drop a `.env` file in the root that contains your key-value pairs like below:\n\n```sh\nENV_1=http://1.myendpoint.com\nENV_2=http://2.myendpoint.com\n```\n\n\nWith that in place, you can use the values in your code like `console.log(process.env.ENV_1);`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatternfly%2Fpatternfly-react-seed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatternfly%2Fpatternfly-react-seed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatternfly%2Fpatternfly-react-seed/lists"}