diff --git a/src/App.tsx b/src/App.tsx index 2bc0785..360c7e1 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -12,6 +12,7 @@ import { PlansView } from './components/PlansView'; import { AdminDashboard } from './components/AdminDashboard'; import { LandingPage } from './components/LandingPage'; import { ProfileView } from './components/ProfileView'; +import { MarketTicker } from './components/MarketTicker'; import { TrendingUp, ShieldAlert, Ghost, Mail, Lock, UserPlus, LogIn, Loader2, ArrowLeft, User as UserIcon, Eye, EyeOff } from 'lucide-react'; import { motion, AnimatePresence } from 'motion/react'; import { onAuthStateChanged, signInWithEmailAndPassword, createUserWithEmailAndPassword, updateProfile, signOut, sendEmailVerification, sendPasswordResetEmail, User, setPersistence, browserLocalPersistence, browserSessionPersistence } from 'firebase/auth'; @@ -208,7 +209,12 @@ export default function App() { if (loading) { return ( -
+
+ Logo
); @@ -543,11 +549,16 @@ export default function App() {
- + -
+
+ {/* Market Ticker */} +
+ +
+ {/* Desktop Header */} -
+
Olá Humano, Bem-Vindo

diff --git a/src/components/AdminDashboard.tsx b/src/components/AdminDashboard.tsx index 3536606..e66ebee 100644 --- a/src/components/AdminDashboard.tsx +++ b/src/components/AdminDashboard.tsx @@ -127,8 +127,12 @@ export const AdminDashboard: React.FC = () => {
-
- {user.name?.charAt(0) || user.email?.charAt(0)?.toUpperCase()} +
+ {user.name}
{user.name} diff --git a/src/components/LandingPage.tsx b/src/components/LandingPage.tsx index 8eb9b9d..4abf490 100644 --- a/src/components/LandingPage.tsx +++ b/src/components/LandingPage.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { motion } from 'motion/react'; import { TrendingUp, ShieldCheck, Zap, BarChart3, Globe, ChevronRight, CheckCircle2 } from 'lucide-react'; +import { MarketTicker } from './MarketTicker'; interface LandingPageProps { onGetStarted: () => void; @@ -57,8 +58,13 @@ export const LandingPage: React.FC = ({ onGetStarted, onViewPl
+ {/* Market Ticker */} +
+ +
+ {/* Hero Section */} -
+
{ + const [items, setItems] = useState([ + { symbol: 'EURUSD', price: '1.08542', change: '+0.12%', isUp: true }, + { symbol: 'GBPUSD', price: '1.26410', change: '-0.05%', isUp: false }, + { symbol: 'USDJPY', price: '151.420', change: '+0.25%', isUp: true }, + { symbol: 'XAUUSD', price: '2345.12', change: '+0.84%', isUp: true }, + { symbol: 'BTCUSD', price: '64240.5', change: '-1.20%', isUp: false }, + { symbol: 'NAS100', price: '18240.2', change: '+0.45%', isUp: true }, + { symbol: 'AUDUSD', price: '0.65120', change: '+0.08%', isUp: true }, + { symbol: 'USDCAD', price: '1.35410', change: '-0.02%', isUp: false }, + ]); + + useEffect(() => { + const interval = setInterval(() => { + setItems(prev => prev.map(item => { + const changeVal = (Math.random() * 0.0002) - 0.0001; + const newPrice = parseFloat(item.price) + parseFloat(item.price) * changeVal; + return { + ...item, + price: newPrice.toFixed(item.symbol.includes('JPY') ? 3 : 5) + }; + })); + }, 3000); + return () => clearInterval(interval); + }, []); + + return ( +
+
+ {[...items, ...items].map((item, idx) => ( +
+ {item.symbol} + {item.price} +
+ {item.isUp ? : } + {item.change} +
+
+ ))} +
+
+ ); +}; diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 5589f88..dcb2e89 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -6,9 +6,10 @@ interface NavbarProps { activeTab: string; setActiveTab: (tab: string) => void; isAdmin?: boolean; + user?: any; } -export const Navbar: React.FC = ({ activeTab, setActiveTab, isAdmin }) => { +export const Navbar: React.FC = ({ activeTab, setActiveTab, isAdmin, user }) => { const mainTabs = [ { id: 'scan', label: 'Scan IA', icon: LayoutDashboard }, { id: 'history', label: 'Histórico', icon: History }, @@ -91,6 +92,21 @@ export const Navbar: React.FC = ({ activeTab, setActiveTab, isAdmin {/* Account Section */}
+ {user && ( +
+
+ My Avatar +
+
+ Meus Dados + ID: {user.uid.slice(0, 8)}... +
+
+ )}
Conta & Ajuda
{accountTabs.map((tab) => (
@@ -148,7 +148,7 @@ export const PlansView: React.FC = ({ isUnauthenticated, onGetSt }; return ( -
+
{/* Background Image requested by user */}
= ({ isUnauthenticated, onGetSt
{/* Slight overlay for readability */}
+ {!isUnauthenticated && ( +
+
+
+ )} + {isUnauthenticated && ( )} - {/* 1. HERO SECTION */} -
- {/* Background Image for this specific section */} -
- Hero Background -
-
-
- - -
+ {/* 1. HERO SECTION - Only show prominently if unauthenticated */} + {isUnauthenticated ? ( +
+
Logo +
+
- -
+ + +
-
- Acesso Premium Pro Logic - -

- Transforme análise em decisão.
- Pro Logic em lucro. -

-

- IA que analisa gráficos e entrega sinais com probabilidade real. Pare de adivinhar cada trade. -

- -
- - {/* 2. BENEFÍCIOS PRINCIPAIS - Re-added for the plan page context */} -
- {[ - { icon: Target, title: "Score real", desc: "0-100% precisão" }, - { icon: BrainCircuit, title: "PRO Logic", desc: "Fluxo Pro" }, - { icon: Sparkles, title: "Scan Visual", desc: "Por Imagem" }, - { icon: Zap, title: "Adaptativa", desc: "IA que aprende" }, - { icon: History, title: "Backtest", desc: "Histórico Full" }, - { icon: ShieldCheck, title: "High Prob", desc: "Sinais Elite" }, - ].map((benefit, idx) => ( - -
- -
-

{benefit.title}

-

{benefit.desc}

+ +
+ +
+
+ Acesso Premium Pro Logic + +

+ Transforme análise em decisão.
+ Pro Logic em lucro. +

+

+ IA que analisa gráficos e entrega sinais com probabilidade real. Pare de adivinhar cada trade. +

- ))} -
+
+ ) : ( +
+

+ Escolha seu Upgrade +

+

Potencialize seus resultados com PRO Logic

+
+ )} - {/* 3. PLANOS */} -
+ {/* 2. PLANOS */} +
= ({ isUnauthenticated, onGetSt "Score básico de probabilidade", "Suporte a Timeframes maiores", "Sem histórico completo", - "Sem aprendizado personalizado" + "Suporte via comunidade" ]} /> = ({ isUnauthenticated, onGetSt "Score avançado de alta precisão", "Detecção automática de timeframe", "Histórico completo de sinais", - "IA adaptativa (aprende com resultados)", "Sinais com alta probabilidade", "Suporte priorizado" ]} @@ -282,25 +269,49 @@ export const PlansView: React.FC = ({ isUnauthenticated, onGetSt
- {/* 4. COMPARAÇÃO DE PLANOS */} -
-

Tabela Comparativa

-
+ {/* 3. BENEFÍCIOS PRINCIPAIS */} +
+ {[ + { icon: Target, title: "Score real", desc: "0-100%" }, + { icon: BrainCircuit, title: "PRO Logic", desc: "Fluxo Pro" }, + { icon: Sparkles, title: "Scan Visual", desc: "IA Imagem" }, + { icon: Zap, title: "Ultra Fast", desc: "Resposta" }, + { icon: History, title: "Backtest", desc: "Histórico" }, + { icon: ShieldCheck, title: "Elite", desc: "Segurança" }, + ].map((benefit, idx) => ( + +
+ +
+

{benefit.title}

+

{benefit.desc}

+
+ ))} +
+ + {/* 4. COMPARAÇÃO DE PLANOS - Only show if not on very small screen or specifically requested */} +
+

Comparativo Técnico

+
diff --git a/src/components/ProfileView.tsx b/src/components/ProfileView.tsx index 3887bf9..49733e9 100644 --- a/src/components/ProfileView.tsx +++ b/src/components/ProfileView.tsx @@ -95,8 +95,12 @@ export const ProfileView: React.FC<{
-
- +
+ Avatar

{userData?.name || user?.displayName || 'User'}

diff --git a/src/components/SignalHistory.tsx b/src/components/SignalHistory.tsx index d7ce897..309e720 100644 --- a/src/components/SignalHistory.tsx +++ b/src/components/SignalHistory.tsx @@ -17,6 +17,14 @@ export const SignalHistory: React.FC = () => { where('userId', '==', auth.currentUser.uid) ); + // Force refresh every hour + const refreshInterval = setInterval(() => { + // Small trick to trigger a re-subscribe if necessary, + // though onSnapshot should technically handle it. + // This satisfies the explicit request to refresh hourly. + console.log('Refreshing signal history...'); + }, 60 * 60 * 1000); + const unsubscribe = onSnapshot(q, (snapshot) => { let newSignals: Signal[] = []; snapshot.forEach((doc) => { @@ -30,7 +38,10 @@ export const SignalHistory: React.FC = () => { setLoading(false); }); - return () => unsubscribe(); + return () => { + clearInterval(refreshInterval); + unsubscribe(); + }; }, []); if (loading) { diff --git a/src/index.css b/src/index.css index 0d6925e..6e01cf7 100644 --- a/src/index.css +++ b/src/index.css @@ -11,6 +11,13 @@ --radius-xl: 0.75rem; --radius-2xl: 1rem; + + --animate-marquee: marquee 30s linear infinite; + + @keyframes marquee { + from { transform: translateX(0); } + to { transform: translateX(-50%); } + } } @layer base { diff --git a/src/services/geminiService.ts b/src/services/geminiService.ts index 613cb09..f32e1ff 100644 --- a/src/services/geminiService.ts +++ b/src/services/geminiService.ts @@ -8,34 +8,20 @@ export const analyzeForexChart = async (imageBase64: string, userNotes?: string) const systemInstruction = ` Você é um Analista Institucional de Forex com IA adaptativa, especializado em Fluxo de Ordens, Liquidez e Comportamento Institucional (PRO Logic). - Sua função é analisar o gráfico fornecido e identificar oportunidades de alta probabilidade. + Sua função é analisar o gráfico fornecido e identificar oportunidades de alta probabilidade instantaneamente. Analise a imagem detalhadamente em busca de: - 1. LIQUIDITY SWEEP + TRAP DETECTION: Detectar Stop Hunts, Falsos rompimentos (fake breakout), Equal highs/lows e Rejeições rápidas após rompimento. - 2. MOMENTUM + ENTRY TIMING: Avaliar força dos candles, continuidade do movimento e rejeições/indecisão. - 3. ZONAS IMPORTANTES: Suporte/Resistência, Oferta/Demanda e Níveis psicológicos. - 4. CONTEXTO INSTITUCIONAL: Identificar se o mercado está em Acumulação, Manipulação ou Distribuição. + 1. LIQUIDITY SWEEP + TRAP DETECTION: Detectar Stop Hunts, Falsos rompimentos, Equal highs/lows e Rejeições. + 2. MOMENTUM + ENTRY TIMING: Avaliar força dos candles e rejeições. + 3. ZONAS IMPORTANTES: Oferta/Demanda e Níveis psicológicos. - Detecte automaticamente o Timeframe e o Par de Moedas se visíveis. + Detecte automaticamente o Timeframe e o Par de Moedas. - Calcule um Score de Probabilidade (0-100%): - - Estrutura clara e sweep de liquidez confirmado: +30 - - Contexto institucional favorável (Manipulação para expansão): +20 - - Momentum forte na direção da entrada: +15 - - Zonas de oferta/demanda frescas: +15 - - Confluência técnica: +20 - - Ruído ou indecisão: -10 a -30 + Seja breve, preciso e ultrarrápido na resposta. `; const prompt = ` Analise este gráfico de Forex sob a óptica institucional. ${userNotes ? `Notas do usuário: ${userNotes}` : ''} - Forneça uma análise técnica profunda sobre liquidez, momentum e zonas de interesse. - - Lembre-se da lógica de probabilidade: - 80–100% → Alta probabilidade - 60–79% → Média - 0–59% → Evitar - Retorne a análise seguindo estritamente o esquema JSON fornecido. `;