{"slug": "i-open-sourced-3-small-node-utilities-i-pulled-out-of-building-an-edtech", "title": "I open-sourced 3 small Node utilities I pulled out of building an edtech platform", "summary": "A developer building MCQplex, an exam-prep platform for Nepal's NEB curriculum, has open-sourced three small Node.js utilities extracted from that work. The packages include llm-free-cascade, which fails over across free-tier LLM APIs such as Gemini, Groq, and Cerebras with multi-key rotation and provider cooldowns; a warm-browser Puppeteer PDF renderer with a concurrency cap; and a MongoDB-backed advisory lock for node-cron jobs running across multiple instances. All three are MIT licensed, tested, and published to npm, with the developer inviting PRs, especially to update stale free-tier model names in providers.json.", "body_md": "I've spent the last while building [MCQplex](https://mcqplex.com), an exam-prep\n\nplatform for Nepal's NEB curriculum. Along the way I built a few pieces of\n\ninfrastructure that had nothing to do with exams specifically, so I pulled\n\nthem out into their own packages:\n\nFree-tier LLM APIs (Gemini, Groq, Cerebras, and others) are individually\n\nrate-limited, but between them they add up to a lot of free inference if you\n\njust fail over from one to the next. This cascades a chat completion across\n\nhowever many you've got keys for, with automatic multi-key rotation (if\n\nyou've made more than one free account on a provider) and cooldown for a\n\nprovider that's structurally broken. Zero dependencies.\n\n``` js\nconst { LLMCascade } = require('llm-free-cascade');\nconst cascade = LLMCascade.fromEnv();\nconst { text, provider } = await cascade.generate({ system, user });\n```\n\nLaunching a fresh headless Chromium per PDF (the naive way to use Puppeteer)\n\ncosts 1-2 seconds and ~200MB of RAM every time. This keeps one browser warm\n\nand gives each render its own page, with a concurrency cap so a burst of PDF\n\nrequests queues instead of taking the server down.\n\nIf you run `node-cron` jobs on more than one instance (PM2 cluster, several\n\nservers), every instance fires the job unless you do something about it.\n\nThis is a tiny MongoDB-backed advisory lock — steal-on-expiry, so a crashed\n\nholder can't deadlock the job forever — for whatever Mongo connection you\n\nalready have.\n\nAll three: zero or optional-peer dependencies, MIT licensed, tested, on npm.\n\nFeedback / PRs welcome, especially on `llm-free-cascade` since free-tier\n\nmodel names drift constantly and `providers.json` is set up so a one-file PR\n\nfixes a stale one.", "url": "https://wpnews.pro/news/i-open-sourced-3-small-node-utilities-i-pulled-out-of-building-an-edtech", "canonical_source": "https://dev.to/ram_chandragiri/i-open-sourced-3-small-node-utilities-i-pulled-out-of-building-an-edtech-platform-28jd", "published_at": "2026-09-19 20:08:57+00:00", "updated_at": "2026-09-19 20:24:30.821082+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "ai-infrastructure", "large-language-models"], "entities": ["MCQplex", "Node.js", "Gemini", "Groq", "Cerebras", "Puppeteer", "MongoDB", "npm"], "alternates": {"html": "https://wpnews.pro/news/i-open-sourced-3-small-node-utilities-i-pulled-out-of-building-an-edtech", "markdown": "https://wpnews.pro/news/i-open-sourced-3-small-node-utilities-i-pulled-out-of-building-an-edtech.md", "text": "https://wpnews.pro/news/i-open-sourced-3-small-node-utilities-i-pulled-out-of-building-an-edtech.txt", "jsonld": "https://wpnews.pro/news/i-open-sourced-3-small-node-utilities-i-pulled-out-of-building-an-edtech.jsonld"}}