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

mm-renderer

v0.1.0

Published

My mm renderer library

Downloads

8

Readme

mm-renderer

Render and display web content created with MM Base anywhere — Next, Nuxt, React, Vue, Angular, Svelte, or plain JavaScript.

mm-renderer is a lightweight JavaScript renderer that fetches and renders content from your MM Base project, which is powered by Supabase.


📖 What is MM Base?

MM Base is an admin project that integrates the Mark up manager web markup tool with Supabase as a Backend-as-a-Service (BaaS).
It allows you to easily create, edit, and store static web pages — such as guides, announcements, events, or terms — without requiring developers to rebuild and redeploy.

Key features:

  • Create rich content (text, images, videos) with an intuitive web interface
  • Manage publish/unpublish state
  • Auto-generate meta title, description, and image for link sharing
  • Multi-language support
  • Data stored in Supabase (with efficient .webp image optimization)

🚀 Installation

npm install mm-renderer @supabase/supabase-js
# or
yarn add mm-renderer @supabase/supabase-js
# or
pnpm add mm-renderer @supabase/supabase-js

⚙️ Setup

Requirements

  1. Your Supabase project must have the mm_posts table and mm_assets bucket created (see MM Base installation guide).
  2. Have your Supabase URL and anon public API Key ready.

Example

// pages/content/[content].vue

<template>
    <div>
        <div v-if="pending">Loading…</div>
        <div v-else-if="error">Failed to load.</div>

        <div
            v-else-if="pageData"
            v-html="generateHtml(pageData.pages[0].nodes, { t: i18n.t })"></div>
    </div>
</template>

<script setup lang="ts">
    import { createClient } from "@supabase/supabase-js"
    import { generateCss, generateHtml } from "mm-renderer"

    // In actual apps, manage them as .env
    const client = createClient("https://xyzcompany.supabase.co", "public-anon-key")

    const i18n = useI18n()

    const { data, pending, error } = await useAsyncData(
        "mm-post:2",
        async () => {
            // ✅ SEO Note:
            // Use `.eq("path", route.params.content)` (or a clean URL string) instead of numeric IDs.
            // This allows search engines to crawl and index pages by their canonical URL
            // rather than opaque IDs, improving SEO discoverability and link sharing
            const { data, error } = await client
                .from("mm_posts")
                .select("*")
                .eq("id", 2) //  <-- .eq("path", route.params.content)
                .single()
            if (error) throw error
            return data
        },
        { lazy: import.meta.client }
    )

    const pageData = computed(() => {
        return data.value?.page_data ? JSON.parse(data.value?.page_data) : undefined
    })

    onMounted(() => {
        if (!data.value?.public) alert("This page is not public")
    })

    useSeoMeta({
        title: () => data.value?.title || "MM Base",
        description: () => data.value?.description || "",
        ogTitle: () => data.value?.title || "",
        ogDescription: () => data.value?.description || "",
        ogImage: () => data.value?.image || "",
    })

    useHead(() => {
        const css = pageData.value
            ? generateCss(pageData.value.pages[0].nodes, pageData.value.widgetGroups)
            : ""

        return {
            style: css ? [{ innerHTML: css, key: "mm-renderer-css" }] : [],
        }
    })
</script>

🌍 Where to use

mm-renderer works in any environment that can run JavaScript in the browser:

  • Next.js
  • Nuxt
  • React
  • Vue
  • Angular
  • Svelte
  • Any browser-based project

📦 Why mm-renderer?

  • Framework-agnostic: Works with any frontend framework or plain JavaScript.
  • No build step required: Can be loaded directly via CDN or npm.
  • Seamless Supabase integration: Fetch and render MM Base content directly from your Supabase database.
  • Lightweight: Minimal overhead for embedding content.
  • Flexible: Perfect for rendering guides, announcements, event pages, terms of service, or any other static content managed in MM Base.