+
Performance Metrics
+ {Object.entries(metrics).map(([name, data]) => (
+
+ {name}: {data.average.toFixed(2)}ms avg
+
+ Count: {data.count}, Latest: {data.latest.toFixed(2)}ms
+
+ ))}
+
+
+ );
+};
+
+export default PerformanceMonitor;
diff --git a/frontend/src/components/ProductionErrorBoundary.js b/frontend/src/components/ProductionErrorBoundary.js
new file mode 100644
index 0000000..68f5bfc
--- /dev/null
+++ b/frontend/src/components/ProductionErrorBoundary.js
@@ -0,0 +1,209 @@
+import React from 'react';
+import {
+ Box,
+ Typography,
+ Button,
+ Paper,
+ Container,
+} from '@mui/material';
+import ErrorOutlineIcon from '@mui/icons-material/ErrorOutline';
+import RefreshIcon from '@mui/icons-material/Refresh';
+import HomeIcon from '@mui/icons-material/Home';
+import { reportError } from '../utils/errorHandler';
+
+class ProductionErrorBoundary extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ hasError: false,
+ error: null,
+ errorInfo: null,
+ errorId: null,
+ };
+ }
+
+ static getDerivedStateFromError(error) {
+ return { hasError: true };
+ }
+
+ componentDidCatch(error, errorInfo) {
+ const errorId = Date.now().toString();
+
+ this.setState({
+ error: error,
+ errorInfo: errorInfo,
+ errorId: errorId,
+ });
+
+ // Report error to monitoring service in production
+ reportError(error, 'Error Boundary', {
+ errorId,
+ componentStack: errorInfo.componentStack,
+ props: this.props,
+ });
+ }
+
+ handleRetry = () => {
+ this.setState({
+ hasError: false,
+ error: null,
+ errorInfo: null,
+ errorId: null,
+ });
+ };
+
+ handleGoHome = () => {
+ window.location.href = '/';
+ };
+
+ render() {
+ if (this.state.hasError) {
+ const { fallback: Fallback } = this.props;
+
+ if (Fallback) {
+ return (
+