Skip to content

Momo-Analysis/momo-data-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MoMo SMS Transaction Analytics

A full-stack application for parsing, storing, filtering, and analyzing Mobile Money (MoMo) SMS transactions. Built with a modern JavaScript stack (Express.js + MySQL backend, HTML/CSS/JavaScript frontend) to help users visualize transaction trends and statistics.


📹 Demo Deliverables

Required Files:

  1. Demo Video - Video demonstration of key features and functionality
  2. Source Code Archive - Complete project files in .zip format
  3. Database File - MySQL database with actual data
  4. Technical Report - PDF report covering our approach, challenges, and key decisions made

🚀 Features

Backend (Express.js + MySQL)

  • Transaction CRUD API with filters and pagination

  • Advanced Search via full-text originalSMS field

  • Transaction Statistics with breakdown by type and totals

  • Health Check Endpoint at /api/health

  • Type and Table-aware Routes

    • /api/transactions/:transactionId resolves using transactionId (can be null)
    • /api/transactions/:type/:id resolves using type table and numeric ID

Frontend (HTML5 + TailwindCSS + Chart.js)

  • Dashboard: Overview of volume and trends by type and time

  • Transaction List Page: Paginated and filterable

  • Transaction Detail Page: Deep-dive into a single transaction

  • Filtering:

    • By type
    • Date range
    • Amount range
    • Full-text search (q param)
  • Responsive Design: Mobile-friendly layout


🎓 Tech Stack

  • Backend:

    • Node.js + Express
    • MySQL (via mysql2)
    • Fast-XML-Parser for parsing raw messages
  • Frontend:

    • Vanilla JavaScript
    • Tailwind CSS (via CDN)
    • Chart.js (for all graphs)
  • Dev Tools:

    • Nodemon, dotenv, ESLint, Prettier

🔎 API Overview

Base URL

http://localhost:3000

Endpoints Summary

Endpoint Method Description
/api/transactions GET List transactions with filters, pagination, and full-text search
/api/transactions/stats GET Return statistics like total amount, averages, etc.
/api/transactions/types GET Return all available transaction types
/api/transactions/:transactionId GET Get a transaction by its unique transactionId
/api/transactions/:type/:id GET Get a transaction by table and internal ID
/api/health GET Health check

📂 Directory Structure

project-root/
├── backend/
│   ├── controllers/
│   ├── routes/
│   ├── services/
│   ├── utils/
│   ├── database.js
│   └── app.js
├── frontend/
│   ├── index.html            # Dashboard
│   ├── transactions.html     # List view
│   ├── transaction.html      # Detail view
│   ├── css/
│   │   └── styles.css
│   ├── js/
│   │   ├── dashboard.js
│   │   ├── transactions.js
│   │   ├── transaction.js
│   │   └── utils.js
├── .env
├── package.json
└── README.md (this file)

📊 Transaction Types

These are the supported categories for transaction analysis:

  • INCOMING: Money received
  • RECLAIMED: Reclaimed transactions
  • PAYMENT: Payments to code holders
  • BANK_DEPOSIT: Bank deposits
  • TRANSFER: Transfers to mobile numbers
  • WITHDRAWN: Withdrawals from agents
  • AIRTIME_BILL: Airtime bill payments
  • UTILITY_BILL: Utility bill payments (Cash Power, etc.)
  • THIRD_PARTY: Transactions initiated by third parties

🌐 Running the App Locally

Backend

cd backend
npm install
cp .env.example .env
# fill .env with user and password
npm run setup:db
npm start

Open http://localhost:3000 in your browser.


❄ Notes & Limitations

  • No export or download features are implemented
  • No caching or local storage usage in frontend
  • No user auth or sessions yet
  • All filters apply only to the transaction list
  • Charts are powered by Chart.js

🛍 Support

For support or technical help, contact the dev team.


Built for MTN MoMo Analytics | 2025

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors