Arquitectura
Documentaci贸n t茅cnica de la arquitectura de Duckling.
Resumen
Duckling is a full-stack web application with a clear separation between frontend y backend:
graph LR
A[Navegador] --> B[Frontend React]
B --> C[Backend Flask]
C --> D[Motor Docling]
D --> E[(Almacenamiento)]
style A fill:#3b82f6,color:#fff
style B fill:#1e3a5f,color:#fff
style C fill:#14b8a6,color:#fff
style D fill:#8b5cf6,color:#fff
style E fill:#f59e0b,color:#fff Secciones
-
Resumen del sistema
Arquitectura de alto nivel y flujo de datos
-
Componentes
Detalles de componentes frontend y backend
-
Diagramas
Diagramas de arquitectura y flujos
Decisiones de dise帽o clave
Separaci贸n de responsabilidades
- Frontend: React con TypeScript para seguridad de tipos y UI moderna
- Backend: Flask por simplicidad y acceso al ecosistema Python
- Motor: Docling para conversi贸n de documentos (biblioteca de IBM)
Async Procesyo
Document conversion is hyled asynchronously:
- Client uploads file
- Server returns job ID immediately
- Client polls for status
- Server processes in background thread
- Results available when complete
Job Queue
A thread-based job queue prevents memory exhaustion:
- Maximum 2 concurrent conversions
- Jobs queued when capacity reached
- Automatic cleanup of completed jobs
Configuraci贸n Persistence
Configuraci贸n are stored per-user session y applied per-conversion:
- Global defaults in
config.py - User settings stored in database (per session ID)
- Per-request overrides via API
Configuraci贸n are isolated per user session, ensuring multi-user deployments don't interfere with each other's preferences.
Technology Stack
Frontend
| Technology | Prop贸sito |
|---|---|
| React 18 | UI framework |
| TypeScript | Type safety |
| Tailwind CSS | Styling |
| Framer Motion | Animations |
| Axios | HTTP client |
| Vite | Build tool |
Backend
| Technology | Prop贸sito |
|---|---|
| Flask | Web framework |
| SQLAlchemy | Database ORM |
| SQLite | History storage |
| Docling | Document conversion |
| Threading | Async processing |