Overview

thunder-core is the official Thunder plugin adding auth, RBAC, multi-tenancy, OAuth2/OIDC, a double-entry wallet, API keys, email, and more.

thunder-core is the official Thunder plugin. It turns the minimal framework into a batteries-included backend by adding authentication, an OAuth2 / OpenID Connect provider, role-based access control (RBAC), multi-tenancy, a double-entry wallet/ledger, API keys, transactional email, ImageKit upload auth, and database-backed environment variables.

It installs like any other plugin:

deno task add:plugin -n Huruf-Tech/thunder-core

What's Included

Import Path Convention

Once installed, thunder-core lives under plugins/Huruf-Tech/thunder-core/. Its routes, hooks, schemas, lib, utils, scripts, and public files are copied into your project and its routes/hooks are auto-discovered and merged into the app.

Consumer-facing utilities are imported via the @/ alias:

import { withAuthSession } from "@/plugins/Huruf-Tech/thunder-core/utils/withAuthSession.ts";
import { withTenant } from "@/plugins/Huruf-Tech/thunder-core/utils/withTenant.ts";
import { Wallet } from "@/plugins/Huruf-Tech/thunder-core/lib/wallet.ts";

Source files are the authoritative spec. This documentation describes behavior, concepts, and gotchas that are not obvious from the code. For exact routes, request/response shapes, and model fields, read the referenced source files inside plugins/Huruf-Tech/thunder-core/ - they are always the up-to-date source of truth.

Next Steps

Install the plugin, then run its setup lifecycle to create indexes and seed the default RBAC roles before you start building.


On this page