Buy our reports at maghrebinsights.co — 50–80 page PDF market intelligence reports for Tunisia, Morocco, Egypt, and Jordan. $799 each, instant download.
Open source engine for generating MENA market intelligence reports from World Bank Microdata and national statistics. The engine is MIT-licensed and free to self-host. The reports we publish are commercial.
- Ingests household budget surveys (HBS), labour force surveys (LFS), and Findex microdata via the World Bank NADA API
- Computes weighted indicators with disclosure control (n ≥ 30 cell suppression)
- Generates 50–80 page PDF reports with SVG charts, LLM-written narratives, and full source citations
- Sells reports via Stripe ($799 single / $2,400 quarterly / $5k+ custom)
- Ships open source (MIT engine) — the operator sells the outputs
| Report | Country | Price |
|---|---|---|
| Consumer Spending & HBS 2022 | Tunisia | $799 |
| Labor Market & Employment 2023 | Tunisia | $799 |
| Digital & Financial Inclusion 2023 | Tunisia | $799 |
| Household Consumption Survey 2022 | Morocco | $799 |
| Labor Force Survey 2023 | Egypt | $799 |
| Financial Inclusion & Digital Payments 2022 | Jordan | $799 |
Algeria, Lebanon, KSA, UAE on the 2026 roadmap.
Prerequisites: Docker, uv, pnpm, Node 20+
git clone https://github.com/MENA-intelligence-Platform/platform
cd platform
cp .env.example .env # fill in required keys (see SECRETS_REQUIRED.md)
docker-compose up -d # postgres, redis, mailhog, minio
uv sync # install Python deps
pnpm install # install Node deps
uv run alembic upgrade head # run DB migrations
pnpm --filter @mi/web dev # start Next.js on localhost:3000
uvicorn api.main:app --reload # start FastAPI on localhost:8000Generate a report:
# Ingest microdata (place raw files in data/raw/tunisia/hbs/)
mi data ingest Tunisia HBS
# Generate a report PDF
mi report generate consumer_spending_v1 Tunisia 2022 --output ./out.pdf
# Generate a watermarked sample (8 pages)
mi report generate consumer_spending_v1 Tunisia 2022 --sample --output ./sample.pdf
# Upload to R2 and get a signed URL
mi report publish ./out.pdf --slug tunisia-consumer-spending-2022Sales tools:
# Preview personalised outbound emails (dry run)
mi sales send --csv sales/leads.csv.example --sequence default --step 1 --dry-run
# Dispatch a watermarked sample to a prospect
mi sales sample --to prospect@company.com --report tunisia-consumer-spending-2022 --dry-runpackages/
├── data-pipeline/ Python: ingest World Bank microdata → PostgreSQL
├── report-generator/ Python: PDF generation (WeasyPrint + Jinja2 + matplotlib)
├── api/ Python: FastAPI + arq worker (Stripe, auth, R2)
├── web/ TypeScript: Next.js 14 marketing site + customer portal
└── cli/ Python: mi <command> operator CLI
sales/
├── templates/ Email templates (cold outreach + transactional)
├── sequences.yaml 3-touch outbound cadences (Instantly/Apollo compatible)
└── leads.csv.example Lead list template
reports/
├── templates/ Jinja2 HTML templates (versioned: _v1, _v2 …)
├── catalog.yaml Report catalog (slug, price, countries)
└── samples/ Generated sample PDFs
infra/
├── migrations/ Alembic migrations (always reversible)
├── scripts/ Postgres backup/restore → R2
└── load-tests/ k6 load test scripts
| Layer | Tech |
|---|---|
| Data pipeline | Python 3.11, uv, SQLAlchemy 2.0, Alembic, pandas |
| Report generation | WeasyPrint, Jinja2, matplotlib, Anthropic claude-sonnet-4-6 |
| API | FastAPI, arq (Redis queue), Sentry |
| Web | Next.js 14 App Router, Tailwind CSS, shadcn/ui, Sentry |
| Database | PostgreSQL 16 (Supabase in prod) |
| Auth | Supabase magic links |
| Payments | Stripe Checkout + Customer Portal + Webhooks |
| Storage | Cloudflare R2 (S3-compatible) |
| Resend | |
| Analytics | Plausible (cookieless) |
| Deploy | Vercel (web) · Railway (API + worker + Redis) |
| CI | GitHub Actions |
The engine (all code in packages/, infra/, reports/templates/) is MIT licensed. Free to use, modify, and self-host.
The reports published at maghrebinsights.co are proprietary — see LICENSE-COMMERCIAL.md. You may not redistribute or resell them.
"The engine is open source. The reports we publish are commercial — buy them at maghrebinsights.co."
PRs welcome for:
- New dataset adapters (add a file to
packages/data-pipeline/adapters/) - New country coverage (add entries to
data/registry.yaml) - French / Arabic template translations
- Bug fixes and test coverage improvements
Please read CONTRIBUTING.md before submitting a PR.
Custom country/sector cuts, bespoke segmentation, proprietary data integration: hello@maghrebinsights.co · starting at $5,000.