Product classification data engine for Algerian POS systems with trust-based feedback learning
# đ Algerian POS Engine
A product classification data engine for Algerian POS (Point of Sale) systems with trust-based feedback learning.
## đŻ Features
- **Product Classification**: Automatically classify products into 28 categories (Eau, Lait, Fromage, etc.)
- **Open Food Facts Integration**: Fetch and ingest product data from the Open Food Facts API
- **Trust-Based Feedback**: Machine learning-like system that adjusts classifications based on customer corrections
- **Deduplication**: Remove duplicate products using barcode matching and fuzzy matching
- **Versioned Exports**: Export datasets as JSON, CSV, and SQLite snapshots
- **Admin Dashboard**: Full-featured web interface for managing products, feedback, and customers
## đ Project Structure
```
âââ src/
â âââ app/ # Next.js App Router
â â âââ api/ # API routes
â â âââ page.tsx # Dashboard
â â âââ products/ # Products management
â â âââ feedback/ # Feedback management
â â âââ customers/ # Customer management
â â âââ classify/ # Manual classification
â â âââ export/ # Data export
â âââ stages/ # Data engine stages
â â âââ fetch.ts # Open Food Facts ingestion
â â âââ normalize.ts # Text normalization
â â âââ classify.ts # Product classification
â â âââ deduplicate.ts # Deduplication
â â âââ reweight.ts # Weight adjustment
â â âââ feedback.ts # Feedback recording
â â âââ export.ts # Dataset export
â âââ engine.ts # Main orchestrator
â âââ types.ts # Type definitions
âââ exports/ # Exported datasets
âââ products.db # SQLite database
âââ package.json
```
## đ Getting Started
### Prerequisites
- Node.js 20+
- npm or yarn
### Installation
```bash
# Clone the repository
git clone
cd algerian-pos-engine
# Install dependencies
npm ins âŠ