←back to projects
tools·2026
Nepal License Checker Case Study
Real-time tool to check Nepal smart-card driving license print status. Scrapes DOTM PDFs on a cron, served via an edge SQLite database.
Situation
The Department of Transport Management (DOTM) in Nepal handles driving license printing and verification. However, the system is notoriously slow, experiences constant downtime, and doesn't offer an open API. This leaves drivers waiting for months without knowing their license status or having to download massive PDF files to manually search their names.
Task
My goal was to build a real-time status-checking utility that:
- Automates the retrieval of new license data records as DOTM publishes them.
- Extracts information from complex PDF structures.
- Provides an instant search tool that responds in sub-150ms.
- Operates with high availability, bypassing DOTM's server instability.
Action
To achieve this, I implemented an edge-cached architecture using Next.js and Turso:
- Data Pipeline: Set up a serverless cron job that executes twice a day to scrape the official transport site, checks if new PDF files have been published, and streams them for processing.
- Parsing Engine: Developed a PDF text extraction worker that parses tabular records, structures user data, and batches database insertions.
- Edge Cache Database: Chose Turso (libSQL) to replicate driving license data close to users in Nepal, minimizing query latency.
- Search Optimization: Designed an optimized index on the license registration numbers to ensure query times remain low as the database grows.
Below is an interactive playground showing a simplified version of the search status lookup algorithm:
EdgeReplicaLookup.html
💡 TIP: Type '060' or '2026' in the lookup search box to test the success case!Sandboxed iframe
Result
- Performance: Average search query latency dropped to 85ms (from over 5 seconds when querying DOTM directly).
- Adoption: Serviced over 10,000+ lookups in the first month.
- Reliability: Maintained 100% uptime during periods where the official transport site was completely down.