Skip to content

Latest commit

Β 

History

61 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’± SmartRemit

AI-powered remittance timing, FX intelligence, and decision support

Node.js Python MongoDB License

SmartRemit is a full-stack fintech application that helps users make a better decision about when to send an international money transfer.

Instead of simply displaying an exchange rate, SmartRemit combines historical FX data, forecasting, rolling backtesting, model selection, and recommendation logic to answer a practical question:

Should I send the money now, or is waiting likely to give me a better outcome?


πŸš€ Live Project

Resource Link
🌐 Live Frontend Open SmartRemit
βš™οΈ Production API smartremit-api.onrender.com
πŸ€– ML Service smartremit-ml.onrender.com
πŸ’» GitHub Repository Saptami191/Smart-Remittance-App

Deployment note: the application is actively being stabilized for production. The API, ML service, authentication, and cloud deployment are being tested independently before the final public demo is considered production-ready.


🎯 The Problem

International remittance users face a simple but important decision:

Send money now or wait for a potentially better exchange rate?

Most remittance interfaces provide the current rate but do not help users reason about short-term FX movement or quantify what waiting could mean for the amount they want to send.

SmartRemit turns that uncertainty into a data-driven decision-support workflow.

Remittance Amount
       ↓
Current FX Rate
       ↓
Historical FX Intelligence
       ↓
Multiple Forecasting Candidates
       ↓
Rolling Backtesting
       ↓
Best Validated Model
       ↓
Expected Gain / Loss
       ↓
Send Now / Wait Recommendation

✨ What SmartRemit Does

  • πŸ“ˆ Tracks and analyses historical exchange-rate behaviour
  • πŸ€– Evaluates multiple forecasting strategies
  • πŸ§ͺ Uses rolling backtesting instead of blindly trusting one model
  • 🎯 Selects a forecasting candidate based on recent validation performance
  • πŸ’° Estimates potential gain for a user-defined remittance amount
  • πŸ’‘ Generates an actionable Send Now / Wait recommendation
  • πŸ“Š Provides an exchange-rate intelligence dashboard
  • πŸ” Uses JWT authentication and bcrypt password hashing
  • πŸ—„οΈ Stores users and remittance history in MongoDB Atlas
  • ☁️ Separates the API and ML workloads for cloud deployment

🧠 AI / ML: Model Selection, Not Model Worship

A core engineering principle in SmartRemit is:

A complex model should not win just because it is complex.

The forecasting pipeline compares multiple candidates:

Candidate Role
Naive Recent-rate baseline
Moving Average (7) Short-term smoothing
Exponential Smoothing Recency-weighted trend
Prophet Time-series forecasting

Candidates are evaluated using rolling validation with:

  • MAE β€” Mean Absolute Error
  • RMSE β€” Root Mean Squared Error
  • MAPE β€” Mean Absolute Percentage Error
  • Comparison against a naive baseline

The best-performing candidate can be promoted as the production forecasting artifact.

This prevents the system from assuming that Prophet, or any other sophisticated model, will automatically outperform a simple baseline.

Example validation result

A recent training run evaluated four candidates over rolling 30-observation validation windows:

naive                  1.121667
moving_average_7       1.047762  ← selected
exponential_smoothing  1.081665
prophet                1.299733

The important part is the validation and promotion process, not the absolute score. SmartRemit uses evidence from recent historical data before selecting the production candidate.


πŸ—οΈ Architecture

                         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                         β”‚       Vercel          β”‚
                         β”‚   Frontend / Static   β”‚
                         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                     β”‚ HTTPS
                                     β–Ό
                         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                         β”‚        Render         β”‚
                         β”‚     Node / Express    β”‚
                         β”‚       API Service     β”‚
                         β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
                                 β”‚       β”‚
                      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       └──────────┐
                      β–Ό                             β–Ό
             β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
             β”‚  MongoDB Atlas  β”‚           β”‚   Render ML     β”‚
             β”‚ Users / History β”‚           β”‚ Python / FastAPIβ”‚
             β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                     β”‚
                                                     β–Ό
                                          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                          β”‚ Forecasting +      β”‚
                                          β”‚ Backtesting +      β”‚
                                          β”‚ Model Selection    β”‚
                                          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Service separation

Frontend

  • Static HTML/CSS/JavaScript
  • Hosted on Vercel

API service

  • Node.js + Express
  • Authentication
  • Protected application APIs
  • MongoDB integration
  • Hosted on Render

ML service

  • Python + FastAPI
  • FX forecasting
  • Model evaluation and selection
  • Hosted separately on Render

This separation keeps model-serving workloads independent from the application API and makes each component easier to deploy and scale.


πŸ” Authentication & API

Authentication uses:

  • JWT access tokens
  • bcrypt password hashing
  • Protected API routes
  • MongoDB-backed user accounts

Public endpoints

POST /api/signup
POST /api/login

Protected endpoints

POST /api/route
GET  /api/forecast
POST /api/fraud
GET  /api/history

Protected endpoints require a valid JWT in the request authorization header.

Example:

Authorization: Bearer <JWT_TOKEN>

Passwords are never intended to be stored as plaintext. Secrets such as MONGO_URI and JWT_SECRET must remain in deployment environment variables.


πŸ› οΈ Tech Stack

Layer Technology
Frontend HTML, CSS, JavaScript
Backend Node.js, Express
Authentication JWT, bcrypt
Database MongoDB Atlas, Mongoose
ML / Forecasting Python, FastAPI, Prophet, Scikit-learn
Evaluation Rolling backtesting, MAE, RMSE, MAPE
Deployment Vercel + Render
CI/CD GitHub Actions
Source Control Git + GitHub

πŸ“‚ Repository Structure

Smart-Remittance-App/
β”‚
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ controllers/          # Authentication and application logic
β”‚   β”œβ”€β”€ middleware/           # JWT authentication middleware
β”‚   β”œβ”€β”€ models/               # MongoDB/Mongoose models
β”‚   β”œβ”€β”€ routes/               # API routes
β”‚   β”œβ”€β”€ app.js / server.js    # Node backend entry points
β”‚   └── package.json
β”‚
β”œβ”€β”€ ml_service/
β”‚   β”œβ”€β”€ main.py               # ML API entry point
β”‚   β”œβ”€β”€ train_forecast.py     # Training + model selection
β”‚   β”œβ”€β”€ ingest_fx_data.py     # FX data ingestion
β”‚   β”œβ”€β”€ test_forecast_service.py
β”‚   └── requirements.txt
β”‚
β”œβ”€β”€ ml_model/                 # Promoted model artifacts
β”œβ”€β”€ index2.html               # Authentication UI
β”œβ”€β”€ dashboard.html            # Main application dashboard
β”œβ”€β”€ style2.css                # Authentication styling
β”œβ”€β”€ vercel.json               # Frontend/API deployment configuration
β”œβ”€β”€ render.yaml               # Render Blueprint configuration
β”œβ”€β”€ requirements.txt          # Root-level compatibility requirements
└── README.md

πŸš€ Run Locally

Prerequisites

  • Node.js 20+
  • Python 3.10+
  • MongoDB Atlas account or local MongoDB
  • Git

1. Clone the repository

git clone https://github.com/Saptami191/Smart-Remittance-App.git
cd Smart-Remittance-App

2. Configure backend environment variables

Create backend/.env:

MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_long_random_secret
ML_SERVICE_URL=http://localhost:8000

Never commit this file.

3. Start the Node API

cd backend
npm install
npm start

4. Start the ML service

In a second terminal:

cd ml_service
pip install -r requirements.txt
uvicorn main:app --reload --port 8000

5. Train the forecasting pipeline

python train_forecast.py

6. Open the frontend

Serve the repository with a local static server rather than relying on file:// URLs when testing API calls.

For example, with Python:

python -m http.server 5500

Then open:

http://localhost:5500/index2.html

πŸ§ͺ Testing

Run the forecasting service tests with:

pytest -q ml_service/test_forecast_service.py

The project also uses CI validation around the forecasting pipeline so model changes can be evaluated before promotion.


☁️ Deployment

The repository includes a Render Blueprint with separate services for the Node API and Python ML service.

API service

Runtime: Node
Root Directory: backend
Build: npm install
Start: npm start

ML service

Runtime: Python
Root Directory: ml_service
Build: pip install -r requirements.txt
Start: uvicorn main:app --host 0.0.0.0 --port $PORT

Required API environment variables

MONGO_URI
JWT_SECRET
ML_SERVICE_URL

Required security practice

Do not commit:

  • MongoDB passwords
  • JWT secrets
  • API keys
  • .env files
  • private deployment credentials

🧱 Engineering Decisions

Why backtesting?

A forecasting model can look impressive while performing poorly on unseen data. SmartRemit therefore evaluates candidates using rolling historical validation rather than trusting training accuracy.

Why compare against a naive baseline?

If a sophisticated model cannot reliably beat a simple baseline, there is little engineering justification for deploying the sophisticated model.

Why separate API and ML services?

The API handles authentication, user data, business logic, and request routing. The ML service handles forecasting and model inference. Separating them reduces coupling and makes deployment and scaling more manageable.

Why JWT + bcrypt?

The application needs stateless authentication for protected APIs while avoiding plaintext password storage. JWT handles authenticated requests; bcrypt handles password hashing.


πŸ—ΊοΈ Roadmap

Current

  • Full-stack application structure
  • Node/Express backend
  • MongoDB integration
  • JWT authentication architecture
  • bcrypt password hashing
  • FX forecasting pipeline
  • Rolling backtesting
  • Baseline comparison
  • Automatic candidate selection
  • Promoted model artifact
  • Render Blueprint configuration
  • Vercel frontend deployment

Next

  • Finish end-to-end production authentication verification
  • Complete ML/API production integration testing
  • Improve recommendation calibration
  • Add stronger API failure recovery
  • Add observability and structured logging
  • Load-test the application
  • Add real-time FX data refresh
  • Expand remittance corridor coverage
  • Add explainable recommendation summaries

πŸ† Buildathon Positioning

SmartRemit is designed as a proof-of-work fintech/AI system, not an LLM wrapper.

The strongest technical story is the combination of:

Real financial decision problem
          ↓
Historical FX data
          ↓
Multiple forecasting candidates
          ↓
Rolling validation
          ↓
Evidence-based model selection
          ↓
Expected financial impact
          ↓
Actionable recommendation

For an AI/finance evaluation, the project demonstrates that AI/ML is being used where it has a concrete job: forecasting uncertain FX behaviour and supporting a financial decision.

The next major evolution is to add agentic workflows around routing, compliance, explanation, and failure recovery without turning the product into an unnecessary LLM wrapper.


πŸ‘©β€πŸ’» Author

Saptami Biswas
B.Tech Electrical Engineering Β· NIT Agartala


πŸ“œ License

This project is released under the MIT License.

About

SmartRemit is an AI-powered remittance optimizer that predicts currency trends and provides actionable recommendations (send now vs wait) using machine learning. Built with Node.js, Python (Prophet), and MongoDB, featuring secure authentication and an interactive dashboard.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages