Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .dev.vars.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NEXTJS_ENV=development
32 changes: 32 additions & 0 deletions .github/workflows/deploy-cloudflare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy to Cloudflare Workers

on:
push:
branches: [main]
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build and deploy
run: pnpm cf:deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
NEXT_PUBLIC_DATABUDDY_CLIENT_ID: ${{ secrets.NEXT_PUBLIC_DATABUDDY_CLIENT_ID }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
/.next/
/out/

# cloudflare / opennext
.open-next
.wrangler
.dev.vars*
!.dev.vars.example

# fumadocs-mdx generated
.source

Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,21 @@ Useful scripts:
| --- | --- |
| `pnpm dev` | Next.js dev server |
| `pnpm build` | Build registry + production app |
| `pnpm preview` | Build with OpenNext and preview in the Workers runtime |
| `pnpm cf:deploy` | Build with OpenNext and deploy to Cloudflare Workers |
| `pnpm registry:build` | Emit `public/r/*.json` from `registry/` |
| `pnpm test` | Run registry tests |
| `pnpm typecheck` | MDX + TypeScript check |

Stack: Next.js 16, React 19, Fumadocs, Tailwind CSS 4, shadcn/ui (Base UI).
Stack: Next.js 16, React 19, Fumadocs, Tailwind CSS 4, shadcn/ui (Base UI), Cloudflare Workers (OpenNext).

### Deploy to Cloudflare

```bash
pnpm cf:deploy
```

Connect the repo in the [Cloudflare dashboard](https://dash.cloudflare.com/) (Workers Builds) for Git-based deploys. Set `NEXT_PUBLIC_DATABUDDY_CLIENT_ID` under Build variables and secrets. Point `23rd.dev` DNS at the Worker when you're ready to cut over from Vercel.

## Contributing

Expand Down
Binary file added app/apple-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 0 additions & 45 deletions app/apple-icon.tsx

This file was deleted.

Binary file added app/opengraph-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 0 additions & 66 deletions app/opengraph-image.tsx

This file was deleted.

3 changes: 3 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { initOpenNextCloudflareForDev } from "@opennextjs/cloudflare"
import { createMDX } from "fumadocs-mdx/next"

const withMDX = createMDX()
Expand All @@ -20,3 +21,5 @@ const config = {
}

export default withMDX(config)

initOpenNextCloudflareForDev()
3 changes: 3 additions & 0 deletions open-next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { defineCloudflareConfig } from "@opennextjs/cloudflare"

export default defineCloudflareConfig()
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
"dev": "next dev",
"build": "pnpm registry:build && next build",
"start": "next start",
"preview": "opennextjs-cloudflare build && opennextjs-cloudflare preview",
"cf:deploy": "opennextjs-cloudflare build && opennextjs-cloudflare deploy",
"cf:upload": "opennextjs-cloudflare build && opennextjs-cloudflare upload",
"cf-typegen": "wrangler types --env-interface CloudflareEnv cloudflare-env.d.ts",
"lint": "eslint",
"format": "prettier --write \"**/*.{ts,tsx}\"",
"postinstall": "fumadocs-mdx",
Expand All @@ -17,6 +21,7 @@
"dependencies": {
"@base-ui/react": "^1.6.0",
"@databuddy/sdk": "^2.6.0",
"@opennextjs/cloudflare": "^1.20.2",
"@remixicon/react": "^4.9.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
Expand Down Expand Up @@ -45,6 +50,7 @@
"prettier": "^3.9.6",
"prettier-plugin-tailwindcss": "^0.8.1",
"tailwindcss": "^4.3.3",
"typescript": "^5.9.3"
"typescript": "^5.9.3",
"wrangler": "^4.119.0"
}
}
21 changes: 21 additions & 0 deletions patches/@opennextjs__aws@4.1.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/dist/build/copyTracedFiles.js b/dist/build/copyTracedFiles.js
index 9701b0401e987ee7cd696873af9d15b751580c52..7f8143b16ca34cbb0c032db48f2b8207390b40bc 100644
--- a/dist/build/copyTracedFiles.js
+++ b/dist/build/copyTracedFiles.js
@@ -225,7 +225,15 @@ File ${serverPath} does not exist
}
if (symlink) {
try {
- symlinkSync(symlink, to);
+ // On Windows, use junctions for directory links (no admin/Developer Mode).
+ // Plain symlinkSync falls back to type "file" when the target does not exist yet.
+ if (process.platform === "win32") {
+ const junctionTarget = path.resolve(path.dirname(to), symlink);
+ symlinkSync(junctionTarget, to, "junction");
+ }
+ else {
+ symlinkSync(symlink, to);
+ }
}
catch (e) {
if (e.code !== "EEXIST") {
Loading