## Changes
- Update all references from AgenticRAG to DocuMente
- Update README.md with new project description and structure
- Update LICENSE with new project name
- Update API title and descriptions in main.py
- Update frontend components (Layout, Login, Dashboard, Settings)
- Update static HTML page
- Update all documentation files (prd-v2.md, frontend-plan.md, etc.)
- Update test files with new project name
- Update docker-compose.yml, Dockerfile, requirements.txt
## SEO Benefits
- DocuMente combines 'Documento' and 'Mente' (Italian for Document and Mind)
- Memorable and brandable name
- Reflects the core functionality: AI-powered document intelligence
🎉 Project officially renamed to DocuMente!
3.6 KiB
3.6 KiB
DocuMente Frontend
Modern React-based web interface for DocuMente - Sistema di Retrieval Agentico con AI.
🚀 Features
- Authentication: API Key-based login
- Dashboard: System overview with stats and recent documents
- Documents: Drag & drop upload, document management
- Chat: Conversational interface with RAG and source citations
- Settings: Theme toggle (light/dark), LLM provider selection
- Responsive: Mobile-friendly design
🛠️ Tech Stack
- React 18 - UI library
- TypeScript - Type safety
- Vite - Build tool
- Tailwind CSS - Styling
- shadcn/ui - UI components
- Zustand - State management
- Axios - HTTP client
- React Router - Routing
📦 Installation
cd frontend
npm install
🔧 Development
# Start development server
npm run dev
# Server runs at http://localhost:3000
🔨 Build
# Build for production
npm run build
# Preview production build
npm run preview
🌐 Environment Variables
Create .env file in frontend directory:
VITE_API_URL=http://localhost:8000
📁 Project Structure
frontend/
├── src/
│ ├── components/
│ │ ├── layout/ # Layout components
│ │ └── ui/ # shadcn/ui components
│ ├── pages/ # Route pages
│ │ ├── Login.tsx
│ │ ├── Dashboard.tsx
│ │ ├── Documents.tsx
│ │ ├── Chat.tsx
│ │ └── Settings.tsx
│ ├── api/
│ │ └── client.ts # API client
│ ├── stores/
│ │ ├── authStore.ts
│ │ ├── chatStore.ts
│ │ └── settingsStore.ts
│ ├── types/
│ │ └── index.ts # TypeScript types
│ ├── lib/
│ │ └── utils.ts # Utility functions
│ ├── App.tsx
│ └── main.tsx
├── public/
├── index.html
├── package.json
├── tailwind.config.js
├── tsconfig.json
└── vite.config.ts
🔐 Authentication
The frontend supports API Key authentication:
- Enter your API key on the login page
- The key is stored in localStorage
- Sent with every request via
X-API-Keyheader
🎨 Customization
Themes
- Edit
src/index.cssfor CSS variables - Toggle between light/dark/system in Settings
API Configuration
- Update
vite.config.tsproxy settings - Or set
VITE_API_URLenvironment variable
Adding Components
# Install shadcn/ui component
npx shadcn-ui@latest add button
📝 Available Scripts
| Script | Description |
|---|---|
npm run dev |
Start dev server |
npm run build |
Build for production |
npm run preview |
Preview production build |
npm run lint |
Run ESLint |
🔗 API Endpoints
The frontend connects to these API endpoints:
GET /api/health- Health checkGET /api/v1/documents- List documentsPOST /api/v1/documents- Upload documentDELETE /api/v1/documents/:id- Delete documentPOST /api/v1/query- Query with RAGPOST /api/v1/chat- Chat endpointGET /api/v1/providers- List providersGET /api/v1/config- Get config
🐛 Troubleshooting
Build Errors
If you see TypeScript errors about unused variables:
# Check for unused imports
npm run lint
API Connection Issues
Make sure the backend is running on port 8000, or update the proxy in vite.config.ts.
CORS Errors
The Vite dev server proxies /api requests to the backend. For production, ensure CORS is configured on the backend.
📄 License
Same as the main project.