Skip to content

Introduction to (de)Motivator

A curated collection of satirical insults, available as an npm package and a feature-rich web app.

Built and maintained by PorkyProductions. Started by request of Ryan Mullin (@hiteacheryouare), initially created by Tristan Winata (@HedgehogDubz), and actively maintained by both alongside the PorkyProductions community.


(de)Motivator is two things:

  1. An npm package (demotivator) — a TypeScript library containing hundreds of hand-curated insults organized into themed packs. It’s open source, published to the npm registry, and designed to be dropped into any JavaScript or TypeScript project.

  2. A web app (demotivator.web.app) — PorkyProductions’ first-party implementation of that package, wrapped in a full-featured web experience with user accounts, achievements, a leaderboard, sharing, customizable settings, and more.

The two are connected — the web app consumes the npm package as its data source — but they can be used completely independently. You can use the package in your own project without ever touching the web app, and you can use the web app without knowing the package exists.


This documentation covers everything from casual app usage to deep API references. Jump to the section that matches what you’re here to do:

You’re in the right place. The web app is free, runs in any modern browser, and doesn’t require an account to get started (though creating one unlocks a lot more). Here’s where to go:

GuideWhat You’ll Learn
Web App OverviewA quick orientation of every page and feature in the app. Start here.
Using the AppHow to generate insults, use MEGAMODE, browse the full insult catalog, share insults, save favorites, and submit your own insult ideas.
Accounts & ProgressCreating a free PorkyProductionsID, insult streaks, the full achievements list, and the leaderboard.
SettingsProfanity filtering, insult length limits, choosing which packs are active, and pack weighting.
SecretsEaster eggs, hidden pages, and surprises worth discovering.

Quickstart: Head to demotivator.web.app, press the big red button, and receive your first insult. That’s it. Everything else is optional.


”I want to use the npm package in my own project.”

Section titled “”I want to use the npm package in my own project.””

The demotivator package gives you access to the full insult library and utility functions for selecting, combining, and retrieving insults programmatically. It works in any JavaScript or TypeScript environment — Node, browsers, Bun, Deno, whatever you’ve got.

GuideWhat You’ll Learn
Package OverviewInstallation, quickstart with code examples, and how the package is structured internally. Start here.
TypesEvery TypeScript type and interface the package exports: Insult, InsultPack, InsultPackMap, CreateArrayConfig, and more.
PacksHow the insult pack system works — available packs, data structures, combining packs with createArray, filtering explicit content, and how to add new packs.
API ReferenceComplete documentation for every exported function, the deMotivator object, and the DeMotivator class.

Quickstart:

Terminal window
npm install demotivator
import { generateInsult, insults } from 'demotivator';
const insult = generateInsult(insults);
console.log(insult);
// => "You're the human equivalent of a participation award"

That’s the minimum viable roast. From there you can combine packs, use weighted selection, retrieve insults by index, and more — it’s all in the guides above.


”I want to contribute or understand the codebase.”

Section titled “”I want to contribute or understand the codebase.””

Welcome aboard. Here’s the lay of the land.

The project is a Turborepo monorepo with packages in packages/ and apps in apps/:

(de)Motivator/
├── packages/
│ ├── demotivator/ ← The npm insult package (TypeScript)
│ └── shared/ ← Shared utilities used across packages/apps
├── apps/
│ └── web/ ← The Svelte 5 web app (Firebase-hosted)
├── www/ ← PWA assets & the preserved v1.0 original
├── docs/ ← GitHub Pages redirect (legacy hosting)
├── turbo.json ← Monorepo task orchestration
└── package.json ← Root workspace config

The npm package and web app use different technologies but share some tooling:

LayerTechnology
MonorepoTurborepo
LintingESLint (config at repo root)
PackageTypeScript, published as demotivator on npm
Web AppSvelte 5 (Runes), TypeScript, Vite
Web StylingBootstrap (components) + Tailwind (utilities)
Web HostingFirebase Hosting + Firestore
Web AuthFirebase Authentication (email/password + Google)
UtilitiesLodash, PorkyProductions HAT

Prerequisites: Node 18+ and npm.

Terminal window
# Clone the repo
git clone https://github.com/PorkyProductions/deMotivator.git
cd deMotivator
# Install all dependencies (monorepo-wide)
npm install
# Start everything in dev mode via Turborepo
npm run dev

The web app will be available at http://localhost:5173. Turborepo handles building packages in the correct dependency order automatically.

From the repo root:

ScriptWhat It Does
npm run devStart all dev servers via Turborepo.
npm run buildProduction build across all packages and apps.
npm run build:forceForce rebuild, ignoring Turbo cache.
npm run lintLint all workspaces.
npm run typeCheckType-check all workspaces.
npm run cleanRemove caches and build artifacts.

From the web workspace specifically:

ScriptWhat It Does
npm run preview --workspace demotivator-webPreview the production build locally.
npm run push --workspace demotivator-webDeploy to Firebase (requires firebase login).

The project has strong opinions. Here are the ones that matter most:

  • Tabs, not spaces. Always.
  • Single quotes. Always.
  • Semicolons. Always.
  • Arrow functions only. Never use function declarations.
  • camelCase everything. Variables, functions, constants, file names. No UPPER_SNAKE_CASE.
  • No testing frameworks. Testing is manual.
  • No external UI libraries besides Bootstrap and Tailwind.
  • Lazy-load modules and dependencies with await import() wherever possible.
  • Components under 200 lines. Break them up if they’re longer.

When the ESLint config and these guidelines disagree, the ESLint config wins. For the full details, see the AGENTS.md file in the repo root.

Commit titles should be terse — a general idea of what changed, with an emoji if it’s funny. Commit bodies should be the opposite: detailed, longwinded, and overexplained. Reference contributors, PRs, issues, changed files, and related commits liberally.

If you’re looking for something specific:

Looking For…Go To…
Web Svelte componentsapps/web/src/components/
Web page-specific codeapps/web/src/pages/
Web utility modulesapps/web/src/utils/
Web stylesapps/web/src/styles/
Web Vite configapps/web/vite.config.ts
Web Firebase configapps/web/firebase.json, apps/web/.firebaserc
Firestore security rulesapps/web/firestore.rules
Package source codepackages/demotivator/source/
Shared utilitiespackages/shared/source/
The original v1.0 appwww/dmv1.html (read-only, never modify)

Both the npm package and the web app share the same set of insult packs:

KeyTitleExplicitDescription
originalOriginalNoThe core insult collection. General-purpose, no profanity.
profaneProfaneYesContains strong language and mature content.
halloweenHalloween 🎃NoSeasonal insults themed around Halloween.
christmasChristmas 🎄NoSeasonal insults themed around Christmas.
valentinesValentine’s Day 💝NoSeasonal insults themed around Valentine’s Day.
stPatricksSt. Patrick’s Day ☘️NoSeasonal insults themed around St. Patrick’s Day.

In the npm package, packs are accessed through insultPacks, insultPackList, and the individual named exports. In the web app, packs are managed through the Settings page. See Packs (package) or Settings (web app) for details.


Every documentation file in this project, organized by audience:

FileDescription
web-app-docs/web-overview.mdApp orientation and page directory.
web-app-docs/web-using-the-app.mdGenerating, browsing, sharing, and submitting insults.
web-app-docs/web-accounts-and-progress.mdAccounts, streaks, achievements, and the leaderboard.
web-app-docs/web-settings.mdContent filtering, packs, and weighting.
web-app-docs/web-secrets.mdEaster eggs and hidden features.
FileDescription
overview.mdPackage installation, quickstart, and structure.
types.mdTypeScript type and interface reference.
packs.mdThe insult pack system in depth.
api.mdFull API reference for every export.

ResourceURL
Web Appdemotivator.web.app
npm Packagenpmjs.com/package/demotivator
GitHubgithub.com/PorkyProductions/deMotivator
PorkyProductionsgithub.com/PorkyProductions

Licensed under the ISC License. Copyright 2026, PorkyProductions, and contributors.