What is MonaKiosk?
MonaKiosk is an Astro integration that adds paywall capabilities to your content site. It connects your Markdown/MDX content to Polar.sh, a developer-focused monetization platform, enabling you to sell access to premium content without building a custom backend.
The Problem
Astro excels at content-driven sites — blogs, documentation, educational platforms. But adding monetization is typically painful:
- Most payment solutions assume a complex backend
- Content paywalls require custom access control logic
- Managing products, customers, and entitlements is tedious
- You end up bolting external systems onto Astro rather than integrating naturally
What if monetization could feel native to Astro’s content-first approach?
The Solution
MonaKiosk makes paywalling as simple as adding a field to your frontmatter:
---
title: "Advanced TypeScript Patterns"
description: "Deep dive into advanced TypeScript techniques"
price: 999 # $9.99 in cents
---
That’s it. MonaKiosk handles:
- Product sync — Creates/updates Polar products at build time
- Access control — Middleware checks if the user has purchased
- Checkout flow — Redirects to Polar’s hosted checkout
- Preview generation — Shows teaser content to non-purchasers
- File delivery — Serves downloadable files to customers
Key Features
| Feature | Description |
|---|---|
| Content-native pricing | Price lives in frontmatter alongside your content |
| One-time & subscriptions | Support both pricing models |
| Grouped content | Sell courses where one purchase unlocks all chapters |
| Downloadable files | Attach PDFs, ZIPs, or any files to paywalled content |
| Custom templates | Override paywall and preview UI |
| Auth flexibility | Works standalone or with Better Auth, Auth.js, etc. |
How It Compares
| Approach | Pros | Cons |
|---|---|---|
| Custom backend | Full control | High effort, maintenance burden |
| Gumroad/Payhip | Easy setup | External to your site, no content integration |
| Stripe + custom code | Flexible | Requires building access control |
| MonaKiosk + Polar | Native Astro integration, minimal code | Tied to Polar ecosystem |
MonaKiosk is ideal when you want monetization that feels like a natural extension of Astro’s content collections.
Architecture Overview
flowchart LR
subgraph Your Site
A[Astro Content] --> B[MonaKiosk Integration]
B --> C[Middleware]
end
subgraph Polar.sh
D[Products]
E[Customers]
F[Checkout]
end
B -->|Build time sync| D
C -->|Runtime access check| E
C -->|Redirect| F
At build time, MonaKiosk scans your content for price fields and syncs products to Polar. At runtime, the middleware intercepts requests to paywalled content, checks access via Polar’s API, and either serves the full content or shows a preview with a purchase button.
What You’ll Build
Throughout this course, we’ll build a complete monetized content site with:
- Paywalled blog posts — Individual articles with one-time purchase
- Premium courses — Multi-chapter content with single purchase
- Downloadable resources — Files delivered to customers
Let’s start by installing MonaKiosk.