This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project Overview
PatternFly React Seed is a scaffolding utility for building web applications with PatternFly, React, TypeScript, and Webpack. It provides a complete starter template with routing, layout chrome (header/sidebar), build pipeline, and test suite.
## Development Commands
```bash
# Install dependencies
npm install
# Start development server (localhost:9000)
npm run start:dev
# Build for production (outputs to dist/)
npm run build
# Type checking
npm run type-check
# Linting
npm run lint
# Code formatting
npm run format
# Run all CI checks (type-check + lint + test:coverage)
npm run ci-checks
# Testing
npm run test # Run tests once
npm run test:watch # Run tests in watch mode
npm run test:coverage # Run tests with coverage report
# Production server (requires build first)
npm run start
```
## Architecture
### Build System
- **Webpack** for bundling (webpack.common.js, webpack.dev.js, webpack.prod.js)
- **TypeScript** with path aliases configured in tsconfig.json
- **dotenv-webpack** for environment variables (use `.env` file or export vars)
### Testing
- **Vitest** (not Jest) with @testing-library/react
import { Component } from '@app/Component/Component';
import imgSrc from '@assets/images/example.png';
```
### Asset Handling
**SVG files** have special handling based on location:
- `bgimages/` directory → inlined as data URLs for CSS backgrounds
- Elsewhere → raw-loader for inline HTML usage
- Fonts and pficon directories → asset/resource loader
**Raster images** from PatternFly assets use `@assets` prefix:
```typescript
import imgSrc from '@assets/images/g_sizing.png';
```
**Local app assets** use `@app` prefix:
```typescript
import loader from '@app/assets/images/loader.gif';
```
### Component Organization
Pages are organized under `src/app/` with one directory per feature:
- `Dashboard/` - main dashboard page
- `Support/` - support page
- `Settings/General/` - general settings page
- `Settings/Profile/` - profile settings page
- `AppLayout/` - page shell component
- `NotFound/` - 404 page
Each directory typically contains:
- Component file (e.g., `Dashboard.tsx`)
- Optional test file (e.g., `Dashboard.test.tsx`)
## Adding New Routes
1. Create component directory under `src/app/`
2. Add route definition to routes array in [src/app/routes.tsx](src/app/routes.tsx)
3. Import component at top of routes.tsx
4. Route appears in sidebar nav automatically if `label` is provided
## Adding Custom CSS
When importing CSS from a third-party package for the first time, register the stylesheet path in [stylePaths.js](stylePaths.js) to avoid parse errors. This is required for webpack performance optimization.
## Environment Variables
Use dotenv-webpack for environment configuration:
- Create `.env` file in project root, or
- Export at system level: `export MY_VAR=value && npm run start:dev`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
chore: updated with agent ready recommendations #271
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
chore: updated with agent ready recommendations #271
Filter by extension
Only manifest files
Viewed files
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.