# Te9et Taarif - ID Card Recognition System
A full-stack application for Tunisian ID card detection and text extraction using computer vision and OCR.
## Project Structure
```
te9et_taarif-main/
├── te9et_taarif_backend/ # Django REST API backend
│ ├── inference/ # Main app with ID card detection logic
│ ├── media/ # Uploaded and processed images
│ ├── manage.py
│ └── requirements.txt
└── te9et_taarif_frontend/ # Vue.js frontend
└── taarif-frontend/
├── src/
└── package.json
```
## Tech Stack
### Backend
- **Django 5.1.2** - Web framework
- **Django REST Framework** - API
- **OpenCV** - Image processing
- **Pytesseract** - OCR
- **Roboflow Inference SDK** - ID card detection
- **SQLite** - Database
### Frontend
- **Vue.js 3** - Frontend framework
- **Vite** - Build tool
- **Tailwind CSS** - Styling
- **Axios** - HTTP client
## Prerequisites
Before running the project, ensure you have:
- **Python 3.12+** installed
- **Node.js 16+** and npm installed
- **Tesseract OCR** installed on your system:
```bash
# Ubuntu/Debian
sudo apt-get install tesseract-ocr
# macOS
brew install tesseract
```
## First Time Setup
### 1. Backend Setup
```bash
# Navigate to backend directory
cd te9et_taarif_backend
# Create virtual environment (if not exists)
python3 -m venv ../.venv
# Activate virtual environment
source ../.venv/bin/activate # On Linux/Mac
# OR
..\.venv\Scripts\activate # On Windows
# Install Python dependencies
pip install -r requirements.txt
# Run migrations
python manage.py migrate
# (Optional) Create superuser for admin access
python manage.py createsuperuser
```
### 2. Frontend Setup
```bash
# Navigate to frontend directory
cd te9et_taarif_frontend/taarif-frontend
# Install npm dependencies
npm install
```
## How to Start the Project
### Option 1: Manual Start (Two Terminals)
**Terminal 1 - Backend:**
```bash
cd te9et_taarif_backend
source ../.venv/bin/activate
python manage.py runserver
```
**Te …