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

fakestack

v1.1.0

Published

High-performance database generator - Generate databases from JSON schemas with realistic fake data

Readme

Features

10-50x faster than pure JavaScript implementations
🗄️ Multi-database support - SQLite, MySQL, PostgreSQL, MariaDB, MS SQL Server, CockroachDB
💡 116+ data generators - financial, products, animals, food, vehicles, books, and more
🎨 Template generator - Custom data patterns with modifiers
🎯 Interactive generator - Built-in schema generator with 10 pre-built templates
🎯 Simple API - CLI and programmatic usage
🌍 Cross-platform - Works on Linux, macOS, and Windows
📦 Zero dependencies - Includes pre-compiled binaries

Installation

npm install fakestack
# or
yarn add fakestack
# or
pnpm add fakestack

🎯 Quick Start

CLI Usage

# Generate schema interactively
npx fakestack -g .

# Download example schema
npx fakestack -d .

# Create tables and populate with data
npx fakestack -c -p -f schema.json

Programmatic Usage

import { fakestack } from 'fakestack';

// Create tables and populate data
await fakestack({
  createTables: true,
  populateData: true,
  schemaFile: 'schema.json'
});

// Or download example schema
await fakestack({
  downloadSchema: '.'
});

Advanced Usage

import { runFakestack } from 'fakestack';

// Run with custom arguments
const exitCode = await runFakestack(['-c', '-p', '-f', 'schema.json']);

if (exitCode === 0) {
  console.log('Success!');
}

📖 CLI Options

-g, -generate <file>  Generate schema interactively (use '.' for default filename)
-c, -create-table     Create database tables from schema
-p, -populate-data    Populate tables with fake data
-f, -file <path>      Path to JSON schema file
-d, -download-schema  Download example schema to specified path

📊 Example Schema

{
  "database": {
    "dbtype": "sqlite",
    "drivername": "sqlite",
    "database": "test.db"
  },
  "tables": [
    {
      "name": "users",
      "columns": [
        {
          "name": "id",
          "type": "integer",
          "options": {"primary_key": true, "autoincrement": true}
        },
        {
          "name": "username",
          "type": {"name": "string", "args": {"length": 50}},
          "options": {"nullable": false, "unique": true}
        },
        {
          "name": "email",
          "type": {"name": "string", "args": {"length": 100}},
          "options": {"nullable": false, "unique": true}
        }
      ]
    }
  ],
  "populate": [
    {
      "name": "users",
      "count": 100,
      "fields": [
        {"name": "username", "generator": "user_name"},
        {"name": "email", "generator": "email"}
      ]
    }
  ]
}

🎨 Available Generators (116+)

  • Personal & Identifiers: name, first_name, last_name, email, username, password, ssn, ein
  • Financial & Payment: credit_card, credit_card_type, credit_card_cvv, credit_card_exp, currency, bitcoin_address, iban, routing_number, price
  • Address & Location: address, city, country, country_code, street_address, postcode, latitude, longitude, timezone, language, locale
  • Company & Job: company, job, catch_phrase
  • Internet & Technology: url, domain_name, ipv4, ipv6, mac_address, user_agent, slug, app_name, app_version
  • Dates & Times: date, date_time, timestamp, past_date, future_date, time, year, month, weekday
  • Text & Content: text, sentence, paragraph, word, quote, phrase, question, emoji
  • Numbers & Ranges: random_int, integer (with min/max), random_digit, random_number, float, decimal (with min/max)
  • Products & E-commerce: product_name, product_category, product_description, color, hex_color, price
  • Files & Media: filename, file_extension, mime_type, image_url
  • Books & Entertainment: book_title, book_author, book_genre, movie_name, movie_genre
  • Animals & Nature: animal, animal_type, pet_name, cat, dog, bird, farm_animal
  • Food & Drink: fruit, vegetable, breakfast, lunch, dinner, snack, dessert, drink
  • Vehicles: car_maker, car_model, car_type, car_fuel_type, car_transmission_type
  • Template Generator: Create custom patterns with modifiers (upper, lower, title, trim, truncate)

📊 Performance

| Rows | Node.js (faker) | fakestack | Speedup | |------|----------------|-----------------|---------| | 1,000 | ~3s | ~0.1s | 30x ⚡ | | 10,000 | ~30s | ~0.8s | 37x ⚡ | | 100,000 | ~300s | ~6s | 50x ⚡ |

🗄️ Supported Databases

  • SQLite - No additional setup required
  • MySQL - Industry-standard relational database
  • MariaDB - MySQL-compatible with enhanced features
  • PostgreSQL - Advanced open-source database
  • MS SQL Server - Microsoft's enterprise database
  • CockroachDB - Distributed SQL database (PostgreSQL-compatible)

🔧 TypeScript Support

Full TypeScript support with type definitions included:

import { fakestack, FakestackOptions, runFakestack } from 'fakestack';

const options: FakestackOptions = {
  createTables: true,
  populateData: true,
  schemaFile: 'schema.json'
};

await fakestack(options);

📚 Documentation

📖 Full Documentation on ReadTheDocs - Complete documentation with examples and tutorials

Contributing

Contributions welcome! See CONTRIBUTING.md

License

MIT - see LICENSE

Built With

  • Go - High-performance core
  • gofakeit - Fake data generation