How nischalacharya060/nepal-license-checker works
Nepal License Checker is a bilingual web app for checking whether a Nepal driving license has been printed, with indexed and live DOTM lookup paths. Its broader product includes saved-user alerts, OCR, developer APIs, administration, and offline PWA support. The main lookup flow and several internal dependencies are evidenced by excerpts or README statements; unsampled capability links are omitted where their runtime wiring cannot be verified.
Main entry points: license/route.ts Lookup endpoint · turso.ts Turso index · licenses/route.ts Saved licenses · developerAuth.ts Developer access
Components 28
License lookup
- Lookup experience
src/app/page.tsx - License form
src/components/LicenseForm.tsx - Lookup endpoint
src/app/api/license/route.ts - Input sanitization
src/utils/sanitize.ts - Rate limiting
src/lib/rateLimit.ts - Search logging
src/lib/searchLogger.ts - Lookup result
src/components/LicenseResult.tsx
Data and alerts
- Turso index
src/lib/turso.ts - PDF scraper
scripts/scraper.js - Data sync runner
scripts/update-data.js - Saved licenses
src/app/api/user/licenses/route.ts - Email alert service
scripts/notifications.js - Notification access
src/lib/notifications.ts - Email delivery
src/lib/email.ts
Accounts and APIs
- User authentication
src/lib/userAuth.ts - Developer API
src/app/api/developer/keys/route.ts - Developer access
src/lib/developerAuth.ts - Developer analytics
src/app/api/developer/analytics/route.ts
Operations and extensions
- Admin console
src/app/admin/page.tsx - License OCR
src/app/api/ocr/route.ts - OCR scanner
src/components/OcrScannerModal.tsx - Testimonials
src/app/api/testimonials/route.ts - Offline PWA
public/sw.js - Site metadata
src/app/api/meta/route.ts - Metadata cache
src/lib/metaCache.ts - System mode
src/lib/systemMode.ts
Other components
- License holder
- DOTM records
Connections 35
- License holder → Lookup experience: opens
README.md - Lookup experience → License form: presents
README.md - License form → Lookup endpoint: requests status
README.md - Lookup endpoint → Input sanitization: sanitizes input
src/app/api/license/route.ts - Lookup endpoint → Rate limiting: checks limits
src/app/api/license/route.ts - Lookup endpoint → Turso index: queries index
README.md - Lookup endpoint → DOTM records: scrapes on miss
README.md - Lookup endpoint → Search logging: logs searches
src/app/api/license/route.ts - Lookup endpoint → Developer access: validates keys
src/app/api/license/route.ts - Lookup endpoint → User authentication: checks user
src/app/api/license/route.ts - Lookup endpoint → Lookup result: returns status
README.md - License holder → Saved licenses: manages alerts
README.md - Saved licenses → User authentication: authenticates user
src/app/api/user/licenses/route.ts - Saved licenses → Turso index: reads and writes
src/app/api/user/licenses/route.ts - Saved licenses → Notification access: manages subscriptions
src/app/api/user/licenses/route.ts - Notification access → Email alert service: delegates operations
src/lib/notifications.ts - Notification access → Turso index: provides database
src/lib/notifications.ts - Email alert service → Email delivery: sends alerts
- PDF scraper → DOTM records: fetches PDFs
README.md - Data sync runner → PDF scraper: runs sync
- PDF scraper → Turso index: upserts records
README.md - License holder → Developer API: requests API access
- Developer API → Developer access: manages keys
- Developer access → Turso index: persists access data
src/lib/developerAuth.ts - Developer analytics → Developer access: verifies session
src/app/api/developer/analytics/route.ts - Developer analytics → Turso index: queries metrics
src/app/api/developer/analytics/route.ts - License holder → OCR scanner: scans license
- OCR scanner → License OCR: submits image
- Admin console → Testimonials: manages content
- Admin console → Turso index: manages records
- Lookup experience → Site metadata: loads metadata
- Site metadata → Metadata cache: reads and caches
src/app/api/meta/route.ts - Site metadata → System mode: loads mode
src/app/api/meta/route.ts - System mode → Turso index: reads and writes
src/lib/systemMode.ts - License holder → Offline PWA: uses offline app
README.md