# ✍️ BanglaOCR: A Platform to Collect Bangla Handwriting for OCR Models
**Bangla OCR Handwriting Data** is a full-stack web application designed to **crowdsource handwritten Bangla text** for building large-scale OCR datasets. It provides a clean submission portal for users and a robust backend for data moderation, tracking, and export.
---
## 🌐 Live Demo
*
bangla-ocr-data-web.vercel.… (frontend)
*
hossainimamrony71.pythonany… (API Endpoint)
---
## 🧠 Key Features
* Weighted random Bangla prompt selection
* Direct, secure client-side uploads to **Cloudinary**
* Real-time status updates during submission
* RESTful API using **Django + DRF**
* Admin-only moderation dashboard (via API for now)
* Verified submission export as `.zip` with `CSV` labels
* Decoupled architecture: Vanilla JS frontend + DRF backend
---
## 🔧 Backend: Django REST Framework
The backend powers secure APIs for serving prompts, logging submissions, moderating content, and exporting verified data.
### 📦 API Endpoints
#### `GET /api/prompt/`
* **Purpose:** Serve a Bangla text prompt using weighted random logic (prompts with fewer submissions appear more)
* **Permissions:** Public
* **Response:**
```json
{
"id": 1,
"text": "বাংলা আমার মাতৃভাষা।"
}
```
---
#### `GET /api/cloudinary-config/`
* **Purpose:** Provide a secure signature for client-side Cloudinary uploads
* **Permissions:** Public
* **Response:**
```json
{
"api_key": "...",
"cloud_name": "...",
"timestamp": "...",
"signature": "..."
}
```
---
#### `POST /api/submissions/`
* **Purpose:** Log metadata after successful Cloudinary upload
* **Permissions:** Public
* **Body:**
```json
{
"prompt": 1,
"image_url": "
res.cloudinary.com",
"public_id": "bangla_ocr_handwriting_data/..."
}
```
---
#### `GET /api/moderator/pending/`
* **Purpose:** View unreviewed submissions for moderation
* **Permissions:** Admin only
* **Returns:** List of pending entries with image URLs and prom …