Know your compliance gaps before the auditor does.
Zareb reads your HACCP plans, ingredient lists, product labels, and audit reports — then tells you exactly what's missing for EU/UK export approval.
🎯 Built for food manufacturers, restaurant chains, and packaged food brands in Africa (Lagos, Accra, Nairobi) exporting to European markets.
| User | Food manufacturers in Lagos, Accra and Nairobi preparing EU/UK export files |
| Problem | Compliance gaps (allergens, traceability, NAFDAC→EU differences) surface only at audit, which is costly and slow |
| What I shipped | Upload a PDF/DOCX → extract text → LLM checks it against 8 standards → scored report with Critical/Moderate/Minor gaps and copy-paste fix text → chat over the report |
| Stack | FastAPI · React/Vite · Groq (llama-3.3-70b) · Postgres · Cloudinary · CI via GitHub Actions |
| Live | https://zareb.vercel.app |
| Feature | Description |
|---|---|
| 📄 Smart Upload | Drag-and-drop PDF/DOCX files up to 10MB |
| 🤖 AI Analysis | Groq-powered compliance check against 8 standards |
| 📊 Interactive Reports | Score gauge, categorized gaps, copy-paste fixes |
| 💬 AI Chat | Ask follow-up questions about your reports |
| ✅ Compliance Checklists | Track progress for each standard with auto-save |
| 🌍 Africa→EU/UK Focus | Catches NAFDAC-to-EU gaps, allergen rules, traceability |
HACCP · FSMA · SQF · BRCGS · ISO 22000 · NAFDAC (Nigeria) · KEBS (Kenya) · EU Reg. 178/2002 (General Food Law) · EU Reg. 1169/2011 (food labelling)
┌──────────────┐ HTTP/JSON ┌──────────────┐ ┌──────────────┐
│ Frontend │ ──────────────────▶ │ Backend │ ──▶ │ PostgreSQL │
│ React + Vite│ ◀────────────────── │ FastAPI │ │ (Neon) │
│ (Vercel) │ SSE streaming │ (Vercel fn) │ └──────────────┘
└──────────────┘ └──────┬───────┘
│
┌──────▼───────┐
│ Groq AI API │
│ (Free Tier) │
└──────────────┘
- Register/Login → JWT token stored in browser
- Upload PDF → Backend extracts text (PyPDF2/python-docx), stores in Cloudinary
- Analyze → Backend sends extracted text to Groq AI → receives structured JSON
- View Report → Score gauge, categorized gaps (Critical/Moderate/Minor), fix suggestions
- Chat → SSE streaming from AI with report context loaded
- Python 3.11+
- Node.js 18+
- Groq API key (free — no credit card)
# backend lives at the repo root (main.py + app/)
cp .env.example .env
# Edit .env and add your GROQ_API_KEY
pip install -r requirements.txt
uvicorn main:app --reloadThe API will be available at http://localhost:8000 with interactive docs at http://localhost:8000/docs.
cd frontend
npm install
npm run devOpen http://localhost:5173 in your browser.
| Variable | Default | Description |
|---|---|---|
AI_PROVIDER |
groq |
AI provider: groq (free) or claude |
GROQ_API_KEY |
— | Your free key from console.groq.com |
GROQ_MODEL |
llama-3.3-70b-versatile |
Groq model for analysis |
DATABASE_URL |
sqlite:///./zareb.db |
Postgres for production (e.g. Neon) |
JWT_SECRET |
— | Random 32+ char string for auth |
CLOUDINARY_* |
— | For document file storage |
CORS_ORIGINS |
http://localhost:5173 |
Frontend URLs allowed |
zareb/
├── main.py # FastAPI entry point + lifespan
├── app/ # Backend application
│ ├── api/ # Route handlers (auth, docs, analysis, chat, checklists)
│ ├── models/ # SQLAlchemy models (User, Document, Report, Checklist)
│ ├── services/ # AI service (Groq/Claude), Cloudinary, document parser
│ └── core/ # Config, database, security (JWT)
├── api/index.py # Vercel serverless entry for the backend
├── tests/ # pytest suite (auth, checklists, health, validation)
├── frontend/ # React + Vite SPA
│ └── src/ # pages, components, api client
├── .github/workflows/ci.yml
├── requirements.txt
└── vercel.json
| Capability | How It Works |
|---|---|
| Document Understanding | Extracts text from PDFs/DOCX → sends to Groq LLM |
| Domain Expertise | System prompt contains HACCP/FSMA/BRCGS/NAFDAC knowledge |
| Structured Reasoning | AI returns JSON: score (0-100), gaps, critical issues, fixes |
| Actionable Output | "Copy fix language" buttons with AI-generated template text |
| Contextual Chat | SSE streaming with full report context loaded |
| Multi-Standard | One document analyzed against 8 different standards |
- Frontend → Vercel (project root
frontend/), live at https://zareb.vercel.app - Backend → FastAPI as a Vercel Python function (
api/index.py, seevercel.json) - Env vars →
GROQ_API_KEY,DATABASE_URL(Postgres, e.g. Neon pooled URL),JWT_SECRET, Cloudinary keys; full list in.env.example
pip install -r requirements.txt
pytest # 23 tests: auth, checklists, health, input validationCI (.github/workflows/ci.yml) runs on every push: frontend lint, format check and build; backend flake8 and an import smoke test; a secrets scan.
Zareb catches the top 7 Africa→EU/UK export gaps:
- ❌ Allergen labeling — EU requires 14 major allergens declared
- ❌ Nutritional table — Per 100g values mandatory in EU
- ❌ Country of origin — Must be declared on packaging
- ❌ Best before vs use by — EU has strict distinction rules
- ❌ Additive E-numbers — Must use EU-approved additives
- ❌ Traceability lot codes — Required on all packaging
- ❌ EU responsible person — Required post-Brexit for UK exports
MIT — Built for African food founders by Xi-kki.