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.