r/javascript • • Apr 16 '26

tiks – Procedural UI sounds in 2KB, zero audio files, pure Web Audio synthesis

Thumbnail rexa-developer.github.io
145 Upvotes

r/javascript • • Apr 17 '26

AskJS [AskJS] Is this how api works?

0 Upvotes

I was thinking about how clicking a link is more complex than it seems. First, DNS resolves the domain to an IP if not cached, it queries recursive servers all the way up to root servers.

After that, a TCP connection is built for reliable data transfer, and then HTTP runs on top to structure web requests.

So, why HTTP on TCP? TCP is like a reliable delivery truck, but HTTP is the language we use for the web. What do you think

how do these layers shape your experience online?

#WebDev #DNS

#TCP #HTTP


r/javascript • • Apr 17 '26

I've built an game based of jsab with @base44! STILL BETA and dont worry i did some of the code and the game is still buggy

Thumbnail nocturnal-beatdodge.base44.app
0 Upvotes

r/javascript • • Apr 17 '26

Do you have Swagger? AI can build your entire frontend. Swagger is the best context and harness.

Thumbnail nestia.io
0 Upvotes

If your backend has Swagger, you already have everything AI needs to build your frontend. Most teams don't realize this — they paste endpoints into prompts and hope AI gets the shapes right. There's a better way.

Convert your Swagger to a typed SDK. AI gets type enforcement, a mockup simulator, and full business logic as comments. The feedback loop changes completely: read SDK → write code → verify without a running server → compile check → done.

I built a full e-commerce app — customer flows, seller console, admin panel — from a single prompt to demonstrate it. Here's how it works.


r/javascript • • Apr 16 '26

Released the April update for Nano Kit - the main highlight is SSR support. Nano Kit is a lightweight, modular, and high-performance ecosystem for state management in modern web applications.

Thumbnail nano-kit.js.org
5 Upvotes

r/javascript • • Apr 16 '26

BrowserPod 2.0: in-browser WebAssembly sandboxes. Run git, bash, node, python...

Thumbnail labs.leaningtech.com
23 Upvotes

r/javascript • • Apr 17 '26

Release v1.6.0 — Bun Runtime Support · kasimlyee/dotenv-gad

Thumbnail github.com
0 Upvotes

dotenv-gad can now be used on bun runtime. Bun users can have the same advantages of dotenv-gad


r/javascript • • Apr 17 '26

Category Theory for JavaScript/TypeScript Developers

Thumbnail ibrahimcesar.cloud
0 Upvotes

r/javascript • • Apr 16 '26

AskJS [AskJS] Cuanto puedo cobrar este proyecto?

0 Upvotes

Me escribieron de una inmobiliaria para presupuestar un proyecto, que podría hacerse de dos formas. Actualmente su sitio web está hecho en PHP, con un diseño antiguo y roto. Mis opciones son:

1- Modificar el diseño a uno mas moderno manteniendo el mismo stack (opción más fácil pero siguen con un stack desactualizado)

2- Migrar a NextJs (y quizá Nest) con un diseño moderno y stack actualizado.

Para el primer caso, cabe aclarar que no manejo del todo PHP laravel, pero me animo porque es tocar únicamente diseño (html) y tengo a mi amigo Claudio que me da una mano.

Para el segundo caso, puede sonar más complejo porque incluye landing, host de imagenes, cambiar el host de la web, rehacer autenticación y migrar BDD, pero lo cierto es que ya tengo una app de inmobiliaria en NextJs que puedo clonar y cambiar diseño para adaptarla a lo que quiere el cliente.

Aparte de todo esto, no hay nada que sea muy complejo, la estructura base de datos ya me la dan, y no hay integraciones a Wpp o Telegram, ni calendar (cosas que podría meter como plus si me pagan mas xd).

Cuánto se puede cobrar esto? La verdad hace rato no me actualizo con los costos de desarrollo.


r/javascript • • Apr 16 '26

AskJS [AskJS] Are npm supply chain attacks making you rethink dependency trust?

0 Upvotes

The npm ecosystem has had a rough ~10 months, and honestly, it’s starting to feel a bit fragile.

Quick recap of some major incidents:

  • GlueStack ecosystem attack (June 2025): attackers used stolen tokens to inject code that could run shell commands, take screenshots, and exfiltrate files
  • Chalk & Debug hijack (Sept 2025): phishing attack → maintainer account takeover → crypto-stealing payloads
  • Shai-Hulud worm (Nov 2025): self-propagating malware that spread via stolen GitHub/npm tokens, eventually hitting 492 packages
  • Axios RAT injection (Mar 2026): compromised maintainer account → trojanized versions targeting multiple OS

At least two of these affected me directly (both personal and professional projects). I updated dependencies as advised, but months later, new vulnerabilities still keep surfacing.

It feels like even when you do the “right thing,” you’re still exposed.

How has this changed your approach to dependency management?
Are you doing anything differently now (pinning, auditing, reducing deps, internal mirrors, etc.)?


r/javascript • • Apr 15 '26 Popcorn

I built LiquidGlass, a JS lib to render pixel perfect iOS Liquid Glass effect on the web (with WebGL)!

Thumbnail liquid-glass.ybouane.com
119 Upvotes

It does refractions, chromatic aberration and really reproduces the effect beautifully. The glass elements work even on top of regular html elements.


r/javascript • • Apr 16 '26

I replaced the single-agent coding approach with a 3-agent team (Tech Lead, Developer, QA) that do implementation from Linear ticket to the PR. I merge 7/10 PRs done fully autonomously this way. Agents are open sourced.

Thumbnail github.com
0 Upvotes

r/javascript • • Apr 16 '26

Thvbvvhhbbgggggg

Thumbnail sg-public-api.hoyoverse.com
0 Upvotes

r/javascript • • Apr 15 '26

Migrating 6000 React tests using AI Agents and ASTs

Thumbnail eliocapella.com
0 Upvotes

r/javascript • • Apr 14 '26

Trustlock: a dependency admission controller that enforces npm trust signals as policy

Thumbnail github.com
19 Upvotes

r/javascript • • Apr 14 '26

Contributing Callsite Revalidation Opt-out to React Router

Thumbnail programmingarehard.com
10 Upvotes

I've not a made a meaningful code contribution to React Router before this so I was pretty pumped to be able to see this through.


r/javascript • • Apr 14 '26

Optique 1.0.0: environment variables, interactive prompts, and 1.0 API cleanup

Thumbnail github.com
3 Upvotes

r/javascript • • Apr 14 '26

AST-based i18n workflow for JS apps — now with debug mode & dry-run

Thumbnail npmjs.com
0 Upvotes

r/javascript • • Apr 14 '26

I made a small TypeScript package for offline intent matching: intentmap

Thumbnail npmjs.com
1 Upvotes

I built this as a lightweight way to map user text to intents locally, without APIs or LLM calls.

Example use cases:

- "I want to complete my purchase" -> checkout

- "look up red sneakers" -> search

- "never mind" -> cancel

It’s TypeScript-first, works in browser/Node, and includes ranked matching plus optional explanation output.

npm: https://www.npmjs.com/package/intentmap

playground: https://codesandbox.io/p/sandbox/w5mmwm

Would love feedback on whether this is useful and where it breaks down.


r/javascript • • Apr 14 '26

AskJS [AskJS] What are the real architectural limits of using console.log + %c as a pixel renderer, and how would you push past them?

0 Upvotes

Context: I've been experimenting with SDF ray-marching rendered entirely via styled console.log calls — each "pixel" is a space character with a background-color CSS style injected through %c format arguments. No canvas, no WebGL. The scene includes soft shadows, AO, and two orbiting point lights at ~42×26 pixels, doing around 11k ray-march steps per frame.

I've hit a few walls I don't have good answers for and wanted to hear how people would actually approach them:

Each frame is one console.log with 1000+ %c args — the format string alone is 80–120kb. Is there a CDP-level trick that beats this, or is this just the hard ceiling?

Partial redraws seem impossible since the console only appends. Has anyone found a diffing approach that meaningfully reduces redundant output?

Soft shadows need a secondary ray-march per light per pixel — the main bottleneck. Can a SharedArrayBuffer + Worker pool realistically pre-compute the framebuffer before the log call, or does the transfer cost kill it?

Would a WASM SDF evaluator actually move the needle here, or is the bottleneck firmly on the DevTools rendering side?

Is temporal supersampling (alternating sub-pixel offsets frame-to-frame) something the human eye would even pick up given the console's reflow latency?

Memory creep from non-cleared frames — anyone have a cleaner solution than "hard clear every N frames and eat the flash"?


r/javascript • • Apr 14 '26

AskJS [AskJS] AI codebase information tool?

0 Upvotes

HI, I am one person dev with multiple web based side projects. I am looking for an AI tool that can plug in to my codebase and answer questions. Whether that is technical questions from myself on how features work, or questioning it for more info on a support query.

Has anyone seen / use something like that?


r/javascript • • Apr 13 '26

Frontend framework bundle-size benchmark with a shared TodoMVC baseline

Thumbnail mlgq.github.io
4 Upvotes

I built a cross-framework bundle-size benchmark using the same TodoMVC feature set across implementations, so differences are easier to attribute to framework/runtime behavior rather than app logic differences.

What this benchmark measures:

  • raw
  • minified
  • minified + gzip
  • breakdown by runtime / template / script / style

Method notes for fairness:

  • same feature scope across frameworks
  • template/script/style are extracted and compared
  • styles are scoped everywhere (TSX implementations use CSS Modules)
  • in the UI, style is included in stats but not selected by default (differences there are usually small and mostly from framework-added scoping metadata)

Main observations so far:

  • in the mainstream group, Vue 2/3 start much smaller than React/Angular (mostly runtime cost)
  • in the fine-grained group, the smallest starting size and the best growth curve are not always the same framework
  • Svelte 4 starts very small at low component counts, but grows much faster at higher component counts

Repo: https://github.com/mlgq/frontend-framework-bundle-size

If you spot an unfair implementation detail or have optimization ideas, critique and PRs are very welcome.


r/javascript • • Apr 13 '26

Subreddit Stats Your /r/javascript recap for the week of April 06 - April 12, 2026

5 Upvotes

Monday, April 06 - Sunday, April 12, 2026

Top Posts

scorecommentstitle & link
451 commentsHow attackers are hiding malicious code in build configs
4013 commentsTinyTTS — Ultra-lightweight offline Text-to-Speech for Node.js (1.6M params, 44.1kHz, ~53x real-time on CPU, zero Python dependency)
3710 commentsThe Intl API: The best browser API you're not using
307 commentsfetch-extras — Build your own HTTP client with Fetch
277 commentsYou can't cancel a JavaScript promise (except sometimes you can)
247 commentsstyled-components 6.4 now available
209 commentsWhat To Know in JavaScript (2026 Edition)
151 commentsRelease Re2js v2 - A pure JS RegExp engine that defeats ReDoS
1511 commentsI built an open-source WYSIWYG editor in vanilla JavaScript (no frameworks, CDN-ready)
102 commentscargo-npm: Distribute Rust CLIs via npm without postinstall scripts

 

Most Commented Posts

scorecommentstitle & link
524 commentsWe transpiled PHPUnit (54k lines, 412 files) to JavaScript. 61.3% of tests passing
023 comments`any` caused a production bug for me — how are you handling API typing?
020 comments[AskJS] [AskJS] Is it still socially acceptable to use 4 space indentation?
618 comments[AskJS] [AskJS] Do you prefer flattening API responses or keeping nested structures on the frontend?
211 comments[Showoff Saturday] Showoff Saturday (April 11, 2026)

 

Top Ask JS

scorecommentstitle & link
14 comments[AskJS] [AskJS] Is it just me or is debugging memory leaks in Node/V8 way worse than it used to be?
04 comments[AskJS] [AskJS] A quick breakdown of JS error types that every developer should know
08 comments[AskJS] [AskJS] Anyone else found Math.random() flagged in a security audit? How did you handle the remediation?

 

Top Showoffs

scorecomment
2/u/notScaredNotALoser said Built FieldShield — a React library that keeps sensitive form inputs out of the DOM using Web Worker isolation. input.value always contains xxxxxxxxx. Session recorders, browser extensions, and AI sc...
2/u/Ok-Row-4910 said depopsy - tells you which package is causing your duplicate dependencies, not just that you have them npm dedupe shows you the what. depopsy shows you the why. Ran it on the next.js repo, 51...
1/u/Successful_Bowl2564 said I made Voiden. Voiden is an offline-first, git-native API tool built on Markdown Voiden is an API client we have been building that takes a different approach from most existing tools. Take a lo...

 

Top Comments

scorecomment
40/u/iZuteZz said ok... why?
27/u/azangru said I find their insistence that we look at Claude-produced demos baffling.
22/u/A1oso said No because you shouldn't write cryptographic code unless you're an expert. Everyone tells you this. And using Math.random() for credentials is extremely careless – the [documentation]...
19/u/ClideLennon said Did you really just tell the JavaScript subreddit that JavaScript is different than Java?
17/u/No_Neighborhood_1975 said OpenAPI generated types or if you want to totally hate your life, use graphQL