Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
2e0074b
Set web container width to 72rem
maxktz Jun 2, 2026
8ca8a00
Update dark web theme tokens
maxktz Jun 2, 2026
a9902cd
Use GitHub Dark for code highlighting
maxktz Jun 2, 2026
0cb5549
Remove providers docs section
maxktz Jun 2, 2026
5bc5110
Add Aura Shiki theme
maxktz Jun 2, 2026
0dc1583
Add testimonials section components
maxktz Jun 3, 2026
a1a4878
chore: update DESIGN.md
maxktz Jun 3, 2026
347e1dc
chore: update theme
maxktz Jun 3, 2026
8a067fc
chore: update version text in docs
maxktz Jun 3, 2026
53b05d0
Refine button pressed state
maxktz Jun 3, 2026
0474a6d
Update docs copy page actions
maxktz Jun 3, 2026
e2e57d3
Update site navigation and section chrome
maxktz Jun 3, 2026
47b0324
Refine marketing hero
maxktz Jun 3, 2026
f66fb3e
Refine marketing sections
maxktz Jun 3, 2026
9b628b2
Update homepage feedback content
maxktz Jun 3, 2026
d9d33ff
Stabilize docs copy button width
maxktz Jun 3, 2026
267b6c6
Align docs TOC path lines
maxktz Jun 3, 2026
7299462
Update Fumadocs dependencies
maxktz Jun 3, 2026
13333f9
Adjust docs TOC footer progress
maxktz Jun 3, 2026
6c380a9
Polish docs CTA controls
maxktz Jun 3, 2026
27d343f
Replace web icons with Remix icons
maxktz Jun 3, 2026
a025704
Use Remix icons for Fumadocs chrome
maxktz Jun 3, 2026
4ab1442
feat: update agents.md
maxktz Jun 3, 2026
8e85cfe
Fix mono glyph shaping
maxktz Jun 3, 2026
6c25f20
feat(web): add package manager code blocks
maxktz Jun 3, 2026
3e99b2e
feat(web): add icons to links menu
maxktz Jun 3, 2026
5535e8d
chore(web): polish docs sidebar icons
maxktz Jun 3, 2026
0d79e61
fix(web): avoid theme switcher icon flash
maxktz Jun 3, 2026
d20c03b
chore(web): format readme code snippet
maxktz Jun 3, 2026
8c0cb74
fix(web): align titled code block header height
maxktz Jun 3, 2026
5248c76
chore: update docs
maxktz Jun 4, 2026
2ebc3dd
feat: update docs content layout
maxktz Jun 4, 2026
f631859
Fix docs step heading styles
maxktz Jun 4, 2026
17e7968
docs: use explicit step titles
maxktz Jun 4, 2026
b7e51b4
docs: update package manager command defaults
maxktz Jun 4, 2026
31924a4
docs: tune page shell styles
maxktz Jun 4, 2026
a41142f
docs: add custom sidebar layout
maxktz Jun 4, 2026
ac95d05
docs: use fumadocs search provider
maxktz Jun 4, 2026
fe6e171
docs: add toc preview page
maxktz Jun 4, 2026
43541e4
docs: refine mobile docs navigation
maxktz Jun 4, 2026
0703701
docs: preserve sidebar width when collapsed
maxktz Jun 4, 2026
6749f76
docs: fix docs header spacing
maxktz Jun 4, 2026
3607805
docs: align page and toc top padding
maxktz Jun 4, 2026
4b10854
docs: animate docs sidebar column changes
maxktz Jun 4, 2026
b741544
fix docs static rendering and toc stability
maxktz Jun 5, 2026
7e37ed3
feat: add docs hidden trigger
maxktz Jun 5, 2026
c10d5a3
add animated docs sidebar island
maxktz Jun 5, 2026
a348f6a
add docs sidebar hotkey
maxktz Jun 5, 2026
5965ecf
refactor docs mdx rendering
maxktz Jun 5, 2026
55d2639
highlight package manager commands with shiki
maxktz Jun 5, 2026
120dd4e
match docs description text color
maxktz Jun 5, 2026
ee607b4
remove payment providers docs page
maxktz Jun 5, 2026
34734e1
Flatten docs structure
maxktz Jun 5, 2026
5f09386
Clean up docs heading and link formatting
maxktz Jun 5, 2026
451f4fc
chore: update AGENTS.md
maxktz Jun 5, 2026
fe927f7
feat(docs): add sidebar footer controls
maxktz Jun 5, 2026
8438e6c
fix(docs): cut out bun icon face
maxktz Jun 5, 2026
6bd54f6
docs: remove toc preview page
maxktz Jun 5, 2026
c853ad1
docs: hide guides category
maxktz Jun 5, 2026
95209e6
feat(web): add blog placeholder
maxktz Jun 5, 2026
d341f27
feat(web): add sponsor placeholder
maxktz Jun 5, 2026
cb670f2
fix(web): redirect sponsors route
maxktz Jun 5, 2026
49da93b
fix(web): align mobile brand header
maxktz Jun 5, 2026
d4ab9f5
chore: fix github button mr in header
maxktz Jun 5, 2026
4cb7297
feat(web): add footer theme toggle
maxktz Jun 5, 2026
1b5e277
chore: update color palette
maxktz Jun 6, 2026
6648a55
style(docs): hide code highlight border
maxktz Jun 6, 2026
e85576f
fix: fix hero code block display
maxktz Jun 6, 2026
ed0a253
style(web): refine demo code surfaces
maxktz Jun 6, 2026
fc8b962
style(web): soften dark input color
maxktz Jun 6, 2026
b19a015
fix(web): reserve vertical scrollbar space
maxktz Jun 6, 2026
41e3b9e
fix: docs search fix maring
maxktz Jun 6, 2026
fff1ce0
fix(web): align mobile header spacing
maxktz Jun 6, 2026
c28ecd7
style(web): align mobile section padding
maxktz Jun 6, 2026
ddccd8c
feat: update installation doc
maxktz Jun 6, 2026
35e49c5
fix(web): address PR review feedback
maxktz Jun 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,25 @@ APIs.
- Keep JSDoc strings short and useful
- while writing JSDoc follow it's standards, such as tags

## References

If you need to inspect source code of libraries or packages, prefer inspecting
cloned source repositories when available, rather than library dist files.

These directories already contain source checkouts for some packages:

- `~/ref/fumadocs` - fumadocs framework / package.

## Behavior

- When asked opinion questions, answer only. Do not edit code unless explicitly asked.
- Never commit, push, or run database migrations unless explicitly asked.
- Never create a partial commit from files that also contain unstaged changes.
If a requested commit overlaps dirty files, either commit the full intended
change or stop and ask. Do not rely on hooks stashing/hiding unstaged changes.
- If a commit hook fails while hiding or restoring unstaged changes, stop
immediately and recover the user's unstaged work before retrying or committing
anything.
- When generating migrations, always provide a name.
- Never edit past migrations; create a new migration instead.
- Never run "deploy" scripts to test anything, only if explicitly asked
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ description: Project initialization and plan management from the command line.

PayKit includes a CLI tool for project setup, database migrations, and plan syncing. Install it once and use it throughout the project lifecycle.

## `paykitjs init`
## paykitjs init

<PackageRun command="paykitjs init" />
```bash
npx paykitjs init
```

An interactive setup wizard that scaffolds everything you need to get started. It configures Stripe, then generates:

Expand All @@ -17,9 +19,11 @@ An interactive setup wizard that scaffolds everything you need to get started. I

Run this once when starting a new project.

## `paykitjs push`
## paykitjs push

<PackageRun command="paykitjs push" />
```bash
npx paykitjs push
```

The command you'll run most often. It does two things:

Expand All @@ -42,9 +46,11 @@ paykitjs push -y && next build

This is similar to how you'd run database migrations on deploy. The `-y` flag skips the confirmation prompt.

## `paykitjs status`
## paykitjs status

<PackageRun command="paykitjs status" />
```bash
npx paykitjs status
```

Validates your entire PayKit setup without making any changes. Useful when debugging a broken environment. It checks:

Expand All @@ -56,7 +62,9 @@ Validates your entire PayKit setup without making any changes. Useful when debug

Pass `--throw` to exit with code 1 on failures, useful for CI pipelines:

<PackageRun command="paykitjs status --throw" />
```bash
npx paykitjs status --throw
```

## Telemetry

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ import type { paykit } from "@/server/paykit";
export const paykitClient = createPayKitClient<typeof paykit>();
```

The client resolves the current customer automatically on each request. You need `identify` configured on your server instance for this to work. See [customer identification](/docs/concepts/customers#customer-identification-client) for details.
The client resolves the current customer automatically on each request. You need `identify` configured on your server instance for this to work. See [customer identification](/docs/customers#customer-identification-client) for details.

## Available methods

The client exposes `subscribe` and `customerPortal`. Neither requires a `customerId` since it's resolved from the incoming request via `identify`.

## `subscribe`
## subscribe

Works the same as the server-side `subscribe`, but without `customerId`. Returns `{ paymentUrl }`.

Expand All @@ -44,7 +44,7 @@ Works the same as the server-side `subscribe`, but without `customerId`. Returns
</Button>
```

## `customerPortal`
## customerPortal

Opens the provider's customer portal. Returns `{ url }`.

Expand Down Expand Up @@ -72,4 +72,4 @@ You can also pass an absolute URL like `https://example.com/custom`.

## Type safety

The client infers available plan IDs directly from your server instance type. If you pass an invalid `planId`, TypeScript catches it at compile time. See [TypeScript](/docs/concepts/typescript) for more on how type inference works across the stack.
The client infers available plan IDs directly from your server instance type. If you pass an invalid `planId`, TypeScript catches it at compile time. See [TypeScript](/docs/typescript) for more on how type inference works across the stack.
16 changes: 0 additions & 16 deletions apps/web/content/docs/concepts/meta.json

This file was deleted.

41 changes: 0 additions & 41 deletions apps/web/content/docs/concepts/payment-providers.mdx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ PayKit creates tables prefixed with `paykit_`. The key ones are:

`paykitjs push` applies any pending migrations. Run it on initial setup and whenever you update your plan configuration.

<PackageRun command="paykitjs push" />
```bash
npx paykitjs push
```

## What's synced

Expand Down
4 changes: 0 additions & 4 deletions apps/web/content/docs/flows/meta.json

This file was deleted.

4 changes: 0 additions & 4 deletions apps/web/content/docs/get-started/meta.json

This file was deleted.

4 changes: 0 additions & 4 deletions apps/web/content/docs/guides/meta.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
---
title: Installation
description: Install PayKit, configure your billing instance, and mount the route handler in your app.
description: how to install and configure PayKit in your app
---

## Steps

<Steps>

<Step>
## Install the package
<StepTitle>Install the package</StepTitle>

Let's start by adding PayKit to your project:



<PackageInstall package="paykitjs" />

<Callout type="info">
If you're using a separate client and server setup, make sure to install
the package in both apps.
</Callout>
```bash
npm install paykitjs
```

</Step>

<Step>
## Create the PayKit instance
<StepTitle>Create the PayKit instance</StepTitle>

Create a file named `paykit.ts` anywhere in your app.

Expand All @@ -42,7 +39,7 @@ export const paykit = createPayKit({
</Step>

<Step>
## Configure Stripe
<StepTitle>Configure Stripe</StepTitle>

PayKit uses Stripe for billing. Pass your Stripe keys directly to the PayKit instance.

Expand All @@ -59,7 +56,7 @@ export const paykit = createPayKit({
</Step>

<Step>
## Configure database
<StepTitle>Configure database</StepTitle>

PayKit needs a database to store billing state, such as subscriptions. You can create a separate database, or simply plug it into the app's own db.

Expand All @@ -77,13 +74,13 @@ export const paykit = createPayKit({
```

<Callout type="info">
It works by creating a few tables prefixed with `paykit_`. You can learn more [here](/docs/concepts/database).
It works by creating a few tables prefixed with `paykit_`. You can learn more [here](/docs/database).
</Callout>

</Step>

<Step>
## Mount request handler
<StepTitle>Mount request handler</StepTitle>

To handle webhooks and client API requests, you need to set up a request handler on your server.

Expand Down Expand Up @@ -135,7 +132,7 @@ Create a new file or route in your framework's designated catch-all route handle
</Step>

<Step>
## Create client instance
<StepTitle>Create client instance</StepTitle>

The client-side library helps you interact with the server. PayKit client sdk suitable for almost all modern frameworks, including React.

Expand Down Expand Up @@ -167,7 +164,7 @@ export const paykit = createPayKit({
</Step>

<Step>
## Define your products
<StepTitle>Define your products</StepTitle>

Optionally. PayKit provides a code-first way to create your plans, and a very useful usage billing with `track()` and `report()` out of the box.

Expand Down Expand Up @@ -221,21 +218,21 @@ export const paykit = createPayKit({
</Step>

<Step>
## Push changes to DB
<StepTitle>Push changes to DB</StepTitle>

PayKit includes a CLI tool to keep your database in sync with your configuration.

<PackageRun command="paykitjs push" />
```bash
npx paykitjs push
```

<Callout>
This applies database migrations and syncs your plan definitions to provider's
products.
<br/>Run it once on setup, and every time after you change your products configuration.
<br/>For production deployments, see the [CLI reference](/docs/concepts/cli#production-usage).
<br/>For production deployments, see the [CLI reference](/docs/cli#production-usage).
</Callout>

</Step>

__You're now ready to use PayKit in your app!__ 🚀

</Steps>
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@ PayKit is an embedded Stripe billing framework for TypeScript apps. It provides
PayKit aims to be a complete billing framework. It provides a wide range of features out of the box and allows you to extend it with plugins.

<Features />

...and more to come!
24 changes: 16 additions & 8 deletions apps/web/content/docs/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,24 @@
"root": true,
"pages": [
"---Get Started---",
"get-started",
"introduction",
"installation",
"quickstart",
"---Concepts---",
"concepts",
"plans-and-features",
"customers",
"subscriptions",
"entitlements",
"webhook-events",
"database",
"plugins",
"client",
"cli",
"typescript",
"---Flows---",
"flows",
"---Providers---",
"providers",
"subscription-billing",
"metered-usage",
"---Plugins---",
"plugins",
"---Guides---",
"guides"
"dashboard"
]
}
Loading
Loading