minhvo.vercel.app

Tue Dec 16 2025

Phạt Nguội — Vietnam Traffic Violation Lookup

Phạt Nguội — Vietnam Traffic Violation Lookup

Next.js

React 19

TypeScript

MongoDB

TailwindCSS

Vercel

Email

Vietnam

Next.js 15 + MongoDB service for looking up Vietnamese traffic violations, with email subscription alerts.

Overview

Tra Cứu Vi Phạm Giao Thông (Traffic Violation Lookup) is a Vietnamese public-service web app for checking phạt nguội — traffic violations recorded by camera and only mailed weeks later. Users punch in their plate, get back the time, location, vehicle type, offense, and resolution status, and can subscribe by email for future violation alerts.

Reached 8 stars within weeks of launch — Vietnamese drivers actually use it.

Features

🔍 Plate Lookup

  • Supports six Vietnamese plate formats: 11H1-1111, 11H11111, 11H-1111, 11H1111, 11HH11111, 11HH1111
  • Returns time + location, vehicle + plate color, offense behavior, issuing unit, resolution office, and processing status

📧 Email Notifications

  • Per-plate email subscription
  • Daily SMTP cron checks for new violations
  • Double-opt-in confirmation
  • One-click unsubscribe with signed tokens

💻 UI/UX

  • Tailwind-driven responsive layout
  • Lucide icons, smooth motion, sensible loading and error states

Technical Stack

  • Next.js 15 (App Router) on React 19
  • TypeScript end-to-end
  • MongoDB for plates + subscriptions
  • API Routes + Vercel Cron Jobs for the daily scrape
  • Nodemailer / SMTP for transactional email
  • Tailwind CSS + Lucide Icons

Required env vars

MONGODB_URI, MAIL_SERVICE, MAIL_HOST, MAIL_PORT, MAIL_USER, MAIL_PASSWORD, NEXT_PUBLIC_API_URL, CRON_SECRET, UNSUBSCRIBE_SECRET, NEXT_PUBLIC_APP_URL.

Implementation Highlights

  • Regex zoo: a small parser normalizes the six accepted plate formats into a single canonical key before hitting the upstream lookup
  • Cron-driven diffing: each run pulls the latest violations per subscribed plate, diffs against the stored snapshot, and fans out emails only on new rows
  • Token-signed unsubscribe via UNSUBSCRIBE_SECRET so the link is stateless and can't be tampered with
  • Vercel-first deploy with a one-click "Deploy" button that pre-wires all required env vars

Role & Responsibilities

  • Full-stack — schema, scraping pipeline, plate normalization, UI, email templates
  • Operated the daily cron + monitored deliverability