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

abc-meta

v0.0.4

Published

meta

Readme

abc-meta

A comprehensive metadata and SEO management library for web applications, providing powerful tools for SEO optimization and dynamic content management.

📦 Installation

# If using within the monorepo
pnpm add abc-meta

# For external usage
pnpm install abc-meta

🚀 Features

The abc-meta package provides specialized modules:

  • API - API endpoints management for SEO
  • Canonical - Canonical links and URL routing
  • SEO - Fetch and process SEO data from APIs
  • Template - Template management for different applications
  • Keys - Standard SEO key definitions
  • Utils - Utility functions for metadata generation

📖 Usage

Basic Import

// Import from main entry point
import {
  getBaseSeo,
  getSeoByPage,
  getTemplate,
  generateMetadataHelper,
} from "abc-meta";

// Import specific modules
import { getBaseSeo } from "abc-meta/api";
import { canonicalLink, genCanonicalLink } from "abc-meta/canonical";
import { getSeoByPage } from "abc-meta/seo";
import { getTemplate } from "abc-meta/template";
import { seoKeys } from "abc-meta/keys";
import { generateMetadataHelper } from "abc-meta/utils";

Usage Examples

1. API Module - API endpoints management

import { getBaseSeo } from "abc-meta/api";

// Create SEO API URL
const seoUrl = getBaseSeo({
  slug: "california-dmv-test",
  app: "dmv",
  state: "california",
});
// Result: "https://api.asvab-prep.com/wp-json/passemall/v1/get-info-state?stateSlug=california-dmv-test&app=dmv&state=california"

2. SEO Module - Fetch SEO data

import { getSeoByPage } from "abc-meta/seo";

// Get SEO information for page
const seoData = await getSeoByPage({
  app: "dmv",
  state: "california",
  slug: "dmv-test",
});

console.log(seoData);
// {
//   title: "California DMV Practice Test 2024",
//   description: "Free California DMV practice test with real questions...",
//   content: "Detailed content about California DMV test..."
// }

3. Template Module - Template management

import { getTemplate } from "abc-meta/template";

// Get template for DMV
const dmvTemplate = getTemplate({
  template: "fines-limits",
  stateName: "california",
  app: "dmv",
  type: "learn",
});

// Get template for Real Estate
const realEstateTemplate = getTemplate({
  template: "property-law",
  stateName: "texas",
  app: "real-estate",
  type: "test",
});

// Get template for CDL
const cdlTemplate = getTemplate({
  template: "hazmat",
  stateName: "florida",
  app: "cdl",
  type: "learn",
});

4. Canonical Module - Create canonical links

import { canonicalLink, genCanonicalLink } from "abc-meta/canonical";

// Use predefined links
const aboutLink = canonicalLink.about; // "/about"
const practiceLink = canonicalLink.practiceTest; // "/practice-test"

// Create dynamic canonical links
const statePageLink = genCanonicalLink({
  type: "practice-test",
  appName: "dmv",
  state: "california",
});
// Result: "dmv/california/practice-test"

5. Utils Module - Generate metadata

import {
  generateMetadataHelper,
  generateMetadataWithApp,
} from "abc-meta/utils";

// Generate basic metadata
const metadata = await generateMetadataHelper({
  slug: "california-dmv-test",
  app: "dmv",
  state: "california",
  canonical: "https://example.com/dmv/california/practice-test",
  fallbackTitle: "California DMV Practice Test",
  fallbackDescription: "Free practice test for California DMV exam",
});

// Generate metadata with app info
const metadataWithApp = await generateMetadataWithApp({
  appName: "dmv",
  apps: [
    {
      appNameId: "dmv",
      title: "DMV Practice Tests",
      description: "Free DMV practice tests for all states",
    },
  ],
  slug: "california-dmv-test",
  state: "california",
});

6. Keys Module - Standard SEO keys

import { seoKeys } from "abc-meta/keys";

// Use predefined keys
const homeKey = seoKeys.home; // "home"
const practiceKey = seoKeys.practice; // "practice"

// Dynamic keys
const reviewKey = seoKeys.review("mobile"); // "review-mobile"
const resultKey = seoKeys.result("practice"); // "result-practice"

🏗️ Project Structure

packages/meta/
├── src/
│   ├── api/           # API endpoints management
│   ├── canonical/     # Canonical links and URL routing
│   ├── seo/          # SEO data fetching
│   ├── template/     # Template management
│   ├── keys/         # SEO keys definitions
│   ├── utils/        # Metadata generation utilities
│   └── index.ts      # Main exports
├── package.json
└── README.md

🔧 Configuration

Environment Variables

# App name to determine API endpoint
NEXT_PUBLIC_APP_SHORT_NAME=dmv  # or "asvab", "easyprep", "cdl"

Supported Apps

  • DMV - Driver's License tests
  • Real Estate - Real Estate license tests
  • CDL - Commercial Driver's License tests
  • ASVAB - Military entrance exam
  • EasyPrep - General test preparation

📦 Dependencies

Runtime Dependencies

  • abc-service - Service layer utilities
  • abc-model - Data models and types
  • query-string - URL query string parsing

Development Dependencies

  • @repo/eslint-config - Shared ESLint configuration
  • TypeScript type definitions

🚀 Development

Prerequisites

  • Node.js 18+
  • pnpm (recommended package manager)

Setup

# Install dependencies
pnpm install

# Build package
pnpm build

# Development mode with watch
pnpm dev

# Clean build artifacts
pnpm clean

# Lint code
pnpm lint

# Type checking
pnpm check-types

📝 API Reference

getBaseSeo(props)

Create API URL for SEO data.

Parameters:

  • props.slug (string, optional) - Page slug
  • props.app (string, optional) - App identifier
  • props.state (string, optional) - State identifier

Returns: string - Formatted API URL

getSeoByPage(props)

Fetch SEO data from API.

Parameters:

  • props.app (string, optional) - App name
  • props.state (string, optional) - State name
  • props.slug (string, optional) - Page slug

Returns: Promise<{title: string, description: string, content: string}>

getTemplate(props)

Get template data for different apps.

Parameters:

  • props.template (string) - Template name
  • props.stateName (string) - State name
  • props.app ("dmv" | "real-estate" | "cdl") - App type
  • props.type ("learn" | "test", optional) - Content type

Returns: {title: string, description: string, content: string}

generateMetadataHelper(options)

Generate Next.js metadata object.

Parameters:

  • options.slug (string, optional) - Page slug
  • options.app (string, optional) - App identifier
  • options.state (string, optional) - State identifier
  • options.canonical (string, optional) - Canonical URL
  • options.fallbackTitle (string, optional) - Fallback title
  • options.fallbackDescription (string, optional) - Fallback description
  • options.metadataBase (URL, optional) - Base URL
  • options.icons (string, optional) - Icon URL
  • options.images (string, optional) - Image URL

Returns: Promise<Metadata>

🤝 Contributing

  1. Fork repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add some amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open Pull Request

📄 License

This project is part of the monorepo and follows the same license terms.

🆘 Support

For support and questions:

  • Create an issue in the repository
  • Check existing documentation
  • Contact the development team

Note: This is an internal package designed for use within the monorepo ecosystem. Some functions may depend on other packages in the workspace.

📊 Changelog

v0.0.2 (2025-01-11)

  • ✅ Optimized API endpoints with object lookup
  • ✅ Improved type safety
  • ✅ Added comprehensive documentation
  • ✅ Support for multiple apps (DMV, Real Estate, CDL, ASVAB, EasyPrep)
  • ✅ Metadata generation utilities for Next.js