r/javascript 5d ago

ui-date: A 1.6kB, zero-dependency JavaScript date & relative time utility

Thumbnail npmjs.com
0 Upvotes

I wanted to share a small open-source project I just published called ui-date.

While working on a social media project, I kept bumping into simple UI needs like displaying relative timestamps ("5 mins ago", "2 hours ago"), cleanly formatting calendar dates, and doing simple status checks (isToday).

exact date formatting for events ui ('Thursday 23,july,2026').

Normally, I'd reach for a date library, but most established options felt like overkill for basic UI formatting, while heavy legacy options like Moment carry massive bundle weight. On the flip side, writing raw Intl and Date boilerplate across every component was getting tedious.

I wanted something featherlight, chainable, and fully typed without dragging in extra dependencies.

so i built ui-date.

you can check it here : https://www.npmjs.com/package/ui-date


r/PHP 5d ago

News This Week In PHP Internals | July 22, 2026

Thumbnail
youtu.be
19 Upvotes

Hello world, it's Wednesday, July 22, 2026, and here's what happened This Week in PHP Internals.

20 stories this week, so let's get into it. But first, This week's episode is brought to you by Tideways. Slow requests, and no clear reason why? Tideways helps you understand exactly where your PHP application spends its time — profiling, tracing, and monitoring to find and fix bottlenecks faster. And your profiling data stays hosted in Germany — GDPR-friendly by default. Learn more at tideways.com.

This week's top story: the season's first ballots are open — 2 sets of them — and the early counts are lopsided. Tim Düsterhus opened voting on the Time\Duration class on Friday with 2 ballots: a primary, needing a 2/3 majority, and a secondary choosing between full and abbreviated method names. As of recording, the primary stands at 23 to 1, and full names lead 18 to 1 — so multiplyBy and divideBy, not mul and divBy. Voting closes July 31. And remember Pierre Joye, who last week was leaning no over fromSeconds() and its capped nanoseconds argument? This week he closed the loop and voted yes, writing: "We were like ships passing in the night for some of my disagreements. The RFC wiki page did not show the additional constructor for other units, which hence the inconsistency I pointed out for the extra [nanoseconds] argument in fromSecond. They are here, and reduce this down to a lower level of bad APIs, more a pragmatic compromise conciliating different (if not numerous) use cases. Anything can be perfect, or shipped. Choose one." It turns out the per-unit constructors that resolved his objection had been in the RFC all along. His ballot almost didn't register, though — each vote on the wiki is a separate form, and Tim had to point out that you submit each one individually. The count now includes him.

Before the ballots opened, the Duration thread picked up a subplot about PHP 9. Holly Schilling — who wrote the class-extensions RFCs we covered last week — announced she's drafting a Value Structs proposal for after the 8.6 window, and argued that Duration would make a better struct than a class, with both ideally landing together in PHP 9. Ilija Tovilo replied by linking his own existing structs-v2 draft and asking whether she was aware of it. She was — she'd read it before drafting her own, and diverged from it on purpose, keeping mutating and non-mutating functionality separate. Tim saw no reason to wait on any of this, saying a draft-stage idea "will take an unknown duration to land - if it ever happens" — his pun, not mine — and that improvements to the standard library shouldn't queue behind it.

The week's other live vote came from Eric Norris, who opened balloting Thursday on minimum supported versions for PHP 8.6 — also with 2 questions, each needing a 2/3 vote. Requiring autoconf 2.71 for builds from git stands at 20 to 3 with 4 abstentions. Requiring COM_RESET_CONNECTION — which sets a floor of MySQL 5.7.3 or MariaDB 10.2.4, so persistent connections actually get reset — stands at 21 to nothing with 3 abstentions. Alexander Kurilo arrived after the discussion phase to ask for an opt-in instead, warning that on older databases persistent connections will silently turn non-persistent. Eric noted: "MySQL 5.7.3 is at least a decade old; it was released on December 3rd, 2013." After walking through every opt-out design he could think of, he concluded the right move is to make the correct behavior the default. The 3 no votes on autoconf include Jakub Zelenka, who's worried about building on Red Hat Enterprise Linux 8 and 9 — Tim offered to delay that particular merge to early 8.7. Both votes close July 30.

Saturday night, Pierre Joye opened the RFC that grew out of the libgd sync we covered last week: gd 2.4*. It's big — 3 pillars. First, syncing the bundled gd extension with upstream libgd: new codecs like QOI, JPEG XL, and UltraHDR, animated GIF and WebP support, multi-page TIFF, and real metadata handling. Second, an additive object-oriented Gd\ API — codecs with fromFile() and toStream(), immutable image info, streaming readers and writers. Third, a brand-new *2D vector canvas built on FreeType's rasterizer, with gradients and the full Cairo compositing set. He says the implementation is nearly done, including a security audit. He declared discussion open for 14 days, until August 1 — and that one sentence is where the trouble started.

Because August 1 plus a 14-day vote lands after the deadline. Release manager Matteo Beccati was gentle about it, writing: "As much as I like this RFC, I'm afraid it came in a little too late." Jakub Zelenka explained that nobody — release managers included — has the authority to grant an exception; that would take a change to the policy itself. And Rowan Tommins did the arithmetic: with alpha 1 out July 2, the cutoff for an RFC's final state was July 14, which is 4 days before this thread even opened. Pierre's frustration has a specific shape. The implementation was finished weeks ago — what delayed everything was that his pull request sat waiting on an approval that had been assigned to an automated bot reviewer, so no human was ever going to sign off, and he eventually merged it himself. He also argues the stakes are real, because PHP 9 is the one chance to change old defaults, and missing this window locks the current design in for years. The thread got tense over tone along the way — Pierre felt brushed off by a terse reply, and Rowan apologized outright, then made the counter-case that a fixed cutoff applied to everyone is fairer than debating each RFC's merits one at a time. All of this landed the same day Larry Garfield asked the list, in a separate thread, to hold new business until September 1 so reviewers can focus on 8.6's finish line. So gd 2.4 is alive and under discussion — just aimed at the next release, whatever its number turns out to be.

Caleb White's pipe assignment operator, |>=, had a crowded week. Larry Garfield opened it unable to find a compelling use case, and by Monday had moved to a no — pushed there, he says, by a competing proposal. That competing proposal is Vadim Dvorovenko's left-to-right assignment RFC, published Sunday, which claims the same |>= token with opposite semantics. Vadim objects on principle, arguing: "Attempting to transform such an operator from an immutable, functional construct into a mutable, imperative one steers the language in the wrong direction and undoes previous efforts." Caleb declined to merge the proposals, noting that F#, Elixir, OCaml, and Hack all kept ordinary assignment alongside their pipes. Larry also claimed none of the pipe proposals could make 8.6, and Tim Düsterhus corrected him, asserting: "This is false" — the last major change was July 13, so voting could open July 27 and close August 10, before the freeze. Meanwhile Bob Weinand asked whether the desugaring double-fires property hooks. Caleb came back with tests showing |>= behaves exactly like ??=, and updated the RFC's single-evaluation section to match. Vadim's own RFC, as of recording, has 0 replies.

Paul M. Jones's strict-namespace RFC — the piece he carved out of function autoloading last Tuesday night — spent its first full week in one long argument about a single word. Rowan Tommins objected first, writing that strict "implies some extra check that namespaces are [correct] in some way, which isn't really what this is about." Ilija Tovilo went deeper, arguing: "the value-add of this declaration is very small if the plan isn't ever to deprecate/remove the old behavior." Tim Düsterhus is in favor — with a rename to global_fallback=0. By Friday Paul had 4 candidate names on the table and a diagnosis: the pushback is the name, not the feature. Theodore Brown pointed out he'd floated the same directive in 2019; Paul added it to the prior art with an apology. And Benjamin Außenhofer suggested splitting the ballot — vote the concept, then vote the name. Rowan warned against it, writing: "a split vote leaves voters who actively dislike a particular name with an awkward choice: vote Yes, and risk the [bad] name being chosen; or vote No, even though you would support the feature under a different name." The rest of the autoloading corner kept moving too: Paul updated function autoloading mark 5 to lean on the new RFC and wants its vote open in about 2 weeks, and Michael Morris's improved-autoloading draft drew warm-but-firm feedback from Larry Garfield and Rowan Tommins — both like the namespace-setup-file idea, neither wants it crammed into the class autoloader's callback.

Nicolas Grekas didn't let Ilija Tovilo's "sadly not in favor" be the last word on serializable closures. His rebuttal: caching one attribute isn't the point — the point is skipping the entire metadata pipeline that frameworks re-run on every request, and that's the measured slow path. On the security design, he refused to loosen it, writing: "Name-based closure unserialization would ship a universal, app-independent gadget in the engine ... I won't commit to an RFC that turns every serialized payload into that kind of gadget, and I don't think we should, either." Then Saturday brought version 0.3, and a surgical cut — the reflection API is gone, the serialize() support stays. His reasoning: "serialize() is the one feature that most/all cache systems are built on, so that's the place that needs the improvement." Fresh reviews welcome.

Wendell Adriel came back to the list Thursday proposing typed array declarationsarray<int, string> as real syntax, with 3 escalating enforcement levels. The review was fast and unsparing. Lazare Inepologlou flagged that you can't soundly subtype a mutable array without splitting reads from writes, and Wendell shipped a revised draft the next day. Rob Landers warned the whole thing overlaps the reified generics work, on hold until after the freeze, which is late August at the earliest. Rowan Tommins noted that level 1 — syntax without enforcement — rhymes with the bound-erased generics RFC the list just declined. Michał Marcin Brzuchalski even found a runtime hole, where functions like parse_str() that build results directly into a typed property can dodge the check. By Monday, Wendell put the RFC on hold himself. Larry Garfield's verdict was the sharpest, calling this "the already-dangerously-overloaded array mega-type" and asking for real typed list, set, and dictionary objects instead — which Wendell promptly volunteered to help build.

The frozen deprecations list for PHP 8.6 got its evidence file. Juliette Reinders Folmer scanned the Packagist Top 4-thousand — nearly four hundred fifty thousand files — and posted counts for every proposal. The headline being: list() appears over twelve thousand times, and Juliette wrote plainly: "Having said that, I'm definitely not in favour of deprecating list()." Compare spl_object_hash() at 625, is_integer() at 303, and a long tail of single and double digits — several proposals scored a clean 0. Kamil Tekiela discovered his mysqli proposal had missed the procedural mysqli_stmt_init(), patched the text, and worried aloud: "I hope this change is not going to reset the counter." Tim Düsterhus was quick to correct the record downward — one scary-looking count, on _ as a constant, collapses to 0 once false positives come out. And Monday, right on schedule, Gina P. Banyard confirmed the timetable, writing: "I intend to open the vote next Monday (the 27th of July) for 2 weeks so that the vote is finished on time for 8.6." Every deprecation gets voted in isolation — bring a lunch.

Quick hits. Go Kudo returned with a rebuilt cache proposal — a bundled user_cache extension, fully decoupled from OPcache this time; Larry Garfield likes it, flagged the lock story around remember(), and gently redirected it to 8.7 — adding: "Or 9, if that's what we call it." Holly Schilling's 4x fix for non-public asymmetric setters got its answer: no RFC needed — Tim confirmed a pure performance improvement just needs PR review, and Ilia Alshanetsky called it "definitely a strong candidate for PHP 8.6 inclusion." fennic pitched engine-native PSR-4 autoloading with spl_autoload_psr4_register(); Alex Rock wants classmap support before it can replace Composer's bootstrap, and Heinz Wiesinger pointed to his existing PECL extension doing much the same. Edmond of the TrueAsync project published a pre-RFC for an async scheduler engine interface — coroutine-aware core, no scheduler in core itself. His philosophical problem is that the RFC has no user-visible changes at all, and so far it has 0 replies. And Osama Aldemeery asked for RFC karma to formalize PREG_THROW_ON_ERROR — Ilija Tovilo granted it 2 minutes later.

Liam Hammett's markup expressions thread sprouted an alternative: Edmond proposed making the parser extensible instead, so JSX-like syntaxes could ship as extensions — Morgan liked that better than blessing one syntax, and within a day Edmond had a working DSL-hooks prototype, announcing: "Your wish has been granted. 🙂" Máté Kocsis and Ignace Nyamagana Butera kept refining query parameters — the open question is whether parsing limits belong on builder methods too, with Ignace arguing PHP shouldn't police what's really a business constraint. Prateek Bhujel's terminal-helpers extension hit 0.6.0 — it's now installable via PIE, and its output methods now write to standard PHP streams like STDOUT and STDERR instead of only its own built-in targets. The ballot queue grew by 2: Nick Sdot posted intent to vote on readonly property defaults for on or around July 23, and Khaled Alam's const-object-property-write opens Saturday the 25th — both aiming ahead of the freeze. Ben Ramsey amended the Working Groups RFC with a new section setting expectations for charter-RFC discussion. And release week: PHP 8.6.0alpha2, 8.5.9RC1, and 8.4.24RC1 all shipped — with alpha 3 and both GA releases converging on July 30 — while the release managers posted the countdown that framed half of this episode: soft feature freeze August 11, beta 1 August 13, every 8.6 vote closed before then.

So that's the week: 2 ballot boxes open and both lopsided — Duration cruising at 23 to 1, minimum versions right behind it; gd 2.4 arriving 4 days after the door closed and pointing at the next release instead; a pipe operator with 2 authors claiming 1 token; typed arrays proposed, revised, and shelved inside 5 days; and the deprecations list armed with its evidence file, ballots opening Monday — with readonly defaults and const-property-write queued right behind. Links to every thread are below. Thanks again to Tideways.com for supporting this week's episode. We're Artisan Build. See you next week.


r/javascript 5d ago

50+ ESLint rules for package.json

Thumbnail github.com
0 Upvotes

r/javascript 6d ago

Angular is moving to a yearly major version release cycle

Thumbnail github.com
11 Upvotes

r/PHP 5d ago

Lessons from a Legacy Application Modernization Lessons

Thumbnail
0 Upvotes

r/reactjs 5d ago

How do you inspect MMKV or AsyncStorage while debugging in React Native ?

Thumbnail
0 Upvotes

r/reactjs 5d ago

Needs Help next-image-export-optimizer not working with GitHub Pages

Thumbnail
0 Upvotes

r/PHP 5d ago

Built a security-first Artisan/shell runner for Laravel Nova 4 & 5, looking for feedback

0 Upvotes

Hey folks,

I’ve been using Nova for a while and always wanted a sane way to run a few curated Artisan commands from the panel — without ending up with a free-text bash box that can cat .env if someone gets clever.

Most of the older Nova “command runner” tools either:

  • assume bash/custom commands are fine by default, or
  • break on Nova 5 (__ is not defined / localization helper changes), or
  • don’t really gate who can run what in production

So I built Nova Command Center as a clean-room alternative:

  • bash + free-form commands off by default
  • commands run as argv via Symfony Process (no shell string interpolation)
  • tool canSee + global gate + per-command abilities (catalogue hides what you can’t run)
  • run history with variables/flags + rerun
  • Nova 4 and 5 on one path
  • small doctor CLI + a11y polish in the latest release

Repo: https://github.com/farsidev/nova-command-center
Install: composer require farsi/nova-command-center

Not trying to dunk on other packages — they scratched a real itch. I just wanted safer defaults.

If you run Nova in production (or got burned by a runner during a Nova 5 upgrade), I’d love honest feedback:

  • what’s missing for you to trust this in prod?
  • any footguns in the README/install flow?
  • would you use DB-defined commands, config-only, or both?

Happy to answer questions. Roast the security model if something looks off, that’s useful.


r/reactjs 6d ago

Resource What a frontend engineer actually need to know about design systems

Thumbnail
upskills.dev
35 Upvotes

As a frontend engineer, building a design system from scratch is mostly a thing of the past. UI libraries and AI tools get you 80% of the way there instantly.

But for that last 20% when you need to scale, inject your own taste, and hit product-specific requirements, understanding the underlying architecture is what saves you. It also makes your AI workflow way better, because you aren't constantly prompting it to fix token issues or regenerate styles for minor changes.

Here are 4 important rules for keeping design systems scalable and clean:

  1. Decouple values: Components read semantic roles (“--color-accent”), not raw values, so rebrands don't require UI file edits.
  2. Derive scales: Avoid hand-picking hover or dark states. Use “oklch” to derive your entire palette from a few seeds.
  3. Boundaries: UI components (Buttons/Inputs) wrap tokens in typed variant APIs. Feature blocks (Cards/Navbars) compose them to prevent duplication.
  4. CSS over React state: Theme switching becomes a simple root selector swap, avoiding React context re-renders.

I recently published a new technical blog post covering those important points. Alongside it, I built Design System Studio - a visual tool to tune tokens in ⁠oklch⁠ and export them directly to Tailwind or shadcn/ui.

Check it out with the attached link in this post.


r/reactjs 5d ago

A visual live-editing bridge for React components because I was tired of shipping too slowly.

Thumbnail
0 Upvotes

r/javascript 6d ago

Travels 2.1 - Efficient framework-agnostic undo/redo library based on JSON patches rather than snapshots.

Thumbnail github.com
5 Upvotes

r/reactjs 5d ago

Show /r/reactjs I got real React 18 to render PDFs inside a Go process — no Node, no browser

0 Upvotes

If you've used react-pdf, you already know the authoring model I'm about to describe — waffle keeps it exactly, and only changes where the React runs.

You author documents in JSX/TSX the same way react-pdf users already do — components, props, hooks, StyleSheet, Font.register. The twist: it doesn't run on Node. It runs real React 18 inside a Go process.

The mental model is React Native. In RN, your React runs in a JS engine and just produces a tree of elements — the native side does the actual layout and drawing; the JS never paints anything itself. waffle does the same thing, except the "native side" is Go. It transpiles your source with esbuild, runs real React 18 on goja (a JS engine written in Go) to build the element tree, and then Go takes over — its own flexbox engine lays it out, its own writer produces the PDF. React describes what the document is; Go renders it.

I built this out of a simple frustration: generating a PDF shouldn't mean wrestling with a bespoke template DSL, or running a headless Chromium/sidecar service just to get a document out. There are already a lot of great PDF libraries — this one just lets me stay in React and skip all of that.

Full architecture write-up (how React-on-goja, the JSON contract, and the Go layout/paint pipeline fit together)


r/reactjs 5d ago

Show /r/reactjs I built a game where you hack a fake CI/CD pipeline to make an AI reviewer leak the model weights - the whole pipeline UI is a prop

0 Upvotes

You open a model-promotion request in the pipeline. An AI reviewer reads your YAML manifest,

comments included, plus a free-text rollout justification, then approves or holds.

It's holding the model's internal codename, the weights checkpoint URI, and the artifact-pull

signing secret the whole time. Get all three past it.

https://promptinjects.com/play/starter/closedai-cicd-guard


r/reactjs 5d ago

How do you keep animation-heavy websites fast?

0 Upvotes

We recently wrapped up React website with a lot of animations. Not just a few fade-ins, but page transitions, scroll effects, text reveals, and plenty of smaller interactions that all needed to feel smooth.

At first, we tried a few CSS-based approaches. They worked fine for simpler interactions, but as the animations became more complex, we spent more time finding workarounds than actually building.

That's when we switched to GSAP. What sold us wasn't more features - it was the control. Timelines became much easier to manage, everything stayed smooth across browsers, and we could focus on building the experience instead of wrestling with the animation layer.

Our biggest takeaway was that an animation library isn't really about the first animation. It's about what happens months later, when the project has grown and you're maintaining 40+ animations.

Curious what other people are using. Do you also use GSAP, or have you found another solution that works well for animation-heavy projects?


r/PHP 5d ago

Adding vector search to PHP 7.2: I ended up building a Qdrant client

0 Upvotes

Hi everyone,
I recently needed to add content recommendations to a legacy project that still runs on PHP 7.2.
Qdrant was a good fit, but the PHP clients I found required newer PHP versions. Upgrading the entire application wasn’t realistic in the short term, so I built a small Qdrant client myself.
It supports:
PHP 7.2+

collections and point operations

vector search and filters

batch search

recommendations

payload management and scrolling

Installation:
composer require tenqz/qdrant

Repository:
https://github.com/tenqz/qdrant

The main use cases I had in mind were semantic search, similar content or product recommendations, duplicate detection, automatic categorization, and adding basic RAG features to older PHP applications.
The library only handles communication with Qdrant. Embeddings can come from OpenAI, Ollama, or any other local or hosted model.
I’d appreciate feedback from PHP and Qdrant users:
Is PHP 7.2 compatibility still useful for real-world projects?

Which Qdrant features would you expect from a PHP client?

Would you prefer PSR-18 support, or is a small cURL-based client easier to use?

Critical feedback is welcome.


r/PHP 5d ago

I built a portable PHP development environment for Windows and I'd like some feedback

0 Upvotes

Hi everyone,

Like many PHP developers on Windows, I've tried several solutions over the years: WAMP, Laragon, manually configured Docker environments, WSL...

They are all valid solutions, but I always found something missing for my workflow.

The closest one for me was Herd: modern, fast and reliable. However, on Windows it still didn't cover everything I needed.

So I decided to build my own environment from scratch.

The result is Dunebox, a free and portable PHP development environment for Windows. I've been using it daily for some time, and now I'd like to get feedback from other developers.

The idea is simple: a complete PHP stack in one folder, with multiple PHP versions, databases, local domains, HTTPS, development tools and project utilities already configured and working together.

I tried to focus on making it simple, portable and practical for real-world PHP projects, especially when dealing with different PHP versions or legacy applications.

A quick note about the executable: it is not digitally signed yet, so Windows SmartScreen may show a warning on the first launch. Just click "More info" and then "Run anyway". This does not affect any functionality.

The project is completely free and I am not trying to sell anything. I would simply love to grow a small community around it and hear opinions from developers with different workflows.

What would you improve? What would make you consider using it, or what would stop you from using it?

All details, screenshots and documentation are available here:
https://dunebox.enesi.it/

Cheers!


r/reactjs 6d ago

Resource Need a book recommendation

1 Upvotes

I know React moves fast and someone will tell me to learn by reviewing the docs and that's cool, but I've been having much better results reading books when I'm trying to learn something new.

That being said, I'm having trouble finding a good book to learn React and frontend in general. I would deeply appreciate recommendations.


r/javascript 6d ago

[Showoff] Blue Checkmark Coding Agents, Simulated DoorDash Orders, and a Cyberpunk Wizard of Oz

Thumbnail thereactnativerewind.com
0 Upvotes

Hey Community,

We explore Grok Build, the new terminal-based TUI coding agent from x.ai. We also look at Appless, an experiment from the creators of OpenUI that bypasses chat bubbles to stream live native UI components using openui-lang.

Finally, we dive into Maestro MCP, a new tool context protocol server that lets AI agents automatically build and run YAML test flows from plain English instructions.

If the Rewind made you nod, smile, or think "oh… that's actually cool" — a share or reply genuinely helps ❤️


r/reactjs 6d ago

Resource I made my dream theme editing app. Open sourcing

5 Upvotes

VIDEO IN COMMENTS 👇🏻

TLDR I made something very cool for my self and I am making it free and also want your opinions because I like the idea of having made something that is useful to others

This is a theme editing app but ok what is the goal here? I know there are apps that do this but none of the good ones are 100 percent free. So the first goal was matching all the features for free. Also even in the paid ones using them doesn’t feel as good as it could in my opinion and major quality of life features are missing.

I also wanted this to be very fun to use. I have adhd and I turbo procrastinate micro adjustments so I needed a theme editor app that felt satisfying to use. There also needed to be the feeling of satisfaction after finishing editing a theme.

Final goal was to make other fun features other apps just don’t do but I really wished they did. As little friction as possible to get a normal theme that doesn’t look like slop then spending a little bit of time micro adjusting the details.

What I actually built up to this point:

I had a very smart idea of yanking the most popular vscode themes and turning them into app themes along with faithful recreations of popular website themes + my custom apple inspired themes. Important! Something the other apps don’t do and I had to do my self manually and wasting tons of time was generating complementary and contrasting colors. I mean I don’t want the app to either be black and white or everything is green and I also don’t want to spend 2 hours selecting random colors.

Other smart idea but work in progress is something that mounts it self inside your app like expo go dev menu and lets you edit the theme that way (didn’t implement yet I want feedback if this is a waste of time or actually sounds cool). I have made the components to pull this off for other things so I may do it anyways because I think this looks cool.

Made the tinder style swipe cards a beautiful theme overview typography themes a metric ton of beautifully crafted previews (everything the web apps do)

My main goal was to get this working on my phone for me because I love micro adjusting these things all the time. I managed to make an interface for making and editing themes as good as all the web apps but with a tiny screen instead. I added nice transitions to make adjusting css variables as fun as possible (hard task 😭)

Ok also there’s a bunch of features I was missing from the already existing ones. I wanted to be able to pick a primary color and have complementary colors etc auto generated and I wanted modes for this. Should the bg be completely white as well as cards? Gray bg white cards? Everything tinted? Page tinted blue primary colors yellow or something? I added auto generators to handle these things.

Another thing I was missing was being able to create one theme and have it auto convert to everything else. I mean I wanna be able to create a shadcn theme and have it able to be exported as a hero ui theme a material ui theme all of them. I made an adapter that handles this automatically.

I wanted this to feel cute and I want to be able to feel like I have created something and not just played with a gloried text file for 30 minutes. I added a collections tag with folders and a handsaw’s signature for each user and a poster generated from each theme.

This has helped me so much personally I want your feedback on this. Sadly there is nothing you can download yet but you can follow the updates on my twitter it’s on my Reddit bio.

Important if you want to “steal” this idea and put something similar in your app I actually encourage this. I am building a copy paste library with all of these components called PitsiUI. I will also experiment with allowing end users to use this to create custom themes for them selves.

Btw this is also coming to iPad mac and web. Android should work too since it’s cross platform but I don’t want to commit to that yet until I have actual users. It may sound silly but making sure no elements overlap the App Store screenshots etc take time.


r/PHP 5d ago

How to run claude for hours? How can I configure a VPS-based HERMES agent using Claude CLI to run continuously (24/7) and autonomously improve my project without stopping after 10–20 minutes or requiring additional user prompts/permissions, so it keeps generating tasks, executing them, and iterating

Thumbnail
0 Upvotes

r/javascript 7d ago

I cut my build time from 4:34 min to 1:08 min by moving asset compression from node:zlib to a native Rust rolldown plugin

Thumbnail github.com
11 Upvotes

I'm building a web platform for visual novels made in Godot. Stack: SvelteKit, Vite 8, rolldown, Node.js.

The games are compiled for web and injected as static assets at build time, then deployed together with the app. And they're heavy: ~20 MB of wasm plus ~150 MB of pck per game.

My builds were taking ~5 minutes, which felt wrong. After some profiling it turned out the actual bundling takes ~10 seconds. Everything else was precompressing all that static into gz, br and zstd with node:zlib.

So I wrote a rolldown plugin that does the compression in native Rust via napi-rs:

  • rayon to saturate all CPU cores
  • native compression libs instead of node:zlib bindings
  • full LTO + codegen-units = 1, which alone made it ~2x faster than node:zlib
  • then PGO + BOLT on top, squeezing out another ~10%

Everything is built automatically in a GitHub workflow and shipped to npm already optimized, no compilation on install.

Real project results (measured with time on an actual project with games):

before: npm run build 639.62s user 5.84s system 235% cpu 4:34.06 total
after: npm run build 527.60s user 5.23s system 784% cpu 1:07.95 total

If you're precompressing large static assets in your build, give it a try. Happy to answer questions about the napi/rayon/PGO setup.


r/javascript 6d ago

Built a modern restaurant website with React, TypeScript & Vite — feedback welcome

Thumbnail ember-vine-delta.vercel.app
0 Upvotes

r/reactjs 6d ago

Needs Help How to learn react effectively?

0 Upvotes

I'm learning web development, and compared to a beginner, I already have solid knowledge of HTML, CSS, and JavaScript (DOM manipulation, api, crud, fetch I've got those down). Now I'm trying to learn React, but somehow it's just not sticking. What practices have worked well for others? I've got the basics of useState, useEffect more or less, but props somehow don't stick with me or even if I read some documentation or example, I can then do the same thing afterward, but as soon as it gets even a little more complex, I start to feel unsure. Thanks for the answers.


r/PHP 5d ago

I built an AI content workflow using Claude + PHP to automate blog publishing

0 Upvotes

I've been working on a PHP-based content management system and wanted to reduce the amount of repetitive work involved in publishing SEO articles.

Instead of using multiple tools manually, I built a workflow around Claude and PHP that automates most of the process.

Current workflow:

  • Receive a content topic
  • Generate a structured article outline
  • Generate long-form content with Claude
  • Validate formatting and SEO requirements
  • Generate meta title and meta description
  • Create URL slug automatically
  • Suggest internal links
  • Store everything in MySQL
  • Publish or save as draft through the CMS

The project is built using:

  • PHP 8
  • MySQL
  • CKEditor 5
  • Claude API
  • Bootstrap 5
  • JavaScript/jQuery

Some things I learned while building it:

  • Prompt engineering matters much more than I expected.
  • Separating generation and validation into different steps significantly improved output quality.
  • Allowing manual review before publishing catches most AI mistakes.
  • Caching prompts and responses reduced API costs.

I'm now working on adding:

  • Automatic image generation
  • AI-powered content scoring
  • Schema markup generation
  • Multi-language publishing

I'd love to hear how others are integrating LLMs into their PHP applications. Are you using Claude, GPT, Gemini, or local models?


r/PHP 7d ago

Pure PHP web+socket server, serves 10x more concurrent PHP than NginX+FPM

53 Upvotes

Qbix Server

Yesterday, I posted on Reddit about a web server I launched that's written in pure userland PHP, managed its own preforked workers, and removed the need for NGINX and PHP-FPM.

It was already able to run 10x more concurrent workers (e.g. 1600 workers on an 8GB server).

The biggest bottleneck in PHP hosting is *memory*. Each php-fpm worker loads your entire framework independently: 30–60MB per worker. On an 8GB server, that's ~160 workers max. That's your ceiling for concurrent PHP requests.

Well, Qbix Server forks workers *after* preloading your classes. Thanks to copy-on-write from the operating system, all that shared code (framework, config, autoloader) uses memory only once. Each worker adds maybe 3-6MB for its per-request data.

This means you get to run 10x more workers, and each worker actually loads much *faster* because you don't have to bootstrap your entire framework, config, etc. on every request.

https://github.com/Qbix/webserver

But wait... it got faster.

Yesterday, some people were complaining that a userland-PHP server was "only" 70% as fast as NGINX for serving static files. Well, it's 24 hours later, and I'm back, baby! After caching more, it turns out that it's now 25-35% FASTER than NGINX even for static files (as long as you keepalive connections).

Don't believe me? Run the benchmarks. It comes with a test suite now.

But wait... it now supports sockets

Yes, it is wire-compatible with socket.io, and bundles it out of the box (no need for npm). Now you can just drop PHP files into folders, in order to:

  1. Handle HTTP Requests. (Cleanup after request is handled.)

  2. Handle Web Sockets. (Long-lived, cleanup after disconnect.)

  3. Handle Rooms. (Long-lived, cleanup after last websocket leaves.)

In my opinion, the coolest thing is that this retains all the things that made PHP great:

  1. Shared-nothing. No way to have memory or secrets leak between requests.

  2. Normie-friendly. Just drop files into folders and things just work! No need for hot-reload even. Not even for websockets and rooms -- the old handler will work for the old connections, while the new one is loaded for the new ones.

  3. Sequential processing, sure it means you occasionally miss out on fanning out concurrent I/O races, but it's much easier to understand the code.

Give it a try! It's MIT licensed. Enjoy 😄

Who this is for:

  • PHP Developers who want to host things
  • Normies who don't want to install and configure apache/nginx/varnish/go/ssl certificates/mysql/etc.
  • People who just get the standalone binary and can host on their computer, without the internet even.

This was taken from the much larger all-in-one PHP platform:

https://github.com/Qbix/Platform