A high-speed, zero-dependency NestJS API for validating, formatting, calculating verification digits (Modulo 11 DV), and generating test Chilean national identification numbers (RUT/RUN). Optimized for serverless deployment on Vercel and AWS Lambda.
🌐 English Version (Default) | Versión en Español
GET /validate?rut=12.345.678-k
Response:
{
"rut": "12.345.678-k",
"isValid": true,
"formatted": "12.345.678-K",
"clean": "12345678K",
"body": "12345678",
"dv": "K"
}GET /calculate-dv?body=12345678
Response:
{
"body": "12345678",
"dv": "K",
"formatted": "12.345.678-K",
"clean": "12345678K"
}GET /generate?count=3
Response:
{
"count": 3,
"ruts": [
{ "body": "18452391", "dv": "4", "formatted": "18.452.391-4", "clean": "184523914" },
{ "body": "9382104", "dv": "K", "formatted": "9.382.104-K", "clean": "9382104K" },
{ "body": "21048592", "dv": "2", "formatted": "21.048.592-2", "clean": "210485922" }
]
}# 1. Install dependencies
npm install
# 2. Run local NestJS dev server
npm run start:dev
# 3. Build production bundle
npm run buildEngineered by Atelier Busco — Strategic technical partner for founders and innovation leaders.