What is fragmenium ?
Fragmanium is a fragment-execution engine, not a library or framework. Running entirely in the browser, it loads and runs JS and CSS libraries or frameworks on your behalf while handling routing, page lifecycle, and cleanup. It introduces no new syntaxâonly a configuration file, reference.js. Static-first yet dynamically enhancing, client-side rendered, SPA-ready, and fragment-based, it is a general-purpose engine for modern web sites.
Why Fragmanium?
Developers often use React or Vue for single-page applications, but these libraries come with serious challenges:
- Require strong JavaScript knowledge
- Need server-side execution
- Demand backend logic learning
- Have a long learning curve
- Deliver heavy client-side scripts
- Create security threats
- Lock you into an ecosystem that can't run general plugins, libraries, or frameworks natively
- Need manual cleanup yet still leak memory
These weaknesses are Fragmanium's strengths: it's easy to learn and use, cost-effective for agencies, speeds project completion, and gives users a smooth experience.
Fragment execution order
The Fragmanium engine executes fragments in the order; which fragment runs first really matters when you build logic that depends on earlier assets.
After reload page
- HTML swap
- CSS constant or except
- CSS common or except
- CSS specific
- HTML constant + HTML swap
- HTML common + HTML swap
- JS constant
- JS every
- JS common
- JS specific
After page route or calling cleanup(); function
- CSS common
- CSS specific
- HTML unique + HTML swap
- HTML constant's except only + HTML swap
- HTML common or except + HTML swap
- JS every
- JS common
- JS specific
In general, cleanup(); runs on popstate, on click of an a tag
without a target attribute, or when the function is called directly.
From the developer
Hi, Iâm Setu Rakib. I built Fragmanium to give developers, visitors and agencies a better deal: if HTML, CSS and JS are already enough for a SPA, why burn time learning custom syntax, burning server CPU on extra rendering or draining visitor batteries with heavy scripts?
Iâm a front-end developer whoâd rather stay out of the back-end weeds, but React and Vue kept pushing me there. Fragmanium is my answer to those painsâfewer moving parts, faster sites, and a smoother build for everyone.
Beyond the code, I wanted a tool that respects the open web. No lock-in, no hidden build steps, no vendor-controlled ecosystemâjust plain files that run anywhere. Fragmanium lets you ship greener sites (less compute, less data) while keeping the silky feel of a single-page app. Use it for a landing page, a documentation hub, or a full client portalâthe overhead is the same: one config file and the fragments you choose.
If this sounds like the workflow youâve been missing, star the repo, open issues, share your builds. The engine is free, open and waiting for your pull requests. Letâs prove the web can be fast, simple and funâwithout sacrificing the modern experience users expect.