GyaanSetu WebDev

Frontend, backend and devops for the modern web.

230 articlesDeep, practical knowledge

જ્યારે PostgreSQL માઇગ્રેશન રેપ્લિકામાં મોકલવામાં આવે ત્યારે "Read-Only Transaction" ભૂલ સાથે નિષ્ફળ જાય છે

આ ભૂલ સામાન્ય રીતે ત્યારે થાય છે જ્યારે કોઈ 'write' ઓપરેશન રીડ રેપ્લિકા પર કરવામાં આવે છે—જેનું કારણ ઘણીવાર PgBouncer દ્વારા કનેક્શન રૂટ થવું, કોઈ રોલ ડિફોલ્ટ રીતે રીડ-ઓન્લી હોવું, અથવા ક્લાઉડ સેટઅપમાં રીડર એન્ડપોઈન્ટનો ઉપયોગ થવો હોઈ શકે છે. આ લેખ બતાવે છે કે વર્તમાન ટ્રાન્ઝેક્શન માટે આ ફ્લેગને કેવી રીતે ઓવરરાઈડ કરી શકાય અને તેનાથી કેવી રીતે બચી શકાય.

WebDev · 3 min read

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

મારા પોતાના કોડનું પરીક્ષણ: કોન્ટ્રાક્ટ ટેસ્ટિંગ દ્વારા શું જાણવા મળ્યું

મારા પોતાના કોડનું પરીક્ષણ: કોન્ટ્રાક્ટ ટેસ્ટિંગ દ્વારા શું જાણવા મળ્યું. મને લાગ્યું કે મારું Zerodha ક્લોન પૂરું થઈ ગયું છે. તે Node બેકએન્ડ, React ફ્રન્ટએન્ડ, MongoDB અને Razorpay સાથેનું એક MERN સ્ટેક પ્રોજેક્ટ હતો...

WebDev · 3 min read

Generics માં Literal Widening રોકવા માટે TypeScript એ Const Type Parameters ઉમેર્યા છે

Type parameter પર નવો const modifier compiler ને શક્ય તેટલો સાંકડો (narrowest) પ્રકાર અનુમાનિત કરવા માટે સૂચવે છે, જેથી "GET" જેવા લિટરલ્સ ફંક્શન બાઉન્ડ્રીઝ પાર પણ લિટરલ જ રહે છે, જેનાથી વારંવાર 'as const' કાસ્ટ કરવાની જરૂરિયાત રહેતી નથી.

WebDev · 3 min read

કોઈપણ કોડિંગ અનુભવ વગર, AI લો-કોડનો ઉપયોગ કરીને ઘાનાના ડેવલપરે PowerPulse લોન્ચ કર્યું

PowerPulse ઘાનામાં કોઈપણ વ્યક્તિને બ્લેકઆઉટ રિપોર્ટ કરવા, લાઈવ ફીડ્સ જોવા અને યોગદાન માટે પોઈન્ટ્સ મેળવવાની સુવિધા આપે છે. Next.js, Tailwind, Supabase દ્વારા નિર્મિત અને Vercel પર હોસ્ટ કરેલી આ એપનો ઉદ્દેશ્ય તેની 'કોલ્ડ-સ્ટાર્ટ' સમસ્યાને દૂર કરવા માટે AI-આધારિત આગાહીઓ અને પુશ નોટિફિકેશન્સ ઉમેરવાનો છે.

WebDev · 3 min read

બે અઠવાડિયામાં REST ને બદલે tRPC નો ઉપયોગ કરીને ડેવલપરે API ઓવરહેડ ઘટાડ્યો

આ માઈગ્રેશનથી OpenAPI સ્પેક, SDK જનરેશન, Postman કલેક્શન અને હાથથી લખેલા TypeScript ઇન્ટરફેસની જરૂરિયાત દૂર થઈ ગઈ, જેનાથી એડિટર તરત જ ભૂલો પકડી શકે છે અને રિપોઝિટરીનું કદ પણ નોંધપાત્ર રીતે ઘટી ગયું છે.

WebDev · 3 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

Auto-Animate એ Marko 6 એડેપ્ટર લોન્ચ કર્યું, હવે માત્ર એક ટેગથી લિસ્ટ એનિમેટ કરો

નવું એડેપ્ટર Marko ના onMount લાઇફસાયકલ સાથે જોડાય છે, MutationObserver બનાવે છે અને auto-animate ના એન્જિનને ચલાવે છે, જેથી ડેવલપર્સ લિસ્ટની આસપાસ માત્ર <auto-animate> ઉમેરીને કોઈપણ વધારાના JavaScript વગર સ્મૂધ એન્ટ્રી, એક્ઝિટ અને રીઓર્ડર ઇફેક્ટ્સ મેળવી શકે છે.

WebDev · 3 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