diff --git a/src/App.safe.tsx b/src/App.safe.tsx
new file mode 100644
index 00000000..483d12d8
--- /dev/null
+++ b/src/App.safe.tsx
@@ -0,0 +1,139 @@
+import { useState, Suspense, lazy } from 'react';
+import './App.css';
+
+// Lazy load components to identify which one is breaking
+const StudentDashboard = lazy(() => import('./pages/StudentDashboard'));
+const ScoreFollowing = lazy(() => import('./pages/ScoreFollowing'));
+
+type ViewType = 'dashboard' | 'practice' | 'learn' | 'score-following';
+
+function LoadingFallback({ message }: { message: string }) {
+ return (
+
+ );
+}
+
+function ErrorBoundary({ children }: { children: React.ReactNode }) {
+ const [hasError, setHasError] = useState(false);
+ const [error, setError] = useState(null);
+
+ if (hasError) {
+ return (
+
+
❌ Erro ao carregar componente
+
+ {error?.toString()}
+ {'\n\n'}
+ {error?.stack}
+
+
+
+ );
+ }
+
+ try {
+ return <>{children}>;
+ } catch (e) {
+ setHasError(true);
+ setError(e as Error);
+ return null;
+ }
+}
+
+function App() {
+ const [currentView, setCurrentView] = useState('dashboard');
+
+ return (
+
+
+
+
+
+
🎹 Piano Tutor
+ Treinamento Inteligente com IA
+
+
+
+
+
+
+
+
+ }>
+ {currentView === 'dashboard' && }
+ {currentView === 'score-following' && }
+
+
+
+
+
+
+ );
+}
+
+export default App;