Spaces:
Sleeping
Sleeping
File size: 1,839 Bytes
4d592a4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# 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
```bash
npm install
```
## Development
```bash
npm run dev
```
## Build
```bash
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)
|