SawtCoop is an AI-powered multimodal marketplace connecting Moroccan rural cooperatives with clients. Cooperatives photograph products and describe them in Darija (Moroccan Arabic) by voice — the app converts both into trilingual listings (FR/AR/EN) with AI-enhanced images, translations, and pricing suggestions.
# SawtCoop — صوت كوب
A multimodal AI platform that helps Moroccan artisans and cooperative members create professional, multilingual product listings from a photo and a voice description in Darija.
## What it does
1. The seller takes a **photo** of their product and records a **voice note in Darija** (Moroccan Arabic dialect).
2. The app sends both to Gemini 2.5, which returns a structured product listing in French, Arabic, and English.
3. Optionally, Stability AI enhances the product photo through a 5-step pipeline (background removal → SD3.5 enhancement → shadow/background → color grading → 4K upscale).
4. The listing is ready to publish to digital marketplaces and social media.
## Tech stack
| Layer | Technology |
|---|---|
| Frontend | React 19 + Vite, CSS custom properties, RTL i18n (FR / AR / EN) |
| Backend | Express.js (Node 20+) |
| AI — Product analysis | Gemini 2.5 Flash Lite (multimodal: image + audio) |
| AI — Darija STT fallback | HuggingFace Whisper large-v3 |
| AI — Image enhancement | Stability AI SD3.5 + local Sharp pipeline |
| Auth | JWT (30-day tokens), bcryptjs password hashing |
## Project structure
```
sawtcoop/
├── backend/
│ ├── routes/auth.js # Register / login / admin endpoints
│ ├── db.js # JSON-file database (users + profiles)
│ ├── server.js # Express app + AI API proxy endpoints
│ └── data.json # Runtime data store (git-ignored in prod)
├── src/
│ ├── contexts/ # AuthContext, CartContext, LangContext
│ ├── screens/ # App screens (Capture, Marketplace, Cart, …)
│ ├── services/
│ │ ├── gemini.js # Backend API calls (analyze, transcribe)
│ │ ├── whisper.js # HuggingFace Whisper STT
│ │ ├── imageEnhancer.js # Stability AI image pipeline
│ │ └── mediaUtils.js # Shared base64 utility
│ └── i18n.js # Translation strings (FR / AR / EN)
└── .env.example # Required environment variables
```
## Setup
### Prerequisites
- …