NestJS backend infrastructure for browser extensions

Monetize your extensions
from a single platform

PolarKit unifies Firebase Auth, Polar.sh, and Extension features into one production-ready monorepo — so you can ship premium extensions without rebuilding the plumbing.

Auth status
FirebaseActive
Polar.shConnected
CRX WebstoreIntegrated
Webhook Events
order.createOK
subscription.updatedOK
subscription.createdOK

Trusted partners & technologies

NNestJS 🔥 Firebase ⚡ Polar 🟢 Vue 3 🐳 Docker ⚡ TurboRepo 🔷 TypeScript 📦 pnpm 🔵 Chrome API 🟩 Nginx 🚀 Dokploy NNestJS 🔥 Firebase ⚡ Polar.sh 🟢 Vue 3 🐳 Docker ⚡ TurboRepo 🔷 TypeScript 📦 pnpm 🔵 Chrome API 🟩 Nginx 🚀 Dokploy
Features

Some of our
exclusive features

Stand out in the developer ecosystem — PolarKit gives you high-quality, production-grade modules that ship fast and scale confidently.

🔑
Firebase Auth for extensions
Token verification, real-time Firestore sync, and secure access control — wired directly to Chrome extension content scripts.
Auth tokens Firestore Real-time
Token statusVerified
User IDuid_8f2a...
Extensioncrx_beta
💳
Efficiently handle payment webhooks
Typed Polar webhook handlers for subscription events, invoice processing, and payment method changes with zero boilerplate.
Subscriptions Invoices
customer.subscriptionhandled
invoice.paidhandled
payment.failedqueued
🎯
Remote DOM Selector Store
Store and manage CSS selectors in the backend. Your extension fetches the latest selectors at runtime — update them instantly without resubmitting to the Chrome Web Store.
No Re-upload Firestore Sync Hot Config
  • Selectors versioned and served from Firestore in real time
  • Extension resolves the latest config on each activation
  • Fix broken selectors when a target site changes its DOM — no store review
  • Per-site and per-user selector overrides supported
📊
Vue 3 Admin Dashboard
A built-in dashboard workspace for managing integrations, API keys, Chrome Webstore settings, and subscriber data at a glance.
MRR$6,890
Active licenses1,892
ProvidersPolar
How it works

Backend infrastructure with flexible licensing,
and payment routing

PolarKit is structured as a Yarn workspace monorepo. Every integration is a self-contained NestJS module you can enable independently.

01
Firebase handles identity
JWT tokens from Chrome's identity API are verified server-side, giving you secure user sessions across all your extension endpoints.
02
Payment events are routed
Polar.sh webhooks land in typed NestJS handlers that update license state in Firestore automatically.
03
Extensions check access in real time
Your Chrome extension calls a single endpoint to verify active licenses no client-side secrets, no polling.
Open an account →
Module Overview All modules active
🔥
Firebase Auth
Token verification · Firestore sync · Access control
💳
Polar Module
Webhooks · Subscriptions · Invoice processing
Polar.sh Module
Funding · Sponsorships · Community engagement
🧩
Chrome Extension API
Secure endpoints · Auth · Webstore abuse prevention
Data analytics

All your integrations,
one backend

Choose the monetization stack that fits your business. Swap or combine providers with zero infrastructure changes.

🔥
Firebase
Auth, Firestore, real-time sync for extension users
Live
💳
Polar
Webhooks, subscriptions, and open-source monetization
Live
Polar.sh
Open-source funding and community sponsorship
Live
🏪
Chrome Webstore
Prevents fake extension submissions to the platform
Coming soon
🔗
HubSpot CRM
Sync subscriber data and manage customer lifecycle
Coming soon
📋
Centralized Logs
Unified logging across all extension services
Coming soon
🗄️
Query Selector Storage
Efficient DOM selector storage and retrieval
Coming soon
Getting started

Up and running
in minutes

Clone, configure, and launch. The monorepo handles everything else.

1
Clone the repository
Fork or clone from GitHub, then install all workspace dependencies with a single command.
git clone github.com/dojoVader/polarkit docker compose up --build --force-recreate --watch
2
Configure your environment
Add Firebase credentials and Polar.sh API keys to the root .env file.
cp .env.example .env
3
Launch outside docker
Start the NestJS API in watch mode and spin up the Vue 3 dashboard simultaneously.
cd apps/backend && yarn run start:debug cd apps/spa && yarn run start
webhook.controller.ts
@Post('webhook')
@UseInterceptors(PolarWebhookLoggerInterceptor)
async handleWebhook(
  @Req() req: Request,
  @Headers() headers: Record<string, string>,
  @Body() payload: Record<string, unknown>,
) {
  const secret = this.config.get<string>('POLAR_WEBHOOK_SECRET') ?? '';
  const rawBody: Buffer =
    (req as Request & { rawBody?: Buffer }).rawBody ??
    Buffer.from(JSON.stringify(payload));

  try {
    await this.polarEventHandler.handleEvent(rawBody, headers, secret);
  } catch (err) {
    if (err instanceof WebhookVerificationError) {
      throw new BadRequestException('Invalid webhook signature');
    }
    throw err;
  }

  const eventType = (payload.type as string) ?? 'unknown';
  const environment = this.config.get('POLAR_ENVIRONMENT');
  await this.polarService.createPaymentRecord(
    eventType,
    payload,
    environment ?? 'Test',
  );

  return { received: true };
}
Built by

The team at Retani Consults

retaniconsults.com

OA
Okeowo Aderemi
Lead Engineer
@qtguru
AA
Adedayo Adegbola
Frontend Dev
@adedadyo
LO
Lawson Omoregbee
Backend Engineer
@lawsonom
Screenshots

See it in action

A visual tour of PolarKit's dashboard, webhooks, and developer experience.

PolarKit screenshot
Dashboard overview
PolarKit screenshot
Webhook events
PolarKit screenshot
Auth flow
PolarKit screenshot
Extension integration

Start shipping
premium extensions today

PolarKit is MIT-licensed and completely free. Fork it, extend it, make it yours.

Open on GitHub Read the Docs
Deployment

Best deployed
with Dokploy

PolarKit is built to run seamlessly on Dokploy — the open-source deployment platform that gives you the power of Heroku without the bill. One-click deploys, zero server headaches.

  • Containerised NestJS API & Vue SPA deploy in one config
  • Automatic SSL, reverse-proxy via Nginx — zero config
  • Environment variable management built-in
  • Self-host on any VPS for full data ownership
Get Dokploy
Dokploy deployment dashboard