Fonctionnalités implémentées : ✅ Authentification locale (email/password) + Azure AD + Manus OAuth ✅ Upload drag-and-drop de fichiers PDF avec suivi en temps réel ✅ Extraction automatique avec Mistral AI (OCR + LLM) ✅ Détection de doublons (fournisseur, numéro, date) ✅ Score de qualité d'extraction (0-100) ✅ Tableau de bord avec statistiques ✅ Liste des factures avec recherche et filtres ✅ Paramètres utilisateur (LLM, keywords, SFTP) ✅ Historique des imports avec logs détaillés ✅ Gestion des utilisateurs (admin) ✅ Export SFTP manuel/automatique ✅ Stockage local avec organisation YYYY-MM ✅ Tests unitaires d'authentification Architecture : - Frontend : React 19 + Vite + TailwindCSS + Radix UI - Backend : Express + tRPC + Drizzle ORM - Base de données : MySQL (6 tables) - IA : Mistral AI pour extraction - Stockage : Local filesystem - Export : SFTP Pages : - Login (choix local/Azure/Manus) - Dashboard (statistiques) - Upload (drag-and-drop) - Invoices (liste avec recherche) - Settings (LLM, keywords, SFTP) - History (logs d'import) - Users (gestion admin)
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
import { useEffect } from "react";
|
|
import { useAuth } from "@/_core/hooks/useAuth";
|
|
import { Loader2, FileText } from "lucide-react";
|
|
import { useLocation } from "wouter";
|
|
import { Button } from "@/components/ui/button";
|
|
|
|
export default function Home() {
|
|
const [, setLocation] = useLocation();
|
|
const { user, loading } = useAuth();
|
|
|
|
useEffect(() => {
|
|
if (!loading) {
|
|
if (user) {
|
|
setLocation("/dashboard");
|
|
} else {
|
|
setLocation("/login");
|
|
}
|
|
}
|
|
}, [user, loading, setLocation]);
|
|
|
|
return (
|
|
<div className="min-h-screen flex items-center justify-center bg-gradient-to-br from-blue-50 to-indigo-100">
|
|
<div className="text-center">
|
|
<div className="mx-auto mb-6 w-20 h-20 bg-blue-600 rounded-lg flex items-center justify-center">
|
|
<FileText className="w-12 h-12 text-white" />
|
|
</div>
|
|
<h1 className="text-3xl font-bold mb-2">Invoice Analyzer</h1>
|
|
<p className="text-gray-600 mb-6">Dématérialisation de la facturation</p>
|
|
<Loader2 className="w-8 h-8 animate-spin text-blue-600 mx-auto" />
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|