npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

melina-web

v2.0.0

Published

A lightweight web framework for Bun with Next.js-style routing and zero-config builds.

Readme

Melina.js 🦊

A lightweight web framework for Bun with zero-config builds

npm version Bun

Melina.js is a Bun-native web framework with Next.js-style file routing and a dual-mode client architecture. Server pages render HTML with JSX. Client interactivity is added via mount scripts — either with vanilla JSX-to-DOM (zero-framework) or React (auto-detected from imports).

✨ Features

  • 📁 File-based Routing — Next.js App Router style (app/page.tsx/)
  • In-Memory Builds — No dist/ folder, assets built and served from RAM
  • 🎭 Dual-Mode Client JSX — Vanilla JSX-to-DOM (default) or React (auto-detected)
  • 🔄 View Transitions — SPA-like navigation with the View Transitions API
  • 🎨 Tailwind CSS v4 — Built-in support for CSS-first configuration
  • 🌐 Import Maps — Browser-native module resolution, no vendor bundles

🚀 Quick Start

# Install
bun add melina-web

# Create app structure
mkdir -p app

# Create a page
cat > app/page.tsx << 'EOF'
export default function Home() {
  return <h1>Hello Melina! 🦊</h1>;
}
EOF

# Create layout
cat > app/layout.tsx << 'EOF'
export default function Layout({ children }) {
  return (
    <html>
      <body>
        <main id="melina-page-content">{children}</main>
      </body>
    </html>
  );
}
EOF

# Start dev server
bunx melina start

Open http://localhost:3000 🎉

🎭 Client Interactivity

Add a page.client.tsx or layout.client.tsx file alongside the server component to add interactivity:

// app/page.client.tsx — runs in the browser
import { useState } from 'melina/client';

function Counter() {
  const [count, setCount] = useState(0);
  return <button onClick={() => setCount(c => c + 1)}>Count: {count}</button>;
}

// Mount into the server-rendered page
const el = document.getElementById('counter-root');
if (el) render(<Counter />, el);

How the dual-mode works

Melina auto-detects which mode to use per file based on imports:

| Import | Mode | What happens | |--------|------|--------------| | melina/client | Vanilla | JSX compiles to real DOM elements. No framework, no VDOM. | | react | React | React + ReactDOM loaded via import maps. Full React ecosystem. |

📖 Documentation

🔧 CLI

melina init <name>  # Create new project
melina start        # Start dev server

📦 Project Structure

my-app/
├── app/
│   ├── layout.tsx         # Root layout (server)
│   ├── layout.client.tsx  # Layout mount script (client)
│   ├── page.tsx           # Home page (/)
│   ├── page.client.tsx    # Home page mount script
│   ├── about/
│   │   └── page.tsx       # /about
│   ├── api/
│   │   └── hello/
│   │       └── route.ts   # API route
│   └── globals.css        # Global styles
└── package.json

📋 Examples

| Example | Description | |---------|-------------| | shopping-cart | E-commerce cart with server/client mount scripts | | social-feed | Social feed with SSE messaging and View Transitions |

🤔 Why Melina?

| Traditional SPA | Melina.js | |-----------------|-----------| | Bundle everything | Server-render pages, add JS only where needed | | Full page refresh or client routing | View Transitions for smooth navigation | | Complex Webpack/Vite config | Zero config, Bun-native builds | | 100KB+ vendor chunks | Browser-native import maps | | React required everywhere | React optional — vanilla JSX-to-DOM by default |

License

MIT © Melina.js