DEV Community

Shadrach Adongo
Shadrach Adongo

Posted on

How I Built a Scam Detection Platform for Ghana Using Django and Paystack

Ghana has a serious MoMo fraud problem. Scammers call victims pretending
to be MTN agents, send fake reversal requests, and drain accounts in minutes.
I decided to build something about it.

CyberHub Ghana is a Django 6 SaaS platform that lets anyone check a Ghana
phone number against a community-driven scam database. Here's how I built it.

The Stack

  • Django 6 + PostgreSQL on Render
  • Paystack live payments (MoMo + card)
  • Brevo transactional email
  • Telegram bot for real-time alerts
  • Cloudinary for media storage

The Scam Checker

Every report gets a risk score calculated from weighted scam types:

weights = {
    'momo_fraud': 3.0,
    'investment_scam': 2.5,
    'phishing': 2.0,
    'job_scam': 2.0,
    'romance_scam': 2.0,
    'other': 1.0,
}
total = sum(weights.get(r.scam_type, 1.0) for r in reports)
risk_score = min(10.0, round(total, 1))
Enter fullscreen mode Exit fullscreen mode

A number reported 3 times for MoMo fraud scores 9.0 โ€” High Risk.
Community reports are reviewed before approval. Verified reports stay.
False ones get removed.

The Payment Flow

Paystack handles MoMo and card payments. On successful payment,
a webhook fires and upgrades the user account automatically:

if plan in ('premium_monthly', 'premium_pro'):
    profile.is_premium = True
    profile.premium_expires_at = timezone.now() + timedelta(days=30)
    profile.save()
Enter fullscreen mode Exit fullscreen mode

No manual intervention. Payment confirmed, account upgraded, Telegram
notified โ€” all in under two seconds.

What's Live

  • 50+ verified Ghana scam numbers in the database
  • 8 CV templates (free and premium)
  • Internship board with real Ghanaian company listings
  • PDF course delivery via email on purchase

Live at: https://cyberhub-ghana.onrender.com
GitHub: https://github.com/ashardrach/cyberhub-ghana

Built it. Shipped it. Real users. Real payments.

Top comments (0)