Next.js Supabase V3 (#463)

Version 3 of the kit:
- Radix UI replaced with Base UI (using the Shadcn UI patterns)
- next-intl replaces react-i18next
- enhanceAction deprecated; usage moved to next-safe-action
- main layout now wrapped with [locale] path segment
- Teams only mode
- Layout updates
- Zod v4
- Next.js 16.2
- Typescript 6
- All other dependencies updated
- Removed deprecated Edge CSRF
- Dynamic Github Action runner
This commit is contained in:
Giancarlo Buomprisco
2026-03-24 13:40:38 +08:00
committed by GitHub
parent 4912e402a3
commit 7ebff31475
840 changed files with 71395 additions and 20095 deletions

View File

@@ -1,20 +0,0 @@
export default [
{
files: ['app/**/*.{ts,tsx}'],
rules: {
'no-restricted-imports': [
'error',
{
paths: [
{
name: '@kit/supabase/database',
importNames: ['Database'],
message:
'Please use the application types from your app "~/lib/database.types" instead',
},
],
},
],
},
},
];

View File

@@ -1,79 +0,0 @@
import { defineConfig } from '@eslint/config-helpers';
import eslint from '@eslint/js';
import turbo from 'eslint-config-turbo';
import { nextEslintConfig, rules as nextjsEslintRules } from './nextjs.js';
export default defineConfig(
eslint.configs.recommended,
...nextEslintConfig,
{
plugins: {
turbo,
},
settings: {
react: {
version: '19.2',
},
},
languageOptions: {
parserOptions: {
warnOnUnsupportedTypeScriptVersion: false,
},
},
},
{
rules: {
...nextjsEslintRules,
'no-undef': 'off',
'@typescript-eslint/triple-slash-reference': 'off',
'react/react-in-jsx-scope': 'off',
'import/no-anonymous-default-export': 'off',
'import/named': 'off',
'import/namespace': 'off',
'import/default': 'off',
'import/no-unresolved': 'off',
'import/no-named-as-default-member': 'off',
'import/no-named-as-default': 'off',
'import/no-cycle': 'off',
'import/no-unused-modules': 'off',
'import/no-deprecated': 'off',
'turbo/no-undeclared-env-vars': 'off',
'@typescript-eslint/array-type': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/consistent-type-definitions': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/non-nullable-type-assertion-style': 'off',
'@typescript-eslint/only-throw-error': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off',
'preserve-caught-error': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
'no-restricted-imports': [
'error',
{
paths: [
{
name: 'react-i18next',
importNames: ['Trans'],
message: 'Please use `@kit/ui/trans` instead',
},
],
},
],
},
},
{
ignores: [
'**/node_modules',
'**/database.types.ts',
'**/.next',
'**/public',
'dist',
'pnpm-lock.yaml',
],
},
);

View File

@@ -1,10 +0,0 @@
import nextCoreVitals from 'eslint-config-next/core-web-vitals';
import nextTypescript from 'eslint-config-next/typescript';
const nextEslintConfig = [...nextCoreVitals, ...nextTypescript];
const rules = {
'@next/next/no-html-link-for-pages': 'off',
};
export { nextEslintConfig, rules };

View File

@@ -1,27 +0,0 @@
{
"name": "@kit/eslint-config",
"version": "0.2.0",
"private": true,
"type": "module",
"files": [
"./apps.js",
"./base.js",
"./nextjs.js"
],
"scripts": {
"clean": "rm -rf .turbo node_modules",
"format": "prettier --check \"**/*.{js,json}\""
},
"dependencies": {
"@eslint/js": "catalog:",
"@next/eslint-plugin-next": "catalog:",
"@types/eslint": "catalog:",
"eslint-config-next": "catalog:",
"eslint-config-turbo": "catalog:"
},
"devDependencies": {
"@kit/prettier-config": "workspace:*",
"eslint": "catalog:"
},
"prettier": "@kit/prettier-config"
}

View File

@@ -1,34 +0,0 @@
/** @typedef {import("prettier").Config} PrettierConfig */
/** @type { PrettierConfig } */
const config = {
tabWidth: 2,
useTabs: false,
semi: true,
printWidth: 80,
singleQuote: true,
arrowParens: 'always',
importOrder: [
'/^(?!.*\\.css).*/',
'^server-only$',
'^react$',
'^react-dom$',
'^next$',
'^next/(.*)$',
'^@supabase/supabase-js$',
'^@supabase/gotrue-js$',
'<THIRD_PARTY_MODULES>',
'^@kit/(.*)$', // package imports
'^~/(.*)$', // app-specific imports
'^[./]', // relative imports
],
tailwindFunctions: ['tw', 'clsx', 'cn', 'cva'],
importOrderSeparation: true,
importOrderSortSpecifiers: true,
plugins: [
'@trivago/prettier-plugin-sort-imports',
'prettier-plugin-tailwindcss',
],
};
export default config;

View File

@@ -1,21 +0,0 @@
{
"name": "@kit/prettier-config",
"private": true,
"version": "0.1.0",
"main": "index.mjs",
"scripts": {
"clean": "rm -rf .turbo node_modules",
"format": "prettier --check \"**/*.{mjs,json}\"",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@trivago/prettier-plugin-sort-imports": "6.0.2",
"prettier": "^3.8.1",
"prettier-plugin-tailwindcss": "^0.7.2"
},
"devDependencies": {
"@kit/tsconfig": "workspace:*",
"typescript": "^5.9.3"
},
"prettier": "./index.mjs"
}

View File

@@ -1,8 +0,0 @@
{
"extends": "@kit/tsconfig/base.json",
"compilerOptions": {
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
},
"include": ["."],
"exclude": ["node_modules"]
}

View File

@@ -1,7 +1,7 @@
{
"name": "scripts",
"private": true,
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "node ./src/dev.mjs",
"checks": "node ./src/checks.mjs",

View File

@@ -49,7 +49,9 @@ function checkEnvFiles(rootPath) {
return;
}
console.error(`⚠️ Secret key "${secret}" found in ${file} on line ${index + 1}`);
console.error(
`⚠️ Secret key "${secret}" found in ${file} on line ${index + 1}`,
);
hasSecrets = true;
}
@@ -76,13 +78,15 @@ function checkEnvFiles(rootPath) {
} else {
const appName = rootPath.split('/').pop();
console.log(`✅ No secret keys found in staged environment files for the app ${appName}`);
console.log(
`✅ No secret keys found in staged environment files for the app ${appName}`,
);
}
}
const apps = readdirSync('../../apps');
apps.forEach(app => {
apps.forEach((app) => {
checkEnvFiles(`../../apps/${app}`);
});
@@ -98,7 +102,7 @@ function isValueWhitelisted(key, value) {
}
if (Array.isArray(whiteListedValue)) {
return whiteListedValue.some(allowed => {
return whiteListedValue.some((allowed) => {
if (allowed instanceof RegExp) {
return allowed.test(value);
}
@@ -108,4 +112,4 @@ function isValueWhitelisted(key, value) {
}
return whiteListedValue.trim() === value.trim();
}
}

View File

@@ -1,3 +1,3 @@
import './version.mjs';
import './license.mjs';
import './requirements.mjs';
import './requirements.mjs';

View File

@@ -16,7 +16,9 @@
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"noUncheckedIndexedAccess": true
"noUncheckedIndexedAccess": true,
"noUncheckedSideEffectImports": false,
"types": ["node"]
},
"exclude": ["node_modules", "build", "dist", ".next"]
}
}

View File

@@ -1,7 +1,7 @@
{
"name": "@kit/tsconfig",
"private": true,
"version": "0.1.0",
"private": true,
"files": [
"base.json"
]