Modern React TypeScript frontend for the Fergana OCR Platform - specialized in Uzbek document processing.
npm installnpm run devVisit http://localhost:5173
npm run buildnpm run preview- React 18+ with TypeScript
- Vite - Lightning-fast build tool
- Tailwind CSS - Utility-first styling
- React Query - Server state management
- Axios - HTTP client
- React Dropzone - File uploads
- Lucide React - Beautiful icons
- β Document OCR - Extract text from images and PDFs using Tesseract
- β³ Document Parsing - Extract structured data (Coming Soon)
- β³ Classification - Auto-detect document types (Coming Soon)
- β³ Universal Extraction - AI-powered custom extraction (Coming Soon)
Copy .env.example to .env:
cp .env.example .envThen update the values:
# For local development
VITE_API_URL=http://localhost:8001
# For production (Railway backend)
VITE_API_URL=https://web-production-8677.up.railway.app- π¬π§ English (eng)
- πΊπΏ Uzbek Latin (uzb)
- πΊπΏ Uzbek Cyrillic (uzb_cyrl)
- π·πΊ Russian (rus)
- π°π· Korean (kor)
frontend/
βββ src/
β βββ components/ # React components
β β βββ Sidebar.tsx # Left navigation
β β βββ Navbar.tsx # Top navigation
β β βββ OptionsBar.tsx # Language & settings
β β βββ DocumentPreview.tsx # File upload & preview
β β βββ ResultsPanel.tsx # Extraction results
β β βββ ErrorBoundary.tsx # Error handling
β βββ services/ # API services
β β βββ api.ts # OCR service with axios
β βββ types/ # TypeScript types
β β βββ index.ts # Type definitions
β βββ App.tsx # Main app component
β βββ main.tsx # Entry point
β βββ index.css # Global styles (Tailwind)
βββ .env # Environment variables (not in git)
βββ .env.example # Example environment variables
βββ vite.config.ts # Vite configuration
βββ tailwind.config.js # Tailwind configuration
βββ package.json # Dependencies
The frontend connects to the Django REST API backend.
- Images:
POST /api/v1/ocr/extract/ - PDFs:
POST /api/v1/ocr/multi-format/extract/ - Health:
GET /api/v1/ocr/health/ - Languages:
GET /api/v1/ocr/languages/
FormData {
image: File, // or 'file' for PDFs
language: string, // eng, uzb, uzb_cyrl, rus, kor
save_to_db: boolean // optional
}{
"text": "Extracted text...",
"confidence": 95.5,
"language": "eng",
"processingTime": 1.23
}npm install -g vercel
vercelnpm run build
netlify deploy --prod --dir=distSet these in your hosting platform:
VITE_API_URL=https://web-production-8677.up.railway.app
- Drag & Drop Upload - Easy file upload interface
- Real-time Preview - See your document before processing
- Loading States - Smooth animations during processing
- Error Handling - User-friendly error messages
- Responsive Design - Works on all screen sizes
- Copy & Download - Easy result management
- Node.js 18+
- npm or yarn
Vite provides instant HMR - your changes appear immediately without page refresh.
npx tsc --noEmitnpm run lintPart of the Fergana OCR Platform
- Backend Repository: fergani-ocr
- Live Backend: https://web-production-8677.up.railway.app
- Documentation: See
TECHNICAL_SPEC.mdin backend repo
This is part of a larger Uzbek document processing platform. Contributions are welcome!
For questions or support, please open an issue in the repository.