feat(auth): login JWT en API y las 4 apps

- Modelo Usuario + seed desde lista de vendedores (18 usuarios, bcrypt cost 12)
- POST /api/auth/login + /api/auth/me; middleware Bearer en todo /api
  excepto health, login y webhook Monday; flag AUTH_ENABLED
- Username = nombre completo normalizado (case/acentos insensible),
  password inicial Frasa2026, admin vía ADMIN_PASSWORD
- Apps: LoginScreen + AuthGate (StudioBlank), token en localStorage,
  header Authorization en todas las llamadas, logout en 401
- Tests: api 136, cotizador 71, alta 65, cobranza 71, agente-ia 13, landing 4
This commit is contained in:
2026-08-27 08:20:25 +00:00
parent b39fe6334f
commit de11af985e
40 changed files with 2085 additions and 38 deletions

View File

@@ -6,9 +6,12 @@ import '@fontsource/inter/500.css'
import '@fontsource/inter/700.css'
import './index.css'
import ChatPage from './pages/ChatPage'
import AuthGate from './components/AuthGate'
createRoot(document.getElementById('root')!).render(
<StrictMode>
<ChatPage />
<AuthGate>
<ChatPage />
</AuthGate>
</StrictMode>,
)