Skip to content
C

Code Mongers

Turning ideas into Impact !

Created on 28th February 2026

β€’

C

Code Mongers

Turning ideas into Impact !

The problem Code Mongers solves

1️⃣ FRONTEND (Next.js)

Tech Used:

Next.js

React

Axios

JWT authentication

Responsibilities:

User login/register

Upload certificate

Manual credential entry

Show Pending / Verified credentials

Connect Coursera profile

Show verification result

Call backend APIs

It communicates with:

Node.js Backend (Express APIs)
2️⃣ BACKEND (Node.js + Express + MongoDB)

Tech Used:

Express.js

MongoDB (Mongoose)

JWT Authentication

Axios

Cheerio (HTML scraping)

Ethers.js (Blockchain interaction)

πŸ” Authentication Flow

JWT-based login

Protected routes

req.user.id extracted from token

πŸ“„ Credential Flow
When user uploads certificate:

Certificate stored in MongoDB (CredentialSchema)

Status = pending

ML analysis may be triggered

Blockchain anchoring optional

Shows in "Pending" tab

🧠 Coursera Profile Verification

You built a token-based ownership verification system:

Flow:

User gives Coursera profile URL

Backend generates random name token:

John Artex

User temporarily changes Coursera display name

Backend fetches HTML

Scrapes:

og:title

title

h1

h2

JSON-LD

If token found β†’ Verified

Saved in:

user.platformSync.coursera

That’s clever and production-style.

3️⃣ ML CERTIFICATE FRAUD DETECTION (Flask + PyTorch)

You built a deep learning certificate authenticity checker.

Tech Used:

Flask

PyTorch

SCSE-UNet model

OpenCV

PyMuPDF

pdf2image

Torchvision

PIL

ML Flow

User uploads certificate (image or PDF)

PDF converted to image

Image resized to 896x896

Passed into SCSE-UNet

Heatmap generated

Suspicious pixel percentage calculated

If >25% β†’ FAKE

Else β†’ REAL

Returns:

{
is_fake,
confidence,
suspicious_percentage,
heatmap_image
}

Frontend displays:

Original image

Heatmap

Confidence %

This is actual computer vision fraud detection.

4️⃣ BLOCKCHAIN (Ethereum – Sepolia)

You built:

πŸ”— Smart Contract: Credexa.sol

It:

Stores bytes32 credentialHash

Stores issuer address

Stores timestamp

Only owner can anchor

Anyone can verify

Backend Blockchain Service

Using:

ethers.js

Environment variables:

SEPOLIA_RPC_URL
BACKEND_PRIVATE_KEY
Blockchain Flow

When credential is verified:

Backend creates SHA256 hash

Calls:

anchorCredential(hash)

Hash stored on-chain

transactionHash stored in MongoDB

Later:

getCredential(hash)

returns on-chain proof

You built real Web3 anchoring.

🧠 FULL DATA FLOW (END TO END)

User uploads certificate
↓
Stored in MongoDB (Pending)
↓
ML Fraud Detection (Flask)
↓
If legit β†’ Generate SHA256 hash
↓
Anchor on Ethereum (Sepolia)
↓
Store transactionHash + credentialHash
↓
Credential becomes Verified
↓
Anyone can verify hash on blockchain

That is enterprise-level architecture.

Challenges we ran into

1️⃣ ML Model Productionization

Integrating a research-based PyTorch model (SCSE-UNet) into a live Flask API was non-trivial.
Major issues:

Weight file compatibility & naming mismatches

CPU inference constraints

Image size normalization (896Γ—896) consistency

Tensor ↔ NumPy ↔ Base64 conversions

This was real model-to-production friction.

2️⃣ Reliable PDF β†’ Image Processing Pipeline

Handling PDFs in a web system required:

Rendering first page safely

Stream handling (seek(0))

Managing fallback between PyMuPDF and pdf2image

Avoiding memory crashes

Ensuring deterministic conversion for ML preprocessing was a serious systems challenge.

3️⃣ Secure Blockchain Anchoring Architecture

Designing trust flow:

Backend-only contract ownership

Private key management via .env

Gas funding & Sepolia RPC reliability

Ensuring credential hash uniqueness

The main difficulty was aligning off-chain MongoDB records with immutable on-chain hashes without breaking consistency.

4️⃣ Multi-Service System Consistency

You had:

Flask ML service

Node backend

MongoDB

Ethereum contract

Ensuring correct data flow between:
Upload β†’ ML β†’ DB β†’ Blockchain β†’ Verification

while handling async errors and state mismatches was a real distributed system problem.

5️⃣ Trustless Profile Verification (Coursera)

Without official API support, you engineered:

Token-based ownership challenge

Public profile scraping

HTML parsing + normalization logic

Expiry-based verification

This required balancing usability with spoof resistance.

6️⃣ Data Integrity & Hashing Strategy

Generating credential hashes consistently required:

Canonical data normalization

Avoiding hash drift due to whitespace/case changes

Maintaining uniqueness constraints in MongoDB

Even minor string differences could break blockchain verification.

Discussion

Builders also viewed

See more projects on Devfolio