How sxxdgaf/doc_scanner works
DocScanner is an offline Flutter document-scanning and PDF-creation app. Its principal workflow is to capture one or more pages, correct and enhance them, then organize the saved scans or create a PDF; users can also extract text with local OCR. The README documents these capabilities and the Clean Architecture layers, while the supplied source excerpts cover only native launch scaffolding. Feature-to-layer connections below therefore cite the README rather than implying Dart calls were inspected.
Main entry points: camera_screen.dart Camera Capture · home_screen.dart Document Home · editor_screen.dart Page Editor · document_repository_impl.dart Document Storage
Components 19
Scanning
- Camera Capture
lib/features/scanner/presentation/screens/camera_screen.dart - Edge Detection
lib/features/scanner/presentation/widgets/document_detector_overlay.dart - Capture Controls
lib/features/scanner/presentation/widgets/camera_controls.dart
Image Editing
- Page Editor
lib/features/editor/presentation/screens/editor_screen.dart - Image Filters
lib/features/editor/presentation/screens/filter_screen.dart
Document Library
- Document Home
lib/features/home/presentation/screens/home_screen.dart - Document Cards
lib/features/home/presentation/widgets/document_card.dart - Empty Library
lib/features/home/presentation/widgets/empty_state.dart - Folder Storage
lib/data/repositories/folder_repository_impl.dart - Document Storage
lib/data/repositories/document_repository_impl.dart - Local SQLite
lib/data/local_db/database_helper.dart
Export and OCR
- PDF Preview
lib/features/pdf_viewer/presentation/screens/pdf_preview_screen.dart - PDF Generation
lib/data/repositories/pdf_repository_impl.dart - OCR Screen
lib/features/ocr/presentation/screens/ocr_screen.dart - Local OCR
lib/data/repositories/ocr_repository_impl.dart
Application Layers
- Image Use Cases
lib/domain/usecases/image_processing_usecases.dart - Image Processing
lib/data/repositories/image_processing_repository_impl.dart - Document Use Cases
lib/domain/usecases/document_usecases.dart
Other components
- Scanner User
Connections 18
- Scanner User → Camera Capture: starts scan
README.md - Camera Capture → Edge Detection: detects edges
README.md - Camera Capture → Capture Controls: offers capture
- Camera Capture → Page Editor: sends scans
- Page Editor → Image Filters: adjusts pages
README.md - Page Editor → Image Use Cases: requests processing
- Image Use Cases → Image Processing: delegates processing
- Scanner User → Document Home: opens library
README.md - Document Home → Document Cards: shows documents
- Document Home → Empty Library: shows empty state
- Document Home → Document Use Cases: requests documents
- Document Use Cases → Document Storage: delegates storage
- Document Storage → Local SQLite: stores documents
- Folder Storage → Local SQLite: stores folders
- Scanner User → PDF Preview: previews PDF
README.md - PDF Preview → PDF Generation: creates PDF
- Scanner User → OCR Screen: requests text
README.md - OCR Screen → Local OCR: recognizes text