Skip to content
Open
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
26 changes: 26 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Agent Guidelines for Redot Engine Website

## Commands

- **Build**: `npm run build`
- **Lint**: `npm run lint` (use `npm run lint:fix` to auto-fix)
- **Format**: `npm run format` (use `npm run format:fix` to auto-fix)
- **Dev**: `npm run dev` (uses Turbopack)
- **Test**: No test framework configured - check for test files before adding

## Code Style

- **TypeScript**: Strict mode enabled, use `@/*` path aliases
- **Imports**: Use absolute imports with `@/` prefix (e.g., `@/components/ui/button`)
- **Formatting**: Prettier with double quotes, semicolons, trailing commas (ES5)
- **Components**: Use shadcn/ui components from `@/components/ui`
- **Styling**: Tailwind CSS with custom design tokens
- **Error Handling**: `@typescript-eslint/no-explicit-any` warns - prefer proper typing
- **Commit Messages**: Use conventional commits (feat, fix, docs, etc.)

## Architecture

- Next.js 15 with App Router
- Sanity CMS for content
- Internationalization with next-intl
- Deploy on Cloudflare with OpenNext
2 changes: 2 additions & 0 deletions app/(admin)/studio/[[...tool]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export const metadata: Metadata = {
},
};

export const runtime = "nodejs";

export default function StudioPage() {
return <NextStudio config={config} />;
}
2 changes: 2 additions & 0 deletions app/(main)/blog/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ export async function generateMetadata(props: {
};
}

export const runtime = "nodejs";

export default async function Article({
params,
}: {
Expand Down
2 changes: 2 additions & 0 deletions app/(main)/blog/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ export const metadata: Metadata = {
title: "Blog",
};

export const runtime = "nodejs";

export default async function Blog() {
const tags = await getUsedTags();

Expand Down
2 changes: 2 additions & 0 deletions app/(main)/community/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ export const metadata: Metadata = {
title: "Community",
};

export const runtime = "nodejs";

export default function Layout({
children,
}: Readonly<{
Expand Down
2 changes: 2 additions & 0 deletions app/(main)/contact/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ export const metadata: Metadata = {
title: "Contact",
};

export const runtime = "nodejs";

export default function Layout({
children,
}: Readonly<{
Expand Down
2 changes: 2 additions & 0 deletions app/(main)/cookie-settings/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ export const metadata: Metadata = {
title: "Cookie Settings",
};

export const runtime = "nodejs";

export default function Layout({
children,
}: Readonly<{
Expand Down
2 changes: 2 additions & 0 deletions app/(main)/download/[platform]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export async function generateMetadata(props: {
};
}

export const runtime = "nodejs";

export default async function DownloadPlatform({
params,
}: {
Expand Down
2 changes: 2 additions & 0 deletions app/(main)/download/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { useEffect } from "react";
import { detect } from "detect-browser";
import { platformMapping } from "@/constants/platformMapping";

export const runtime = "nodejs";

export default function Download() {
const router = useRouter();

Expand Down
2 changes: 2 additions & 0 deletions app/(main)/licenses/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ export const metadata: Metadata = {
title: "Licenses",
};

export const runtime = "nodejs";

export default function Layout({
children,
}: Readonly<{
Expand Down
2 changes: 2 additions & 0 deletions app/(main)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ const Start = dynamic(() =>
import("@/components/sections/landing/Start").then((mod) => mod.Start)
);

export const runtime = "nodejs";

export default function Landing() {
const t = useTranslations("textRevealSection");

Expand Down
2 changes: 2 additions & 0 deletions app/(main)/privacy/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ export const metadata: Metadata = {
title: "Privacy",
};

export const runtime = "nodejs";

export default function Layout({
children,
}: Readonly<{
Expand Down
2 changes: 2 additions & 0 deletions app/(main)/settings/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ export const metadata: Metadata = {
title: "Settings",
};

export const runtime = "nodejs";

export default function Layout({
children,
}: Readonly<{
Expand Down
2 changes: 2 additions & 0 deletions app/(main)/terms/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ export const metadata: Metadata = {
title: "Terms",
};

export const runtime = "nodejs";

export default function Layout({
children,
}: Readonly<{
Expand Down
2 changes: 1 addition & 1 deletion app/api/download/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import axios from "axios";
const GITHUB_OWNER = "Redot-Engine";
const GITHUB_REPO = "redot-engine";

export const runtime = "edge";
export const runtime = "nodejs";

function getAssetPattern(
platform: string,
Expand Down
2 changes: 1 addition & 1 deletion app/api/feed.xml/route.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NextResponse } from "next/server";
import { getPosts } from "@/lib/blog";

export const runtime = "edge";
export const runtime = "nodejs";

export async function GET() {
const posts = await getPosts();
Expand Down
2 changes: 1 addition & 1 deletion app/api/mirrorlists/[mirrorlist]/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NextRequest, NextResponse } from "next/server";

export const runtime = "edge";
export const runtime = "nodejs";

export async function GET(
req: NextRequest,
Expand Down
2 changes: 1 addition & 1 deletion app/not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { links } from "@/constants/links";
import { useRouter } from "next/navigation";
import { SectionLink } from "@/components/SectionLink";

export const runtime = "edge";
export const runtime = "nodejs";

export default function NotFound() {
const router = useRouter();
Expand Down
250 changes: 175 additions & 75 deletions bun.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const cspHeader = `
`;

const nextConfig: NextConfig = {
output: "standalone",
images: {
remotePatterns: [
{
Expand Down
3 changes: 1 addition & 2 deletions open-next.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { defineCloudflareConfig } from "@opennextjs/cloudflare";
import r2IncrementalCache from "@opennextjs/cloudflare/overrides/incremental-cache/r2-incremental-cache";

export default defineCloudflareConfig({
incrementalCache: r2IncrementalCache,
// No incremental cache - uses memory
});
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,34 +30,34 @@
},
"dependencies": {
"@next/third-parties": "15.1.3",
"@opennextjs/cloudflare": "^1.3.1",
"@radix-ui/react-accordion": "^1.2.2",
"@radix-ui/react-avatar": "^1.1.2",
"@radix-ui/react-dialog": "^1.1.4",
"@radix-ui/react-dropdown-menu": "^2.1.4",
"@radix-ui/react-label": "^2.1.1",
"@radix-ui/react-popover": "^1.1.4",
"@radix-ui/react-radio-group": "^1.2.2",
"@radix-ui/react-separator": "^1.1.1",
"@radix-ui/react-slot": "^1.1.0",
"@opennextjs/cloudflare": "^1.11.0",
"@radix-ui/react-accordion": "^1.2.12",
"@radix-ui/react-avatar": "^1.1.10",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-dropdown-menu": "^2.1.16",
"@radix-ui/react-label": "^2.1.7",
"@radix-ui/react-popover": "^1.1.15",
"@radix-ui/react-radio-group": "^1.3.8",
"@radix-ui/react-separator": "^1.1.7",
"@radix-ui/react-slot": "^1.2.3",
"@sanity/image-url": "^1.1.0",
"@sanity/vision": "3",
"@tabler/icons-react": "^3.22.0",
"axios": "^1.7.9",
"axios": "^1.12.2",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

syntax: axios version 1.12.2 does not exist - the latest version is 1.7.x. This appears to be a typo (likely meant 1.7.12 or similar)

Suggested change
"axios": "^1.12.2",
"axios": "^1.7.12",
Prompt To Fix With AI
This is a comment left during a code review.
Path: package.json
Line: 46:46

Comment:
**syntax:** axios version 1.12.2 does not exist - the latest version is 1.7.x. This appears to be a typo (likely meant 1.7.12 or similar)

```suggestion
    "axios": "^1.7.12",
```

How can I resolve this? If you propose a fix, please make it concise.

"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"detect-browser": "^5.3.0",
"lenis": "^1.1.20",
"lucide-react": "^0.511.0",
"mini-svg-data-uri": "^1.4.4",
"motion": "^12.0.5",
"motion": "^12.23.24",
"next": "15.1.3",
"next-intl": "^3.26.3",
"next-sanity": "^9.8.30",
"next-themes": "^0.4.3",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"react-flagpack": "^2.0.6",
"react-intersection-observer": "^9.13.1",
"remark": "^15.0.1",
Expand Down Expand Up @@ -85,6 +85,6 @@
"tailwind-scrollbar": "^3.1.0",
"tailwindcss": "^3.4.1",
"typescript": "^5",
"wrangler": "^4.22.0"
"wrangler": "^4.43.0"
}
}
2 changes: 1 addition & 1 deletion sanity/lib/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export const client = createClient({
projectId,
dataset,
apiVersion,
useCdn: true, // Set to false if statically generating pages, using ISR or tag-based revalidation
useCdn: process.env.NODE_ENV === "production", // Only use CDN in production
});
14 changes: 1 addition & 13 deletions wrangler.jsonc
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
{
"$schema": "node_modules/wrangler/config-schema.json",
"main": ".open-next/worker.js",
"name": "main-website",
"name": "redot-website",
"compatibility_date": "2025-03-25",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"assets": {
"directory": ".open-next/assets",
"binding": "ASSETS",
},
"services": [
{
"binding": "WORKER_SELF_REFERENCE",
"service": "main-website",
},
],
"r2_buckets": [
{
"binding": "NEXT_INC_CACHE_R2_BUCKET",
"bucket_name": "cache",
},
],
}