Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Backend – useragent.one

This is the Fastify + TypeScript backend for useragent.one. It exposes a simple HTTP API powered by the excellent user-agents package.


🧠 What It Does

  • Serves random user-agent strings via a GET endpoint
  • Accepts query params to filter results (device type, platform, etc.)
  • Fetches a fresh user-agent list daily using node-cron
  • Built for speed, lightweight, and deployed with Docker

⚙️ Tech Stack

  • Framework: Fastify
  • Language: TypeScript
  • Validation: Zod
  • Scheduler: node-cron
  • User-Agent source: user-agents

🔄 Fresh User-Agents

The user-agents package maintains an up-to-date list of real browser user-agent strings, updated daily. This backend uses node-cron to pull a fresh copy of the list every 24 hours, so you always get the latest without redeploying or reinstalling.