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

@withwiz/blog-core

v0.1.0

Published

Reusable blog/news core package for Next.js projects

Readme

@withwiz/blog-core

Reusable Blog/News Core Package for Next.js 15 + Prisma + PostgreSQL

Next.js 15 + Prisma + PostgreSQL 기반 재사용 가능한 블로그/뉴스 코어 패키지

English | 한국어


@withwiz/blog-core is a standalone package that bundles domain logic (services), Prisma schema references, SEO utilities, Zod validation schemas, and UI components for building blog or news features. The host project (Next.js app) only needs to inject its Prisma client and configuration.

Key Features

  • Prisma DI -- No global prisma import; the host injects it (createBlogService(prisma, config))
  • Flexible model naming -- Use BlogPost, News, Article, or any name via modelName
  • Core CRUD + Tags (N:M) + Comments (threaded, moderation) + PostgreSQL FTS + Scheduled publishing
  • SEO -- generateMetadata, Sitemap, RSS 2.0, JSON-LD, OG image data presets
  • UI Components -- Admin (blog manager / editor) + Public (list / detail / tag widgets / comments)
  • Zod Validation -- Schema factories for posts, tags, and comments
  • CSS Custom Properties -- Fully themeable via --blog-* variables

Installation

npm install @withwiz/blog-core
# or
pnpm add @withwiz/blog-core

Peer dependencies: react >=18, next >=14, @prisma/client >=5, zod >=3

Quick Start

// src/lib/services/blog.ts
import { PrismaClient } from '@prisma/client';
import { createBlogService } from '@withwiz/blog-core';

const prisma = new PrismaClient();

export const blogService = createBlogService(prisma, {
  modelName: 'news',          // Prisma delegate name
  enableTags: true,           // Include tag relations
  enableR2Cleanup: false,     // Set true if using R2 storage
});
// app/api/news/route.ts
export async function GET(req: Request) {
  const { searchParams } = new URL(req.url);
  const page = Number(searchParams.get('page') ?? 1);
  const result = await blogService.listPublished({ page, limit: 12 });
  return Response.json(result);
}

Documentation / 문서

Full user guides are available in both languages:

| Language | Guide | |---|---| | English | docs/README.en.md | | 한국어 | docs/README.ko.md |

Detailed Docs / 상세 문서

| Doc | Contents | |---|---| | 01-getting-started | Prerequisites, installation, first post | | 02-prisma-schema | Prisma model integration, @@map, model mapping | | 03-blog-service | Full createBlogService API reference | | 04-tags | Tag CRUD, related posts, tag cloud | | 05-comments | Comment tree, moderation, honeypot, rate limiting | | 06-search | PostgreSQL FTS (tsvector / GIN / unaccent) | | 07-scheduler | Scheduled publishing, cross-platform cron | | 08-seo | Metadata / Sitemap / RSS / JSON-LD / OG | | 09-components | Admin / Public UI components | | 10-validators | Zod schemas and custom extensions | | 11-styling | CSS variables and theming guide |

Feature Checklist

  • [x] Blog CRUD (BlogService)
  • [x] Tags N:M + tag cloud + related posts (TagService)
  • [x] Threaded comments + moderation + honeypot + rate limiting (CommentService)
  • [x] PostgreSQL full-text search + highlighting (SearchService)
  • [x] Scheduled publishing + cron route factory (SchedulerService)
  • [x] SEO metadata / Sitemap / RSS / JSON-LD
  • [x] OG image data presets
  • [x] Admin / Public UI components
  • [x] Zod-based validation schema factories

Related Packages

| Package | Description | |---|---| | @withwiz/blog-system | Single/multi-tenant SaaS blog system | | @withwiz/toolkit | Middleware, auth, cache, logger (peer) | | @withwiz/block-editor | Block-based rich text editor (optional peer) |

License

MIT