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
14 changes: 14 additions & 0 deletions .devcontainer/devcontainer-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"features": {
"ghcr.io/devcontainers-extra/features/go-task:1": {
"version": "1.0.6",
"resolved": "ghcr.io/devcontainers-extra/features/go-task@sha256:4d1db153919976cadd3209ca05d655a761a01707767716994dad677b4538dc1b",
"integrity": "sha256:4d1db153919976cadd3209ca05d655a761a01707767716994dad677b4538dc1b"
},
"ghcr.io/devcontainers/features/node:2": {
"version": "2.0.0",
"resolved": "ghcr.io/devcontainers/features/node@sha256:fedd4c11f7adfb64283b578dddc7da906728daa25fa293351c9d913231acf12f",
"integrity": "sha256:fedd4c11f7adfb64283b578dddc7da906728daa25fa293351c9d913231acf12f"
}
}
}
5 changes: 3 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
"features": {
"ghcr.io/devcontainers-extra/features/go-task:1": {},
"ghcr.io/devcontainers/features/node:2": {
"version": "25.9.0"
"version": "25.9.0",
"pnpm": true
}
},
"postCreateCommand": "npm install -g pnpm@11.5.0 && pnpm install --frozen-lockfile",
"postCreateCommand": "pnpm install --frozen-lockfile",
"customizations": {
"vscode": {
"extensions": [
Expand Down
13 changes: 10 additions & 3 deletions .devcontainer/nginx/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,24 @@ server {
listen 80;
server_name _;

resolver 127.0.0.11 valid=10s ipv6=off;
resolver_timeout 5s;

set $cms_upstream devcontainer:3000;
set $imgproxy_upstream imgproxy:8080;
set $rustfs_upstream rustfs:9000;

location ~ ^/cdn/image/relative/(16|32|48|64|96|128|256|384|450|530|640|750|828|1080|1200|1920|2048|3840)/(.*)$ {
proxy_pass http://imgproxy:8080/unsafe/width:$1/plain/http://devcontainer:3000/$2$is_args$args;
proxy_pass http://$imgproxy_upstream/unsafe/width:$1/plain/http://$cms_upstream/$2$is_args$args;
}

location ~ ^/cdn/image/s3/(16|32|48|64|96|128|256|384|450|530|640|750|828|1080|1200|1920|2048|3840)/(.*)$ {
proxy_pass http://imgproxy:8080/unsafe/width:$1/plain/http://rustfs:9000/cms/$2$is_args$args;
proxy_pass http://$imgproxy_upstream/unsafe/width:$1/plain/http://$rustfs_upstream/cms/$2$is_args$args;
}

location / {
proxy_http_version 1.1;
proxy_pass http://devcontainer:3000;
proxy_pass http://$cms_upstream;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $http_host;
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ node_modules
.env
!.devcontainer/.env
.next
next-env.d.ts
.vercel
tsconfig.tsbuildinfo
# Payload default media upload directory
Expand Down
13 changes: 0 additions & 13 deletions .prettierignore

This file was deleted.

1 change: 1 addition & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ tasks:
typecheck:
desc: Run TypeScript typecheck
cmds:
- task: typegen
- pnpm run typecheck

validate:
Expand Down
6 changes: 3 additions & 3 deletions biome.jsonc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.4.16/schema.json",
"$schema": "https://biomejs.dev/schemas/2.5.0/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
Expand Down Expand Up @@ -38,7 +38,7 @@
"project": "recommended"
},
"rules": {
"recommended": true,
"preset": "recommended",
"a11y": {
"recommended": true
},
Expand All @@ -61,7 +61,7 @@
"recommended": true
},
"suspicious": {
"recommended": true
"preset": "recommended"
}
}
},
Expand Down
6 changes: 0 additions & 6 deletions next-env.d.ts

This file was deleted.

31 changes: 31 additions & 0 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,38 @@ import { locales } from './src/app/src/i18n/config'
import { blogUrl, cmsUrl, rootWebsiteUrl, seaBattleUrl, toOrigin, toolsUrl } from './src/config/siteUrls'

const appURL = process.env.APP_URL
const nextPublicServerURL = process.env.NEXT_PUBLIC_SERVER_URL
const payloadPublicServerURL = process.env.PAYLOAD_PUBLIC_SERVER_URL
const verboseRuntimeLogs = process.env.NEXT_RUNTIME_VERBOSE_LOGS === '1'
const parseListEnv = (value: string | undefined): string[] =>
value
?.split(',')
.map(item => item.trim())
.filter(item => item.length > 0) ?? []
const parseURLHostname = (value: string | undefined): string | undefined => {
if (!value) {
return undefined
}

try {
return new URL(value).hostname
} catch {
return undefined
}
}
const allowedDevOrigins = Array.from(
new Set(
[
...parseListEnv(process.env.NEXT_ALLOWED_DEV_ORIGINS),
parseURLHostname(appURL),
parseURLHostname(nextPublicServerURL),
parseURLHostname(payloadPublicServerURL),
'*.revotale-cms-devcontainer.orb.local',
'*.proxy.revotale-cms-devcontainer.orb.local',
'proxy.revotale-cms-devcontainer.orb.local',
].filter((origin): origin is string => origin !== undefined && origin.length > 0),
),
)
const localePattern = locales.join('|')
const withNextIntl = createNextIntlPlugin({
experimental: {
Expand Down Expand Up @@ -90,6 +120,7 @@ for (const maybeURL of [appURL, payloadPublicServerURL, cmsUrl, rootWebsiteUrl,
const nextConfig: NextConfig = {
reactStrictMode: true,
output: 'standalone',
allowedDevOrigins,
//cacheHandler: require.resolve('./cache-handler.mjs'), //waiting for https://github.com/fortedigital/nextjs-cache-handler/issues/110
//cacheMaxMemorySize: 0, // Disable in-memory caching for custom handler
// cacheComponents: true,WARNING! DO NOT USE "use cache" DIRECTIVE AND ANY OTHER BECUASE SEA BATTLE CAUSE DIALOG AND PAGES TO BE NOT UNMOUNTED WHICH COMPLETELY BREAKS THE UI
Expand Down
113 changes: 57 additions & 56 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,47 +12,48 @@
"fix": "biome check --write --unsafe .",
"lint": "biome check .",
"next:typegen": "next typegen",
"p:cli": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload",
"p:gql": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload-graphql",
"p:cli": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload --use-swc",
"p:gql": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload-graphql --use-swc",
"typecheck": "tsc --noEmit",
"start": "next start"
},
"dependencies": {
"@apollo/client": "^4.1.6",
"@apollo/client": "^4.2.3",
"@apollo/client-integration-nextjs": "^0.14.4",
"@bladl/react-hooks": "^1.5.2",
"@graphql-typed-document-node/core": "^3.2.0",
"@hookform/resolvers": "^5.2.2",
"@lexical/code": "^0.43.0",
"@lexical/link": "^0.43.0",
"@lexical/list": "^0.43.0",
"@lexical/markdown": "^0.43.0",
"@lexical/react": "^0.43.0",
"@lexical/rich-text": "^0.43.0",
"@lexical/table": "^0.43.0",
"@mdxeditor/editor": "^3.53.1",
"@next/bundle-analyzer": "^16.2.1",
"@payloadcms/db-postgres": "3.82.1",
"@payloadcms/graphql": "3.82.1",
"@payloadcms/next": "3.82.1",
"@payloadcms/plugin-cloud-storage": "3.82.1",
"@payloadcms/plugin-search": "3.82.1",
"@payloadcms/plugin-seo": "3.82.1",
"@payloadcms/storage-s3": "3.82.1",
"@payloadcms/ui": "3.82.1",
"@radix-ui/react-avatar": "^1.1.11",
"@radix-ui/react-checkbox": "^1.3.3",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-hover-card": "^1.1.15",
"@radix-ui/react-label": "^2.1.8",
"@radix-ui/react-progress": "^1.1.8",
"@radix-ui/react-scroll-area": "^1.2.10",
"@radix-ui/react-select": "^2.2.6",
"@radix-ui/react-separator": "^1.1.8",
"@radix-ui/react-slot": "^1.2.4",
"@radix-ui/react-switch": "^1.2.6",
"@radix-ui/react-tooltip": "^1.2.8",
"@swc-contrib/plugin-graphql-codegen-client-preset": "^0.20.0",
"@lexical/code": "^0.45.0",
"@lexical/link": "^0.45.0",
"@lexical/list": "^0.45.0",
"@lexical/markdown": "^0.45.0",
"@lexical/react": "^0.45.0",
"@lexical/rich-text": "^0.45.0",
"@lexical/table": "^0.45.0",
"@mdxeditor/editor": "^4.0.3",
"@next/bundle-analyzer": "^16.2.9",
"@payloadcms/db-postgres": "3.85.1",
"@payloadcms/graphql": "3.85.1",
"@payloadcms/next": "3.85.1",
"@payloadcms/plugin-cloud-storage": "3.85.1",
"@payloadcms/plugin-search": "3.85.1",
"@payloadcms/plugin-seo": "3.85.1",
"@payloadcms/storage-s3": "3.85.1",
"@payloadcms/ui": "3.85.1",
"@radix-ui/react-avatar": "^1.1.12",
"@radix-ui/react-checkbox": "^1.3.4",
"@radix-ui/react-dialog": "^1.1.16",
"@radix-ui/react-hover-card": "^1.1.16",
"@radix-ui/react-label": "^2.1.9",
"@radix-ui/react-progress": "^1.1.9",
"@radix-ui/react-scroll-area": "^1.2.11",
"@radix-ui/react-select": "^2.3.0",
"@radix-ui/react-separator": "^1.1.9",
"@radix-ui/react-slot": "^1.2.5",
"@radix-ui/react-switch": "^1.3.0",
"@radix-ui/react-tooltip": "^1.2.9",
"@swc-contrib/plugin-graphql-codegen-client-preset": "^0.24.0",
"@swc-node/register": "^1.11.1",
"@types/unist": "^3.0.3",
"class-variance-authority": "^0.7.1",
"clipboardy": "^5.3.1",
Expand All @@ -64,20 +65,20 @@
"embla-carousel-autoplay": "^8.6.0",
"embla-carousel-react": "^8.6.0",
"feed": "^5.2.0",
"graphql": "^16.13.2",
"graphql": "^16.14.2",
"highlight.js": "^11.11.1",
"jose": "^6.2.2",
"lexical": "^0.43.0",
"lucide-react": "^1.0.0",
"next": "16.2.6",
"lexical": "^0.45.0",
"lucide-react": "^1.18.0",
"next": "16.2.9",
"next-intl": "^4.8.4",
"next-navigation-utils": "^1.0.4",
"next-themes": "^0.4.6",
"openai": "^6.33.0",
"payload": "3.82.1",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"react-hook-form": "^7.72.0",
"openai": "^6.42.0",
"payload": "3.85.1",
"react": "^19.2.7",
"react-dom": "^19.2.7",
"react-hook-form": "^7.79.0",
"react-markdown": "^10.1.0",
"rehype-slug": "^6.0.0",
"remark": "^15.0.1",
Expand All @@ -93,26 +94,26 @@
"zod": "^4.3.6"
},
"devDependencies": {
"@biomejs/biome": "^2.4.10",
"@graphql-codegen/add": "^6.0.0",
"@graphql-codegen/cli": "6.2.1",
"@graphql-codegen/client-preset": "5.2.4",
"@graphql-codegen/introspection": "5.0.1",
"@graphql-codegen/schema-ast": "^5.0.1",
"@tailwindcss/postcss": "^4.2.2",
"@tailwindcss/typography": "^0.5.19",
"@biomejs/biome": "^2.5.0",
"@graphql-codegen/add": "^7.0.1",
"@graphql-codegen/cli": "7.1.2",
"@graphql-codegen/client-preset": "6.0.1",
"@graphql-codegen/introspection": "6.0.1",
"@graphql-codegen/schema-ast": "^6.0.1",
"@tailwindcss/postcss": "^4.3.1",
"@tailwindcss/typography": "^0.5.20",
"@types/escape-html": "^1.0.4",
"@types/node": "25.6.0",
"@types/react": "^19.2.14",
"@types/node": "25.9.3",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"postcss": "^8.5.8",
"tailwindcss": "^4.2.2",
"tailwindcss": "^4.3.1",
"tw-animate-css": "^1.4.0",
"typescript": "^5.1"
"typescript": "6.0.3"
},
"engines": {
"node": ">=25.0.0 <26.0.0",
"pnpm": ">=11.5.0"
"pnpm": "11.6.0"
},
"packageManager": "pnpm@11.5.0"
"packageManager": "pnpm@11.6.0"
}
Loading