frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: PrinceJS – 19,200 req/s Bun framework in 2.8 kB (built by a 13yo)

https://princejs.vercel.app
91•lilprince1218•2h ago
Hey HN,

I'm 13, from Nigeria, and I just released PrinceJS — the fastest web framework for Bun right now.

• 19,200 req/s (beats Hono/Elysia/Express) • 2.8 kB gzipped • Tree-shakable (cache, AI, email, cron, SSE, queue, test, static...) • Zero deps. Zero config.

Built in < 1 week. No team. Just me and Bun.

Try it: `bun add princejs` GitHub: https://github.com/MatthewTheCoder1218/princejs Docs: https://princejs.vercel.app

Brutal feedback welcome. What's missing?

– @Lil_Prince_1218

Comments

waschl•2h ago
Mighty impressive
yahoozoo•1h ago
Any real world app is going to be waiting on, primarily, IO. These benchmarks that just hit an endpoint that returns a simple object are useless.
tayo42•1h ago
You would be otherwise just benchmarking the slow service if you benchmarked it any other way
koakuma-chan•57m ago
What is being benchmarked there anyway? Receiving a request from the underlying HTTP library, calling the user's handler function, and passing the response back to the HTTP library? Hono, Elysia, PrinceJS... all these "frameworks" really are just routers, and Bun comes with its own router.
ricardobeat•10m ago
No, you would be benchmarking the overhead of juggling several requests in flight, I/O and memory usage, which is what really distinguishes servers in terms of performance.
dlisboa•1h ago
I know it's intentional but very amusing name considering the country of origin.
alexfoo•5m ago
It’s almost certainly not because of the advance fee scam.

You don’t have to meet many Nigerians before you find one that claims to be some kind of a Prince back home.

Nigeria used to be hundreds/thousands of separate kingdoms and many people have a claim to be chiefs/kings of those historic kingdoms. Male descendants of such leaders will claim the unofficial title of Prince. They may not have any real national standing but such leaders will be respected by their local communities.

It may look like one big country but there’s no official single royal family (unsurprising since it is a Republic). To give an idea of the diversity of Nigeria consider the fact that the country has over 500 native languages that are actively spoken.

swiftcoder•1h ago
Congrats! That's a sleek framework.

Would love to see the benchmarks checked into source control somewhere so folks can reproduce them.

Can't say I'm the biggest fan of the way the sample code types itself out character-by-character. Took a while for the longer samples to finish typing themselves out.

jryan49•1h ago
Agree get rid of the character-by-character animation. It's very annoying.
Uptrenda•1h ago
Damn smart kid. You're going to have a bright future. Stay away from bad influences and you'll be a star.
fwip•1h ago
The github page claims "PrinceJS fits in a tweet," but also that it's 2.8kB after gzip compression.

Are tweets 2800 characters now? (Genuine question, I haven't used the place in years.

chuckadams•1h ago
People with blue-check accounts get a 25000-char limit. Everyone else is at 280. Have had twitter/x aliased to localhost for a while now myself.
moralestapia•1h ago
An actual nigerian prince that's not a scam. LOL.

Congrats on this, keep building more stuff!

jryan49•1h ago
Considering this is barely any code at all I imagine it doesn't provide anywhere near the feature set other web frameworks do. Also there are no tests. How do you know it even works properly? Why would I trust that it works properly?
jryan49•1h ago
I do want to applaud your efforts, especially at your age. Add some tests, and keep making things :)
gwd•1h ago
I thought it was going to have something to do with this:

https://princejs.com/

lxe•1h ago
Object.defineProperty on every request to set params / query / body is probably slower than regular property assignment.

Also parsing the body on every request without the ability to change it could hurt performance (if you're going for performance that is as a primary factor).

I wonder if the trie-based routing is actually faster than Elysia in precompile mode set to enabled?

Overall, this is a nice wrapper on top of bun.serve, structured really well. Code is easy to read and understand. All the necessary little things taken care of.

The dev experience of maintaining this is probably a better selling point than performance.

jasonjmcghee•1h ago
Nice job building a thing and putting it out there. It's a great accomplishment.
super256•1h ago
At that age I couldn't even code. Keep it up, young man :)
a-dub•1h ago
this is pretty fun, slick to think you can do things like this now and it will be performant: https://github.com/MatthewTheCoder1218/princejs/blob/main/sr...

interesting to dig deep into the bun runtime (it's in zig) to see how this remains efficient. it's a heap: https://github.com/oven-sh/bun/blob/509a97a43516fe4f6d4ff400...

of these: https://github.com/oven-sh/bun/blob/509a97a43516fe4f6d4ff400...

pretty cool clean and simple code for the framework (and bun).

lioeters•1h ago
Great job with building and releasing a project. The API looks intuitive, almost the same as Express. Documentation site is good! The animated code blocks is nice on front page but too distracting in the docs itself, I think.

A potential user would want to know: why is it faster? What's the compromise, if any. What specific quantifiable technical points make it faster than other libraries. Benchmarks and tests.

Overall the library feels like a polished open-source project, good attention to design and detail. Definitely valuable as part of a portfolio/resume. Keep going!

ramon156•1h ago
Impressive stuff! I see you have contributions startins 2023, does that mean you started programming at 11?
leeoniya•1h ago
i was initially confused how 19.2K rps is notable when Express typically benchmarks around 15K rps [1].

however, the author is benchmarking a route with an id param here, not a static route.

[1] https://github.com/uNetworking/uWebSockets/discussions/1415

bitwize•1h ago
Is from Nigeria

Has "Prince" in his HN nick and framework name

I smell either a rat, or an incredibly meme-savvy kid who leaned into the joke.

Anyways, congrats and keep on hacking!

stevepotter•55m ago
I got emotional thinking about a 13 year old releasing this. No brutal feedback, just proud of you buddy. Keep it going!
silvestreh•48m ago
This is really interesting, but I'd absolutely love if you could add a light theme to your website. I really can't read on a dark background, it kinda hurts my eyes and when I take my eyes off the screen I see a bunch of horizontal lines for a minute or so.
ricardobeat•35m ago
Nice work! Some notes:

1. File size is a commonly highlighted metric for JS frameworks because of network transfer cost on the client side. For node/bun/deno frameworks, it isn't very relevant, especially the gzipped size.

2. In the benchmark, the number for all frameworks is quite low - I get closer to 80-100k req/s with Bun on my 3-year old machine. Might be worth using a standard VM size in a cloud provider to make it more meaningful.

3. "Cron" scheduling doesn't seem to belong in the library. This won't be very useful for real-world use cases, as soon as you have >1 node running a server you'll need some form of coordination. More size reduction :)

ricardobeat•17m ago
some more after reading the source:

- JWT needs to be validated, as it is, your implementation[1] happily accepts anything, you can impersonate anyone you want. I'd argue that it's a bad default choice too [2]

- baking-in resend.com as email provider is unlikely to be useful for most people

- x-forwarded-for [3] is only added by proxy servers, and will often not be present. This means you'll be applying a shared rate limit to most of your users

- the 'ai' helper is missing from the code. If this is vibe-coded, having tests for the examples will help keep it cohesive

Sorry if this is a lot, I hope it can help.

[1] https://github.com/MatthewTheCoder1218/princejs/blob/main/sr...

[2] https://paragonie.com/blog/2017/03/jwt-json-web-tokens-is-ba...

[3] https://github.com/MatthewTheCoder1218/princejs/blob/main/sr...

Alex_L_Wood•33m ago
This is pretty impressive, wow! I always wanted to build a toy HTTP requests framework just to better understand the tools I’m working with, and here you are building the full thing.
altmind•1m ago
Will you bench against techempower benchmarks?

Show HN: I built a synth for my daughter

https://bitsnpieces.dev/posts/a-synth-for-my-daughter/
828•random_moonwalk•5d ago•159 comments

Show HN: PrinceJS – 19,200 req/s Bun framework in 2.8 kB (built by a 13yo)

https://princejs.vercel.app
91•lilprince1218•2h ago•30 comments

Show HN: ESPectre – Motion detection based on Wi-Fi spectre analysis

https://github.com/francescopace/espectre
75•francescopace•7h ago•13 comments

Show HN: Continuous Claude – run Claude Code in a loop

https://github.com/AnandChowdhary/continuous-claude
51•anandchowdhary•2d ago•27 comments

Show HN: Building WebSocket in Apache Iggy with Io_uring and Completion Based IO

https://iggy.apache.org/blogs/2025/11/17/websocket-io-uring/
16•spetz•4h ago•5 comments

Show HN: Bsub.io – zero-setup batch execution for command-line tools

13•wkoszek•6h ago•6 comments

Show HN: Kalendis – Scheduling API (keep your UI, we handle timezones/DST)

https://kalendis.dev
5•dcabal25mh•4h ago•0 comments

Show HN: How are Markov chains so different from tiny LLMs?

4•JPLeRouzic•1h ago•0 comments

Show HN: I have created an alternative for Miro

https://nodeland.io
4•gxara•3h ago•0 comments

Show HN: Octopii, a framework for building distributed applications in Rust

5•janicerk•5h ago•1 comments

Show HN: Hegelion-Dialectic Harness for LLMs (Thesis –> Antithesis –> Synthesis)

https://github.com/Hmbown/Hegelion
2•hunterbown•3h ago•3 comments

Show HN: UltraLocked – iOS file vault using Secure Enclave and PFS

https://github.com/UltraLocked/UltraLocked
3•proletarian•4h ago•2 comments

Show HN: UpBeat – an AI-Enhanced RSS/Atom Reader that only shows you good news

https://upbeat.mitchelltechnologies.co.uk
4•seanmtracey•4h ago•0 comments

Show HN: ToolHop – Fast, simple utilities for every workflow

https://toolhop.app
3•steadyeddy_94•6h ago•0 comments

Show HN: I build a strace clone for macOS

https://github.com/Mic92/strace-macos
2•Mic92•6h ago•0 comments

Show HN: I ditched Grafana for my home server and built this instead

https://github.com/alibahmanyar/simon
6•bahmann•7h ago•0 comments

Show HN: Unflip – a puzzle game about XOR patterns of squares

https://unflipgame.com/
174•bogdanoff_2•6d ago•48 comments

Show HN: Learn Docker in your terminal

https://github.com/furkan/dockerlings
4•furk4n•8h ago•0 comments

Show HN: Internet Object – a lean, schema-first JSON alternative

https://internetobject.org/
2•aamironline•11h ago•2 comments

Show HN: Epub2md – Turn ePub books into Markdown folders for LLM agents

https://github.com/mefengl/epub2md
3•mefengl•13h ago•1 comments

Show HN: Common Sense License (CSL) – civic license for a techno-feudal world

https://github.com/shmaplex/csl
3•shmaplex•14h ago•1 comments

Show HN: Minivac 601 Simulator - a 1961 Relay Computer

https://minivac.greg.technology/
18•gregsadetsky•1d ago•1 comments

Show HN: Encore – Type-safe back end framework that generates infra from code

https://github.com/encoredev/encore
75•andout_•3d ago•47 comments

Show HN: Whirligig.live

https://whirligig.live
10•idiocache•1d ago•10 comments

Show HN: DBOS Java – Postgres-Backed Durable Workflows

https://github.com/dbos-inc/dbos-transact-java
113•KraftyOne•4d ago•57 comments

Show HN: Real-time 4D Julia set navigation via gamepad

https://banditcat.github.io/Atlas/Atlas.html
17•BanditCat•5d ago•0 comments

Show HN: I DON'T want to upload my private files to AI

2•cando_zhou•20h ago•0 comments

Show HN: 13Radar – Real-Time Hedge Fund Portfolio Analytics

https://www.13radar.com/
7•brokerjames•21h ago•3 comments

Show HN: Find Faceless YouTube Channels with AI

2•andybady•21h ago•3 comments

Show HN: CUDA, Shmuda: Fold Proteins on a MacBook

https://latentspacecraft.com/posts/mlx-protein-folding
9•geoffitect•22h ago•2 comments