Experimenting with a lightweight web stack: Bun, Astro, MongoDB, HTMX, Alpine

I'm experimenting with a web stack that might ship 75% less JavaScript 💻 After watching bundle sizes creep up project after project, I'm trying something different: Bun + Astro + MongoDB + HTMX + Alpine Here's the hypothesis: Astro renders HTML on the server. Fast builds, zero JS by default. HTMX handles dynamic interactions without writing API endpoints. Click a button, get HTML back, swap it in. Alpine sprinkles in client-side reactivity where needed (dropdowns, modals, form validation). It's 15KB. Bun makes everything faster. Install, test, run - all measurably quicker than Node. MongoDB because sometimes you just want flexible schemas and good DX. Why I'm curious about this 🤔 Modern React/Next.js apps easily hit 200-300KB of JavaScript. This stack should land around 35-50KB for most use cases. That's not just a smaller number - it's faster page loads, especially on mobile. What I'm testing it for 🧪 - Content-heavy sites and blogs - Internal dashboards and admin panels - CRUD applications - Projects where you want to ship fast without complexity Not trying to replace React for complex SPAs. Different tools for different jobs. The questions I'm exploring ⁉️ - Does the HTMX mental model feel natural after years of React? - Where does Alpine fall short compared to Vue/React? - Is Bun mature enough for production? - What's the developer experience really like? I'll be documenting what I learn. If you've used any of these tools, I'd love to hear your experience. Are we over-engineering web development? Or do modern frameworks earn their complexity? #WebDevelopment #JavaScript #HTMX #Astro #DeveloperExperience

To view or add a comment, sign in

Explore content categories