# Somali Reader
Somali Reader is a mobile-focused web application designed to help Somali-speaking users understand English written content.
The application is being developed to allow users to use their device camera to scan an English letter or document, extract the written text, translate it into Somali, and eventually listen to the Somali translation using text-to-speech.
> **Project Status: 🚧 Early Development**
## Overview
Many important documents, letters, forms, and notices are written in English. Somali Reader aims to provide a simple way for Somali-speaking users to point their phone camera at an English document and receive Somali assistance.
The planned workflow is:
```text
English Document
↓
Camera Scan
↓
Image Capture
↓
OCR
↓
English Text
↓
Somali Translation
↓
Somali Text-to-Speech
↓
Audio Playback
```
## Current Progress
The project is currently focused on building the camera-scanning foundation.
### Completed
* React application setup
* Mobile-friendly camera access
* Browser camera permission handling
* Access to the device camera using the MediaDevices API
* Preference for the device's rear-facing camera
* Live camera preview
* Capturing a still image from the camera
* Using the HTML Canvas API to capture the current video frame
* Converting the captured frame into a JPEG data URL
* Displaying the captured image for preview
* Cleaning up the camera stream when the component is unmounted
* React state management for camera and image state
* React `useRef` for interacting with video and canvas DOM elements
* React `useEffect` for camera stream cleanup
## Current Implementation
The current application provides the following experience:
1. The user opens Somali Reader.
2. The user selects **Scan Letter**.
3. The browser requests camera permission.
4. The device camera opens.
5. The user sees a live camera preview.
6. The user selects **Take Picture**.
7. The current camera frame is captured.
8. The captured image is displayed as a previe …