CRA Metrics Visualizer is a powerful web performance analysis tool that provides comprehensive Lighthouse metrics visualization for React applications and any website. Built with React and Express, this tool offers an intuitive interface to analyze Core Web Vitals, performance metrics, and visual timelines of page loading.
- π Comprehensive Performance Metrics: Analyze First Contentful Paint (FCP), Largest Contentful Paint (LCP), Cumulative Layout Shift (CLS), and more
- π± Multi-Device Testing: Switch between mobile and desktop strategies for accurate performance analysis
- π¬ Visual Timeline: Interactive filmstrips showing page loading progression
- β‘ Real-time Analysis: Get instant Lighthouse reports with detailed performance insights
- π― Core Web Vitals Focus: Specialized visualization for Google's Core Web Vitals metrics
- π§ Developer-Friendly: Easy integration and deployment with modern web technologies
- Frontend: React 16.13.1, CSS3, Modern JavaScript (ES6+)
- Backend: Node.js, Express.js
- Performance Testing: Google Lighthouse 6.0.0, Puppeteer
- Deployment: Firebase Hosting, Glitch
- Browser Automation: Chrome Launcher, Puppeteer
- Largest Contentful Paint (LCP): Measures loading performance
- First Input Delay (FID): Measures interactivity
- Cumulative Layout Shift (CLS): Measures visual stability
- First Contentful Paint (FCP): Time to first content render
- Speed Index: How quickly content is visually displayed
- Time to Interactive (TTI): When page becomes fully interactive
- Total Blocking Time (TBT): Sum of all time periods between FCP and TTI
- Server Response Time: Backend performance measurement
- Node.js (v14 or higher)
- npm or yarn package manager
- Modern web browser
-
Clone the repository
git clone https://github.com/your-username/cra-metrics-visualizer.git cd cra-metrics-visualizer
-
Install dependencies
npm install # or yarn install
-
Start development server
# Start backend server npm run dev-server # In another terminal, start frontend npm run dev-client
-
Open your browser Navigate to
http://localhost:3000
# Build for production
npm run prod-build
# Start production server
npm start
- Enter any website URL in the input field
- Choose between mobile or desktop strategy
- Click "Analyze" to run Lighthouse performance audit
- View comprehensive metrics and visual timeline
- Green metrics: Good performance scores
- Orange metrics: Needs improvement
- Red metrics: Poor performance requiring attention
- Timeline visualization: Shows loading progression with filmstrips
GET /lighthouse?url={website_url}&strategy={mobile|desktop}
Parameters:
url
(required): Website URL to analyzestrategy
(optional): Testing strategy - 'mobile' or 'desktop' (default: mobile)
Response:
{
"audits": {
"first-contentful-paint": { ... },
"largest-contentful-paint": { ... },
"cumulative-layout-shift": { ... }
},
"categories": { ... },
"runtimeError": { ... }
}
GET /ping
Returns: pong
cra-metrics-visualizer/
βββ src/
β βββ components/
β β βββ Header/ # Navigation and branding
β β βββ LighthouseAction/ # URL input and analysis trigger
β β βββ MetricsVisualizer/ # Main visualization component
β β β βββ Timeline/ # Performance timeline
β β β βββ Filmstrips/ # Loading progression
β β β βββ ClsMetric/ # Layout shift visualization
β β βββ UI/ # Reusable UI components
β βββ utils/
β β βββ constants/ # Application constants
β β βββ helpers/ # Utility functions
β β βββ hooks/ # Custom React hooks
β βββ config.js # Environment configuration
βββ server.js # Express backend server
βββ package.json # Dependencies and scripts
- Update
src/utils/constants/index.js
with new metric definitions - Modify
src/App.js
to include the new metric in the analysis - Update visualization components as needed
- CSS files are co-located with components
- Uses CSS custom properties for theming
- Responsive design with mobile-first approach
npm run prod-build
firebase deploy
- Import project to Glitch
- Configure environment variables
- Deploy automatically
FROM node:14-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run prod-build
EXPOSE 5000
CMD ["npm", "start"]
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Follow React best practices
- Write meaningful commit messages
- Add tests for new features
- Ensure responsive design
- Optimize for performance
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Google Lighthouse Team for the powerful performance auditing tool
- React Community for excellent documentation and ecosystem
- Web Performance Community for Core Web Vitals standards
- Open Source Contributors who make projects like this possible
- Production: https://cra-metrics-visualizer.firebaseapp.com
- Development: https://anton-karlovskiy-cra-metrics-visualizer.glitch.me
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Wiki
Made with β€οΈ for the web performance community
Optimize your web performance with comprehensive Lighthouse metrics visualization