GyaanSetu WebDev

Frontend, backend and devops for the modern web.

230 articlesDeep, practical knowledge

Frontend Team Cuts Bundle Size to Zero by Tree-Shaking Type-Safe API Mocks

The team built a dev-only mock layer using Axios interceptors and Vite’s tree-shaking. By gating the interceptor with import.meta.env.DEV, a custom VITE_ENABLE_MSW flag, and the MODE variable, the entire mock code is stripped from production bundles, keeping the bundle size unchanged.

WebDev · 3 min read

RamenHire’s Email Bug Turned Every Hiring Alert into a Phishing Hook

The flaw let any applicant inject a fake "verify" link into the HTML email template; the payload stored with the job listing and appeared in every subsequent notification until a new escapeHtml helper was added and both unit and live tests confirmed the fix.

WebDev · 3 min read

ನನ್ನದೇ ಕೋಡ್ ಅನ್ನು ಪರೀಕ್ಷಿಸುವುದು: ಕಾಂಟ್ರಾಕ್ಟ್ ಟೆಸ್ಟಿಂಗ್ ಏನು ಬಹಿರಂಗಪಡಿಸಿತು

ನನ್ನದೇ ಕೋಡ್ ಅನ್ನು ಪರೀಕ್ಷಿಸುವುದು: ಕಾಂಟ್ರಾಕ್ಟ್ ಟೆಸ್ಟಿಂಗ್ ಏನು ಬಹಿರಂಗಪಡಿಸಿತು. ನನ್ನ Zerodha ಕ್ಲೋನ್ ಪೂರ್ಣಗೊಂಡಿದೆ ಎಂದು ನಾನು ಭಾವಿಸಿದ್ದೆ. ಇದು Node backend, React frontend, MongoDB ಮತ್ತು Razorpay ಹೊಂದಿರುವ MERN stack ಪ್ರಾಜೆಕ್ಟ್ ಆಗಿತ್ತು...

WebDev · 3 min read

pnpm v12 Cuts Warm Install Time From 381 ms to 12 ms With Rust Rewrite

The rewrite, dubbed “pacquet,” replaces the Node.js bootstrap with a single-threaded Rust binary, keeping all flags and lockfile formats unchanged. Developers can opt-in today via `pnpm self-update next-12` and benchmark the impact on their CI pipelines.

WebDev · 2 min read

Team Automates VPAT Generation in CI, Blocking Inaccessible PRs

By embedding axe-core scans, custom Vitest keyboard helpers, and JSON-stored screen-reader results into the build, the pipeline fails any pull request that introduces an accessibility regression and automatically emits a PDF VPAT with each successful release.

WebDev · 3 min read

Stop Wasting GPU Hours: When to Use Prompting, RAG, or Fine-Tuning

The guide breaks down three levers—prompting, retrieval-augmented generation, and fine-tuning—showing how to spot a knowledge gap versus a behavior gap, and offers a three-step checklist to pick the right tool before splurging on compute.

WebDev · 4 min read

Auto-Animate Launches Marko 6 Adapter, Animates Lists with One Tag

The new adapter hooks into Marko’s onMount lifecycle, creates a MutationObserver, and drives auto-animate’s engine so developers can declare <auto-animate> around a list and get smooth entry, exit and reorder effects without any extra JavaScript.

WebDev · 3 min read

ES2023 ಹೊಸ 'Non-Mutating' ಅರೇ ವಿಧಾನಗಳನ್ನು ಪರಿಚಯಿಸಿದೆ, ಇದು React ಸ್ಟೇಟ್ ಬದಲಾವಣೆಗಳನ್ನು ತಕ್ಷಣವೇ ಪತ್ತೆಹಚ್ಚಲು ಅನುವು ಮಾಡಿಕೊಡುತ್ತದೆ

ಈ ನಾಲ್ಕು ಹೊಸ ವಿಧಾನಗಳಾದ `toSorted`, `toReversed`, `toSpliced` ಮತ್ತು `with` ಹೊಸ ಅರೇಗಳನ್ನು ನೀಡುತ್ತವೆ, ಇದರಿಂದಾಗಿ React ನ 'shallow-compare' ಹೊಸ ರೆಫರೆನ್ಸ್ ಅನ್ನು ಗುರುತಿಸುತ್ತದೆ ಮತ್ತು ಈ ಮೊದಲು ಅಪ್‌ಡೇಟ್‌ಗಳನ್ನು ಮರೆಮಾಚುತ್ತಿದ್ದ 'spread-operator' ಹ್ಯಾಕ್‌ಗಳಿಲ್ಲದೆ ಸುಲಭವಾಗಿ ರೀ-ರೆಂಡರ್ ಮಾಡುತ್ತದೆ.

WebDev · 4 min read

Zod + Vercel AI SDK Guarantees Type-Safe JSON From LLMs, Preventing Crashes

A production classifier once threw an exception after an LLM added an unexpected “explanation” key, exposing how raw JSON parsing can silently break services. Wiring Zod schemas into Vercel’s AI SDK or Anthropic’s tool-use API catches such mismatches before they crash your app.

WebDev · 5 min read