chore: init cloudflare

This commit is contained in:
Maze Winther 2026-03-26 13:54:36 +01:00
parent 722dcdd88f
commit 6dd8191f4b
10 changed files with 824 additions and 6 deletions

4
.gitignore vendored
View File

@ -17,4 +17,6 @@ bun.lockb
.content-collections
# Twiggy
.cursor/
.cursor/
.open-next

View File

@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
import "./.next/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

View File

@ -1,6 +1,9 @@
import type { NextConfig } from "next";
import { withBotId } from "botid/next/config";
import { withContentCollections } from "@content-collections/next";
import { initOpenNextCloudflareForDev } from "@opennextjs/cloudflare";
initOpenNextCloudflareForDev();
const nextConfig: NextConfig = {
turbopack: {

View File

@ -7,6 +7,8 @@
"dev": "next dev --turbopack",
"build": "next build",
"start": "next start",
"preview": "opennextjs-cloudflare build && opennextjs-cloudflare preview",
"deploy": "opennextjs-cloudflare build && opennextjs-cloudflare deploy",
"lint": "biome check src/",
"lint:fix": "biome check src/ --write",
"format": "biome format src/ --write",
@ -22,6 +24,7 @@
"@huggingface/transformers": "^3.8.1",
"@opencut/env": "workspace:*",
"@opencut/ui": "workspace:*",
"@opennextjs/cloudflare": "^1.17.3",
"@radix-ui/react-accordion": "^1.2.12",
"@radix-ui/react-checkbox": "^1.3.3",
"@radix-ui/react-dialog": "^1.1.15",
@ -35,7 +38,6 @@
"@upstash/ratelimit": "^2.0.6",
"@upstash/redis": "^1.35.4",
"better-auth": "^1.2.7",
"botid": "^1.4.2",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.0.0",
@ -48,6 +50,7 @@
"lucide-react": "^0.562.0",
"mediabunny": "^1.29.1",
"motion": "^12.18.1",
"botid": "^1.4.2",
"nanoid": "^5.1.5",
"next": "16.1.3",
"next-themes": "^0.4.4",
@ -95,6 +98,7 @@
"raw-loader": "^4.0.2",
"sharp": "^0.34.5",
"tailwindcss": "^4.2.1",
"typescript": "^5.8.3"
"typescript": "^5.8.3",
"wrangler": "^4.77.0"
}
}

2
apps/web/public/_headers Normal file
View File

@ -0,0 +1,2 @@
/_next/static/*
Cache-Control: public,max-age=31536000,immutable

17
apps/web/wrangler.jsonc Normal file
View File

@ -0,0 +1,17 @@
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "opencut",
"main": ".open-next/worker.js",
"compatibility_date": "2025-04-01",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"assets": {
"directory": ".open-next/assets",
"binding": "ASSETS"
},
"services": [
{
"binding": "WORKER_SELF_REFERENCE",
"service": "opencut"
}
]
}

769
bun.lock

File diff suppressed because it is too large Load Diff

View File

@ -9,6 +9,8 @@
"dev:web": "turbo run dev --filter=@opencut/web",
"build:web": "turbo run build --filter=@opencut/web",
"dev:tools": "turbo run dev --filter=@opencut/tools",
"preview:web": "turbo run preview --filter=@opencut/web",
"deploy:web": "turbo run deploy --filter=@opencut/web",
"build:tools": "turbo run build --filter=@opencut/tools",
"start:tools": "turbo run start --filter=@opencut/tools",
"lint:web": "biome lint apps/web/src --max-diagnostics=1000",

View File

@ -29,6 +29,13 @@
"persistent": true,
"cache": false
},
"preview": {
"persistent": true,
"cache": false
},
"deploy": {
"cache": false
},
"lint": {
"dependsOn": ["^lint"],
"cache": false

16
wrangler.jsonc Normal file
View File

@ -0,0 +1,16 @@
{
"name": "opencut",
"main": ".open-next/worker.js",
"compatibility_date": "2025-04-01",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"assets": {
"directory": ".open-next/assets",
"binding": "ASSETS",
},
"services": [
{
"binding": "WORKER_SELF_REFERENCE",
"service": "opencut",
},
],
}