DocuLens/cline_docs/techContext.md
2025-03-17 17:52:32 -05:00

84 lines
2.2 KiB
Markdown

# Technical Context
## Technology Stack
### Frontend
- **Framework**: React 18.2.0
- **Key Dependencies**:
- axios 0.27.2: HTTP client for API requests
- react-dom 18.2.0: React rendering
- react-scripts 5.0.1: Development and build tools
### Backend
- **Framework**: Flask (Python)
- **Key Dependencies**:
- flask-cors: Cross-origin resource sharing
- Tesseract: OCR engine
- OCRmyPDF: PDF processing
- pdf2image: PDF to image conversion
### AI Integration
- **Supported AI Providers**:
- OpenAI
- Google Gemini
- Mistral
### Containerization
- Docker
- Docker Compose
## Development Setup
### Prerequisites
- Docker
- Docker Compose
### Local Development
1. Clone repository
2. Build and run with Docker Compose:
```bash
docker-compose up --build
```
3. Access application at http://localhost:5015
### Project Structure
```
/
├── backend/
│ ├── app.py # Main Flask application
│ ├── models.py # Data models and AI integration
│ ├── utils.py # Utility functions
│ ├── requirements.txt
│ └── static/ # Static assets
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── App.js # Main React component
│ │ └── index.js # Entry point
│ ├── public/ # Public assets
│ └── package.json # Frontend dependencies
├── docker-compose.yml # Container orchestration
└── Dockerfile # Container definition
```
## Technical Constraints
### System Requirements
- Docker environment for containerization
- Sufficient disk space for file processing
- Memory for concurrent processing jobs
### API Limitations
- File size limits based on server configuration
- Processing time varies with document complexity
- Concurrent job limits based on server resources
### Security Considerations
- CORS configured for frontend-backend communication
- File upload restrictions and sanitization
- Environment variable management for API keys
### Performance Considerations
- Asynchronous processing for large files
- Progress tracking for long-running operations
- Memory management for concurrent jobs