Quick Start Guide - Frontend Development¶
This guide provides step-by-step instructions to start developing the PatternFly 6 frontend.
Introduction¶
This guide focuses on getting the PatternFly 6 React frontend running with Vite for development. For backend setup or deployment, see the main project documentation.
Related Files¶
- Setup Guide - Prerequisites and setup overview
- Development Environment - Environment configuration
- PatternFly Guidelines - Development best practices
- Common Issues - Troubleshooting setup problems
Prerequisites¶
- Node.js 18+ and npm 9+
- Project repository already cloned
- Working from the project root directory
Step 1: Install Frontend Dependencies¶
# From project root, install all dependencies
npm install
# Or install only frontend dependencies
cd frontend && npm install
This installs:
- PatternFly 6 components and icons
- React 18 and React Router
- Vite build tool
- TypeScript and ESLint
Step 2: Start the Frontend Development Server¶
This starts the Vite dev server at http://localhost:3000 with:
- Hot Module Replacement (HMR)
- TypeScript support
- PatternFly 6 styles
- React DevTools integration
Note: The backend API can run separately if needed for full functionality.
Step 3: Verify PatternFly 6 is Working¶
- Open Browser: Navigate to
http://localhost:3000 - Check Styles: Verify PatternFly 6 components have
pf-v6-classes - Test HMR: Edit a component and see changes instantly
- Inspect Elements: Use browser DevTools to verify design tokens
- Toggle Theme: Test light/dark theme switching if implemented
What You Get¶
The LiteMaaS project includes:
Pre-configured Components¶
- PatternFly 6 component library
- React Router for navigation
- React Query for server state management
- i18n support (EN, ES, FR)
- Authentication context with OAuth2/JWT
Development Tools¶
- Vite for fast builds and HMR
- TypeScript for type safety
- ESLint for code quality
- Prettier for code formatting
Testing Setup¶
- Vitest for unit tests
- Playwright for E2E tests
- Testing utilities and fixtures
Next Steps¶
- Explore the Codebase: Review the generated file structure
- Read Documentation: Check PatternFly Guidelines
- Start Development: Begin building your application components
- Configure Environment: Set up Development Environment tools
Frontend Development Workflow¶
Key Directories¶
frontend/src/components- PatternFly 6 React componentsfrontend/src/pages- Page-level componentsfrontend/src/services- API service layerfrontend/src/assets- Static assets and styles
Development Best Practices¶
- Follow PatternFly 6 Guidelines - See PatternFly Guidelines
- Use Design Tokens - Never hardcode colors or spacing
- Test Both Themes - Verify in light and dark modes
- Check Accessibility - Use proper ARIA labels
- Use TypeScript - Maintain type safety
Troubleshooting Frontend Issues¶
Common Problems¶
- Port 3000 in use: Change port in
frontend/vite.config.ts - Vite HMR not working: Clear cache with
rm -rf frontend/node_modules/.vite - PatternFly styles missing: Ensure
@patternfly/react-core/dist/styles/base.cssis imported - TypeScript errors: Run
npm run type-checkto identify issues - ESLint errors: Run
npm run lint:fixto auto-fix
For more issues, see Common Issues
For detailed troubleshooting, see Common Issues.
Success Indicators¶
You're ready for PatternFly 6 development when:
- ✅ Frontend server running at
http://localhost:3000 - ✅ PatternFly 6 components render with
pf-v6-classes - ✅ Hot Module Replacement works instantly
- ✅ TypeScript compilation succeeds
- ✅ ESLint passes without errors
Next Steps¶
- Learn PatternFly 6 Patterns: Review Component Architecture
- Understand Design Tokens: See Styling Standards
- Check Components: Explore Component Documentation
- Migration Guide: If upgrading from v5, see Migration Codemods