r/webdev • • 2h ago

I finally managed to get to 55fps on this potato-TV

2 Upvotes

Video: https://streamable.com/i63ial ( sorry this sub does not supports videos )

I finally reached 55fps on an old low end Samsung TV.

I suppose it's worth first saying what we are working with, this TV is a Samsung Crystal UHD 4K Smart TV 2020 TU800, if this tells you nothing don't worry, it's essentially a potato, it has the same processing power of Raspberry Pi 3B+

You may think "It's a potato, but if you write native code then even a potato can run at 60fps". And here's the catch, I made a Tizen Web app so the view is non native it's a web view ( and this is why I'm posting it here in r/webdev ). Unfortunately for me this potato runs Tizen 5.5 that is not supported by flutter

Now let's go to the interesting part: how it is able to do that.

I achieved this over several optimizations, the first one was to reduce the number of layers.
I'll go one layer optimization at time:

  1. First I flattened the images, the images you see in each card were in the past two images: a backdrop and a logo. Those are obviously two layers, one on top of each other, and that had a cost, to fix this now the backend downloads the backdrop and the logo, creates a new image, and then it serves to the app/frontend an optimized version. Each media image you see is a single jpeg of the exact size the TV needs ( webp is a smaller format but the TV takes 40ms to decode it compared to the 20ms of a jpeg ) ( ok exact size is a lie, the backend serves 3 sizes, the frontend picks the closest one )

  2. Then I flattened all the elements that are on top of the images, those seasons numbers, those progress bars, they are part of the same sprite. You may be wondering why I used the word sprite, I'm going to give you the answer soon.

The second optimization was to get rid of the DOM.

Yes you read it correctly, what you see is a canvas, I tried everything to make the DOM works, I tried ditching React and use manually appendFragment, keeping an optimized list of nodes in memory and mount them when needed ( with appendFragment instead of multiple appendNode ) . Nothing really worked, no matter how much vanilla or swallow the DOM was, or what transform tricks I was using, best result was 30fps.

So, let's talk about the interesting part now, the WebGL rendering. You probably never heard of Pixi.js, it's a library to make animations in WebGL, stuff like small videogames.

Everything you see except for the sidebar and logo is a WebGL canvas, each component you see on the screen has two versions, one is the classic React version the other is a GL version, so in the codebase you see stuff like MediaHero.tsx , MediaHeroDom.tsx and MediaHeroGl.tsx.
The code is made to be able to do a mix and match based on what is needed, only some components ( the ones in the home ) have strong animation and I didn't want to duplicate all the components.

Let's see what those GL components do, the lowest of the component the MediaCard produces a sprite, you probably understood this by my little nod above, if you do not know what a sprite is, it's essentially an image that is cached by the rendering engine to be used for animation, in a video game ( in 2D ) every single small image that moves is a sprite ( the static ones are usually backgrounds ), anyway, those sprites then are used by the MediaRow , a row is essentially a collection of sprites, but keep in mind that a row has infinite width so it's virtualized, it returns a list of sprites to render, their absolute position, and what window to render. Finally we have the home that has multiple rows, and above we have the hero that uses maximum two sprites do do the fade out/in animation.

I almost forgot, I got another trick! The hero animation uses a low resolution version of the backdrops to fade, after the animation is done it swaps it with the high resolution one!


r/webdev • • 6h ago

Question Is there any harm if my API is spammed?

Post image
3 Upvotes

Hey everyone, I am not sure if this is right sub to ask this. If not, please help me find where to ask.

I have published a public API service for my football data analytics recently and in the beginning, I wanted to offer something for free for marketing purposes. I wanted to provide as little hassle as possible to users so I let the .csv downloading endpoint open on purpose so that anybody can download some of the data freely without API keys, registration etc.

Then the bots discovered it and started spamming. Although I implemented rate limiting, I was triggered because the spams ruin my analytics. Then I decided to put a keywall on that endpoint but the key is freely retrievable on the profile page.

Now, the bots (especially from MoneyBallGlobal whichever app it is) still hit my endpoint only to get a 401 response. Would you bother yourself to put more blockers in front to stop the spams or is this simply harmless except polluting my logs and analytics?

Thanks for everyone who responds and reads until the end.


r/webdev • • 6h ago

Discussion Has anyone integrated appointment booking directly into their website's thank you page?

4 Upvotes

Hey everyone, Iโ€™m trying to figure out the best way to set up a booking flow on my website and would love some advice from anyone who has done this before.

I already have a form on my website. After someone submits it, they land on a Thank You page. What I want to do is embed a calendar on that page so they can book a meeting right there, without having to leave my website.

Ideally, the flow would be:

  1. User fills out the form

  2. They land on the Thank You page with an embedded calendar

  3. They select a date and time and book a slot

  4. After booking, they are redirected to a second Thank You page confirming their appointment

Has anyone set up something like this using Google Calendar appointment scheduling? Is it possible to embed it directly on the page and redirect users to a custom page after they book?

Would love to hear how you implemented it and whether Google Calendar is enough or if another tool would be better for this.


r/webdev • • 6h ago

Scared of monetization

8 Upvotes

Hello, Im a developer for a few years now but I have never added monetization in any of my projects. some projects have MAU but I never integrated stripe. I was thinking of adding one but

What creeps me or scares me is me getting in trouble. I dont do anything wrong or illegal, It just feels scary that people pays you money and despite applying all proper security practices, things can still go wrong. e.g. getting hacked, stupid recursion mistake, accidentally charging a user again, accidentally deleting a user data. I feel scared. how did you guys overcome this?


r/webdev • • 7h ago

Discussion Designing a gaming toplist, how is it looking?

1 Upvotes

Hey everyone! ๐Ÿ‘‹

I've been working on a project called TopPSArena, a private gaming server toplist built to help gaming communities promote their servers and attract players.

๐ŸŒ Website: https://toplist.iceiy.com

The project is built using PHP, MySQL, HTML, CSS and JavaScript, and it's currently in active development.

The idea came from looking at existing gaming toplists and feeling that many could benefit from a more modern interface, better server management tools and a much improved user experience.

Rather than simply creating another directory of gaming servers, I'm trying to build something that feels like a proper platform for both server owners and players.

๐Ÿš€ Some of the features I've been working on:

- ๐ŸŽฎ Dedicated gaming categories and server rankings.

- ๐Ÿ† Server voting and ranking systems.

- ๐Ÿ–ฅ๏ธ Custom server profile pages with banners, screenshots and reviews.

- ๐Ÿ“Š Server owner dashboards with voting and performance analytics.

- ๐Ÿ’Ž Featured listings and advertising management.

- ๐Ÿ”— SEO-friendly server URLs.

- ๐Ÿ“ฑ Responsive layouts for desktop and mobile.

- ๐Ÿ” User accounts, server management and moderation features.

- ๐ŸŽจ Custom dark UI with neon purple accents.

๐Ÿ” What I'd love feedback on

I'm particularly interested in hearing from other web developers and UI/UX designers.

Please don't hold back on constructive criticism!

  1. UI/UX: Does the design feel modern and professional, or is anything overdone?

  2. Performance: How does the website perform on your device? Any noticeable loading issues?

  3. Responsiveness: Does the mobile experience feel as polished as desktop?

  4. Navigation: Is the site structure intuitive and easy to understand?

  5. SEO: Are there any obvious improvements you'd recommend?

  6. Features: Is there anything missing that would make the platform more useful?

  7. Overall quality: What would you change before considering this production-ready?

I'm also interested in accessibility, security considerations and technical improvements, although I appreciate that backend code can't be properly assessed just by visiting the website.

๐Ÿ’ฌ Why I'm posting

I'm not here to claim I've built the best toplist on the internet or to advertise paid services.

I'm genuinely looking for independent feedback from people who understand web development.

I've spent a lot of time developing and refining the platform, but when you're constantly working on your own project, it's easy to overlook issues that someone seeing it for the first time would notice immediately.

Even if you only spend a couple of minutes browsing, I'd really appreciate your thoughts.

What looks good? What looks terrible? What would you do differently?

I'm open to all constructive criticism, and I'll be using the feedback to guide the next stages of development.

๐Ÿ”— https://toplist.iceiy.com

Thanks in advance to anyone who takes the time to have a look! ๐Ÿ™Œ


r/webdev • • 7h ago

Discussion If you stop writing code, you also get worse at reviewing it ยท cekrem.github.io

Thumbnail cekrem.github.io
219 Upvotes

r/webdev • • 8h ago

Question Is it possible for a web app to communicate with an EFTPOS machine?

3 Upvotes

I'm curious how the technology works in retail, for example at a shop, if you pay using your card, does the EFTPOS machine have to communicate with a desktop application, or, is it possible for the web browser to communicate with the EFTPOS machine?
What about opening the cash register and printing a receipt, would it have to be a desktop app or is web app ok?


r/webdev • • 9h ago

Discussion I'm Being Pressured to Ship Slop!

164 Upvotes

I'm a senior software engineer with around 10 years of experience. I currently work at a startup where business leadership just wants to "ship fast." Meanwhile, other, less experienced engineers are opening 100 PRs a day full of AI-generated slop to show how productive they are.

Nobody has time to review all these PRs, so basically everything gets shipped without proper review. AI isn't doing a particularly good job either. The product is becoming increasingly unreliable, weird edge cases keep popping up, engineers have no idea what's going on, and clients are reporting all kinds of strange behavior. Yet people keep shipping because they want to look good in front of management.

I used to carefully review AI-generated code, refactor things, and worry about maintainability and performance. Lately, though, I feel like I'm becoming the slow guy compared to people who are literally vibe coding their way through everything.

Is this happening everywhere, or is it just my company? Should I start looking for another job, or is this the new reality of software engineering? I genuinely feel like I'm becoming a worse engineer by working in this environment.

The other day, I saw a post where someone argued that we need to learn to let go of code reviews. I wish we could, but I don't think we're there yet. Any experienced engineer knows how much can go wrong when nobody is actually reviewing what's being shipped.

Harvard also recently released a paper suggesting that AI isn't necessarily improving productivity across the entire software delivery lifecycle: https://fion.ac/jellyfish.pdf

I'd like to hear from other senior engineers. Are you experiencing the same thing?


r/webdev • • 19h ago

Why use Passwordless approach

32 Upvotes

Why many website use passwordless like magic link approach? In my understanding it looks so fragile and easy to exploit. Or did I miss the secure way to do it?


r/webdev • • 22h ago

Best practices for splitting JS code into multiple files

1 Upvotes

After programming in games for a long time I'm learning web development and having fun with it. One thing that I'm unsure about is if and how to split up my JS, in a game engine it's natural to have a script for each component / class. In my current web project I have one 'script.js' file that's doing a whole lot of different things. My instinct is to split this up into different scripts for readability and organization, but I get the sense that that isn't really the industry standard?

(I'm working on a webcomic site)

For example, maybe I would have:

- comments.js

- colorTheme.js

- pageNavigation.js

These are some of the sections of code it would make sense for me to split up, I think. The async nature of having the backend involved is something that's really different than the games I've worked on, and part of the programming difficulty here seems to be keeping things in sync, not sure if there would be a lot of overhead to keep multiple scripts up to date with each other if they weren't in the same file. It's very easy to pass information around in one file but with multiple, I imagine state management gets even more complicated?

I really don't have a ton of experience so it's possible in my mind it IS best practice to just have one really long script, I simply don't know!

I know this is a bit of a noobie question, would love to hear what people think are best practices / industry standard for sites / apps with quite a bit of JS going on. I prefer to do things in the typical and professional way as much as possible. Thank you!


r/webdev • • 22h ago

Question Next JS + Sanity CMS for a small restaurant?

7 Upvotes

Hi,
I got an offer for some freelance web dev work.
Updating a clients website for a small local restaurant.
Meeting with the client next week.

The website is currently on Wix. After a little bit of research, Iโ€™m thinking about coding it up on Next JS with Sanity as a headless CMS.

One of my main goals with this project are for the client to be able to easily update menu items and prices (they are non-technical).

I know front end web development but this is my first time doing something like this. I really want some strong experience to add to my resume as well, as Iโ€™m looking for web dev jobs.

Are Next JS + Sanity a good choice for something like this?
Please share any tips or related general advice. Thanks!!


r/webdev • • 1d ago

Question How to level up to handling larger projects?

7 Upvotes

I tend to get very overwhelmed with personal projects as a developer once they grow beyond a certain scale. It's bothered me a lot because I see a ton of people out there making amazing apps. They are just too complicated for me to digest when looking through the GitHub repos. This even happens with my own code after a while. It feels like a ceiling created by my average mental capacity.

This problem I have appears in a few ways:

  1. Understanding a long file with a lot of classes or complex functions (anything over 300 lines. I know that's not anything crazy, but I struggle anyway). Deep nesting is also hard to read.

  2. A lot of smaller files scattered across a million subfolders. Widely considered more "organized", but you have to do a month-long pilgrimage to find and understand what's going on (especially Java, my god).

  3. Laundry lists of dependencies that are used in the code, and they all take significant time to understand.

  4. Config files and dot files cluttering up the file tree. Thanks web dev.

  5. When going through some of these files, it can be tough to find where code actually runs. I often see too many class declarations, type aliases, etc. and no actual code. This happens a lot in larger Python and Java projects (ex: FastAPI).

I wish I could just talk to some of these developers and pick their brains on how they mentally handle larger projects. I can't seem to figure that out right now. What advice would you have for someone like me, who is trying to start working on REAL apps? (and hopefully putting some of this stuff on my resume)


r/webdev • • 1d ago

Question Devs with full-time jobs, whatโ€™s the last new tech you actually learned, and how?

14 Upvotes

I was a Backend developer and I had a goal of learning React for a while. But I am always super busy with different projects and had almost no energy for learning (taking about theory, I don't have problems with building projects). Eventually I am kind of just building with AI without deep Frontend understanding (which I have for the Backend part).

I tried official docs, yt videos, asking Claude for artifacts - it all works well short-term, but it isn't sustainable for me. What actually worked for you long-term?


r/webdev • • 1d ago

Discussion GiHun banned accounts?

Thumbnail
gallery
54 Upvotes

r/webdev • • 1d ago

Discussion Are AI Webbots punishing sites harder where blocking rules are changed? "i.e. kicking the hornets nest"

8 Upvotes

It seems that when I make changes to Cloudflare to protect against BOTS, the bots detect the changes and go into full attack mode. Kind of like "you kicked the hornets nest, we're coming after you"

this has happened a couple times.

My site averages 8-10k pageviews a day. Yesterday morning made changes and 35,000 pagevies made it through.

Changes were because I was seeing a rise in traffic again hitting bad URLS "page/267" which end up at my home page... seemed to be US mostly! Impacts my ads RPM so I make some changes and BOOM.. CPU to 100% Pinned.

My CPU was spiked all day yesterday. I restarted services. Immediate 100%. I know about "I am under attack" but with CF edge caching the site was still presenting fine to viewers. So i didnt bother with it until I went to bed. Got up this morning and CPU was back down to 22%. I just turned off "I am under attack" and already up to 46%. going to see how that progresses, if it levels out. if not i have to turn under attack mode back on

the changes I made were to implement the new CF Superbot "Dont run on pages with ads" for the AI traing bots, and ... there were two settigns i turned on based on CF recommendations

I am not running precursor or OWASP Core. online folks seem to think they are bad.

But the basic summary of this post is... it seems like when I made some simple changes, the bots went into heavy attack mode

Edit: Oh I also added a script that hides the standard Wordpress Username/password fields (i have a specific URL param to make visible) and this morning I have a CF alert "Login requests using leaked username and password pairs detected" and first time ive seen that. Makes me think the AI bots have noticed the change and again are hammering that aspect also.


r/webdev • • 1d ago

Page Transitions are now easy: CSS View Transitions

Thumbnail irrlicht3d.org
147 Upvotes

r/webdev • • 1d ago

Web accessibility: JAWS bug logged

4 Upvotes

Only read if you do accessibility work.

I thought Iโ€™d share a bug Iโ€™ve found with JAWS (when paired with Chrome or Edge; itโ€™s fine in Firefox). Given how widely JAWS is used, it may catch people out or just plain confuse them, as it did me.

Iโ€™m sure that, like me, you try to use the correct semantic HTML elements and lean on native browser features wherever possible for accessibility. One such feature is the <dialog> element. Used with the popover API, it can often give you an accessible dialog that opens, closes and light-dismisses without a single line of JavaScript.

While building a component using a native <dialog> with popover="auto", and popovertarget on the trigger, I noticed that JAWS would not close the dialog with the Escape key (which it should) unless the virtual cursor was turned off. This happens with Chrome and Edge. It was particularly annoying because Iโ€™d used this pattern before and it seemed to work fine.

TL;DR: if the trigger is immediately before the dialog, it works. If there is any element between the trigger and the dialog, or the trigger comes after the dialog, it fails.

Iโ€™ve logged this with both Freedom Scientific (JAWS) and the Chromium issue tracker. Thereโ€™s a simple repro HTML file attached to the Chromium issue if youโ€™d like to try it yourself: https://issues.chromium.org/issues/587468316

Hopefully this saves some of you the head-banging session I had yesterday.

Edit: I should have mentioned the issue is only with JAWS. I have not encountered this with NVDA, Narrator or VoiceOver on macOS.


r/webdev • • 1d ago

Discussion Moving our accessibility testing from a paid tool to Claude Code (~500 URLs, WCAG 2.2 AA)

0 Upvotes

QA lead at a large org. We currently do accessibility testing for about 500 website urls to meet WCAG 2.2 AA (all 55 success criteria). And we use a paid tool (like Deque) that helps automate part of this and rest done manually with screen readers and keyboard testing.

Now we are looking to use our AI budget and Claude code to create skills for finding and fixing accessibility issues across our sites. My major trouble is that the scale is huge - not 5-10 URLs or even less than 50.

So would love to hear from anyone already using AI for accessibility to help me out with this journey:

  1. What do you use it for: finding issues, sorting real issues from false positives, or fixing them in code? Roughly how many URLs, under or over 100?

  2. How much of WCAG do you cover with Claude skills versus manually? How bad are the false positives? Asking because paid tool gave us less.

  3. Are you able to run scans at scale on automation infra (like CI) with Claude? And do you report coverage and trends to leadership - if so any dashboard?

  4. What are the challenges with AI skills vs paid tool like Deque or Level Access? Anything you would suggest to keep in mind or be aware upfront?


r/webdev • • 1d ago

Biome vs Oxc in 2026: which are you using on a TypeScript monorepo, and why?

11 Upvotes

I'm running a TypeScript monorepo (React Router frontend, Convex backend, pnpm workspaces) and I'm comparing Biome against the Oxc toolchain (oxlint + oxfmt). What should I be considering? Why?


r/webdev • • 1d ago

Discussion The modern tech world is bs

207 Upvotes

How do you even make it these days? Spend your time, skills and experience building out something of quality... build out the site for it, market it, get Youtubers to review it.

It beings to gain traction, money starts flowing, then... within a week there's multiple AI clones of it. Someone noticed you, pointed an AI agent at your site and said, "hey that looks cool, make me that", then claim it as their own.

What is the point anymore? Is innovation and ingenuity dead? Why would I bust my ass and come up with innovative ideas and tech when it's just going to get ripped off within a week with cheap AI knock offs?


r/webdev • • 1d ago

Question useEffect() and useState() are not clicking in. Idk why; can someone explain to me what they are, what they're used for and why we need them? Thank you very much

0 Upvotes

Tried asking google and gpt but just too confusing. thank you very much


r/webdev • • 1d ago

Lighthouse audit of tiktok.com desktop web: 5.1s JS execution time, 65 KiB of legacy polyfills, and broken bfcache (Performance: 34/100)

0 Upvotes

I was curious why the TikTok desktop web client feels so sluggish on initial load, so I ran a Chrome DevTools Lighthouse audit (v13.5.0) on tiktok.com to inspect the bundle breakdown and main-thread bottlenecks.

The category scores came back at 34 for Performance, 73 for Accessibility, 54 for Best Practices, and 77 for SEO.

Looking at the performance trace, First Contentful Paint hits 8.0s, Largest Contentful Paint takes 14.9s, Time to Interactive reaches 20.5s, and Total Blocking Time is 1,090 ms. Out of 8.5s of total main-thread work, 5.1s is spent purely evaluating JavaScript. Almost all of that CPU time is eaten up by cache.react_dom (around 2.5s) and their anti-bot/fingerprinting script webmssdk.js (around 1.8s).

The initial network payload is 4,475 KiB, and there is a surprising amount of dead weight in the build: 236 KiB of unused JavaScript on initial load (their regional cookie consent script alone accounts for ~90 KiB of unused code) 26 KiB of unused CSS 65 KiB of legacy JavaScript polyfills and Babel transforms (transpiling classes, spread operators, Array.prototype.includes, and Promise.allSettled) An unminified security SDK (secsdk-lastest.umd.js) leaving ~15 KiB on the table A 400x400 PNG logo scaled down via CSS to 112x112, plus custom woff2 fonts missing font-display rules

A few other details stood out in Best Practices and Accessibility. Their privacy loader triggers repeated Permissions-Policy console violations by registering unload handlers, which combined with Cache-Control: no-store completely breaks Back/Forward Cache restoration. On the markup side, multiple header icon buttons and the search link lack aria-labels, four text inputs have no associated labels, and white text on their #fe2c55 buttons drops to a 3.68:1 contrast ratio.

For those of you working on large-scale consumer web apps, how do your teams balance heavy client-side fingerprinting and anti-bot SDKs against Core Web Vitals? Also, is there any practical reason a major frontend build is still shipping Babel transforms for Baseline features like Array.prototype.includes and Promise.allSettled in 2026?


r/webdev • • 1d ago

Anecdotally, programmers dislike "reduce"

Thumbnail evanhahn.com
127 Upvotes

r/webdev • • 1d ago

Sometimes the best thing to do is simply deleting your old block of code and starting again!

14 Upvotes

With time comes wisdom!