Spaces:
Sleeping
Sleeping
RAG System Frontend
React + TypeScript frontend for the Production-Grade RAG System.
Tech Stack
- Framework: React 18+ with TypeScript
- Styling: Tailwind CSS
- State Management: React Context API
- HTTP Client: Axios
- File Upload: react-dropzone
- Icons: lucide-react
- Notifications: react-hot-toast
Project Structure
src/
βββ components/
β βββ layout/
β β βββ Header.tsx
β β βββ Sidebar.tsx
β β βββ MainContent.tsx
β βββ documents/
β β βββ FileUpload.tsx
β β βββ DocumentList.tsx
β β βββ DocumentCard.tsx
β βββ query/
β β βββ QueryInput.tsx
β β βββ ModeSelector.tsx
β βββ results/
β β βββ ResultsDisplay.tsx
β β βββ AnswerCard.tsx
β β βββ ConfidenceIndicator.tsx
β β βββ SourcesList.tsx
β β βββ SourceCard.tsx
β βββ common/
β β βββ EmptyState.tsx
β βββ settings/
β βββ SettingsModal.tsx
βββ services/
β βββ api.ts
βββ hooks/
βββ context/
β βββ AppContext.tsx
βββ types/
β βββ index.ts
βββ App.tsx
βββ index.tsx
Installation
npm install
Development
npm run dev
Build
npm run build
Configuration
Copy .env.example to .env and configure:
VITE_API_URL=http://localhost:8000/api/v1
Features
- PDF document upload with drag-and-drop
- Document management (list, select, delete)
- Multiple query modes (Web, PDF, Hybrid, Restricted)
- Real-time confidence scoring
- Source citations and attribution
- Dark/light theme
- Responsive design
- Keyboard shortcuts (Enter to submit)