Skip to content

Commit

Permalink
feat(add supabase/ssr, next-safe-action and shadcn ui defaults): comp…
Browse files Browse the repository at this point in the history
…lete rewrite

Complete rewrite of auth. Removed auth-helpers and moved to supabase/ssr. More server auth preferred
over client auth. Removed usage of useQuery and moved to next-safe-action

BREAKING CHANGE:  Complete rewrite of auth. Removed auth-helpers and moved to supabase/ssr. More
server auth preferred over client auth. Removed usage of useQuery and moved to
  • Loading branch information
imbhargav5 committed Sep 6, 2024
1 parent 536700d commit 9720f35
Show file tree
Hide file tree
Showing 161 changed files with 22,253 additions and 11,661 deletions.
27 changes: 2 additions & 25 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = {
plugins: ['@typescript-eslint', 'prettier'],
rules: {
'prettier/prettier': 1,
'@typescript-eslint/no-unused-vars': 1,
},
files: ['src/**/*.ts', 'src/**/*.tsx'],
},
Expand All @@ -41,31 +42,7 @@ module.exports = {
},
files: ['e2e/**/*.spec.ts'],
},
{
extends: ['eslint:recommended', 'prettier', 'esnext'],
files: '*.mjs',
rules: ruleOverrides,
},
// make nextconfig.mjs node environment
{
extends: ['eslint:recommended', 'prettier', 'node'],
files: 'next.config.mjs',
rules: ruleOverrides,
},
{
extends: ['prettier'],
files: '*.js',
rules: ruleOverrides,
},
{
extends: ['prettier'],
files: '*.cjs',
rules: ruleOverrides,
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
},
},
],
root: true,
ignorePatterns: ['*.js', '*.mjs', '*.cjs', '*.json'],
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.env.local
.env.*.local
node_modules
tsconfig.tsbuildinfo
supabase/.temp/project-ref
Expand Down
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
"source.fixAll.eslint": "explicit",
"source.organizeImports": "explicit",
"source.sortMembers": "explicit"
},
"eslint.codeActionsOnSave.rules": ["!@typescript-eslint/*", "*"],
"typescript.tsdk": "node_modules/typescript/lib",
Expand Down
10 changes: 7 additions & 3 deletions components.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@
"tailwind": {
"config": "tailwind.config.js",
"css": "src/app/globals.css",
"baseColor": "slate",
"cssVariables": false
"baseColor": "zinc",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
}
}
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
3 changes: 0 additions & 3 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
export default {
experimental: {
serverActions: true,
},
images: {
remotePatterns: [
{
Expand Down
139 changes: 85 additions & 54 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,91 +12,122 @@
"test:e2e": "playwright test",
"test": "vitest --root src --run",
"test:watch": "vitest --root src",
"lint:eslint": "yarn eslint --fix src",
"lint:eslint": "pnpm eslint --fix src",
"lint:prettier": "prettier --write src",
"lint": "yarn lint:eslint && yarn lint:prettier",
"lint": "pnpm lint:eslint && pnpm lint:prettier",
"tsc": "tsc",
"commit": "cz",
"prepare": "husky install",
"postbuild": "next-sitemap --config next-sitemap.config.cjs"
},
"dependencies": {
"@commitlint/config-conventional": "^17.4.4",
"@headlessui/react": "^1.7.11",
"@heroicons/react": "^2.0.16",
"@hookform/resolvers": "^3.3.1",
"@radix-ui/react-context-menu": "^2.1.3",
"@radix-ui/react-dialog": "^1.0.2",
"@radix-ui/react-dropdown-menu": "^2.0.2",
"@radix-ui/react-hover-card": "^1.0.5",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-navigation-menu": "^1.1.1",
"@radix-ui/react-popover": "^1.0.5",
"@radix-ui/react-select": "^1.2.0",
"@radix-ui/react-slider": "^1.1.1",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-switch": "^1.0.2",
"@supabase/auth-helpers-nextjs": "^0.8.1",
"@commitlint/config-conventional": "^17.8.1",
"@headlessui/react": "^1.7.19",
"@heroicons/react": "^2.1.5",
"@hookform/resolvers": "^3.9.0",
"@radix-ui/react-accordion": "^1.2.0",
"@radix-ui/react-alert-dialog": "^1.1.1",
"@radix-ui/react-aspect-ratio": "^1.1.0",
"@radix-ui/react-avatar": "^1.1.0",
"@radix-ui/react-checkbox": "^1.1.1",
"@radix-ui/react-collapsible": "^1.1.0",
"@radix-ui/react-context-menu": "^2.2.1",
"@radix-ui/react-dialog": "^1.1.1",
"@radix-ui/react-dropdown-menu": "^2.1.1",
"@radix-ui/react-hover-card": "^1.1.1",
"@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-menubar": "^1.1.1",
"@radix-ui/react-navigation-menu": "^1.2.0",
"@radix-ui/react-popover": "^1.1.1",
"@radix-ui/react-progress": "^1.1.0",
"@radix-ui/react-radio-group": "^1.2.0",
"@radix-ui/react-scroll-area": "^1.1.0",
"@radix-ui/react-select": "^1.2.2",
"@radix-ui/react-separator": "^1.1.0",
"@radix-ui/react-slider": "^1.2.0",
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-switch": "^1.1.0",
"@radix-ui/react-tabs": "^1.1.0",
"@radix-ui/react-toast": "^1.2.1",
"@radix-ui/react-toggle": "^1.1.0",
"@radix-ui/react-toggle-group": "^1.1.0",
"@radix-ui/react-tooltip": "^1.1.2",
"@supabase/auth-helpers-nextjs": "^0.8.7",
"@supabase/auth-helpers-react": "^0.3.1",
"@supabase/supabase-js": "^2.31.0",
"@tailwindcss/typography": "^0.5.9",
"@tanstack/react-query": "^4.24.10",
"@supabase/ssr": "^0.5.1",
"@supabase/supabase-js": "^2.45.3",
"@tailwindcss/forms": "^0.5.9",
"@tailwindcss/typography": "^0.5.15",
"@tanstack/react-query": "^4.36.1",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"clsx": "^2.1.1",
"cmdk": "1.0.0",
"date-fns": "^3.6.0",
"embla-carousel-react": "^8.2.1",
"framer-motion": "^11.5.4",
"input-otp": "^1.2.4",
"lucide-react": "^0.279.0",
"next": "^14.0.3",
"next": "^14.2.8",
"next-nprogress-bar": "^2.3.13",
"next-safe-action": "^7.9.0",
"next-seo": "^5.15.0",
"next-sitemap": "^3.1.52",
"next-sitemap": "^3.1.55",
"next-themes": "^0.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.46.2",
"path-to-regexp": "^8.0.0",
"react": "^18.3.1",
"react-day-picker": "8.10.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.53.0",
"react-hot-toast": "^2.4.1",
"react-no-ssr": "^1.1.0",
"react-resizable-panels": "^2.1.2",
"recharts": "^2.12.7",
"rooks": "^7.14.1",
"sonner": "^1.0.3",
"server-only": "^0.0.1",
"sonner": "^1.5.0",
"tailwind-merge": "^1.14.0",
"tailwindcss": "^3.2.7",
"tailwindcss": "^3.4.10",
"tailwindcss-animate": "^1.0.7",
"url-join": "^5.0.0",
"zod": "^3.22.2"
"vaul": "^0.9.2",
"zod": "^3.23.8"
},
"devDependencies": {
"@commitlint/cli": "^17.4.4",
"@commitlint/cz-commitlint": "^17.4.4",
"@next/eslint-plugin-next": "^13.1.6",
"@playwright/test": "^1.31.0",
"@semantic-release/changelog": "^6.0.2",
"@commitlint/cli": "^17.8.1",
"@commitlint/cz-commitlint": "^17.8.1",
"@next/eslint-plugin-next": "^13.5.6",
"@playwright/test": "^1.47.0",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@testing-library/react": "^14.0.0",
"@types/jsonwebtoken": "^9.0.1",
"@types/nprogress": "^0.2.0",
"@types/react": "^18.2.38",
"@types/react-dom": "^18.2.17",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"@testing-library/react": "^14.3.1",
"@types/jsonwebtoken": "^9.0.6",
"@types/nprogress": "^0.2.3",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@vitejs/plugin-react": "^3.1.0",
"commitizen": "^4.3.0",
"concurrently": "^7.6.0",
"env-cmd": "^10.1.0",
"eslint": "^8.54.0",
"eslint": "^8.57.0",
"eslint-config-esnext": "^4.1.0",
"eslint-config-node": "^4.1.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-import": "^2.27.5",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-playwright": "^0.12.0",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^8.0.3",
"jsdom": "^21.1.0",
"lint-staged": "^13.1.2",
"npm-check-updates": "^16.7.5",
"postcss": "^8.4.21",
"prettier": "^2.8.4",
"semantic-release": "^20.1.0",
"supabase": "^1.38.6",
"jsdom": "^21.1.2",
"lint-staged": "^13.3.0",
"npm-check-updates": "^16.14.20",
"postcss": "^8.4.45",
"prettier": "^2.8.8",
"semantic-release": "^20.1.3",
"supabase": "^1.191.3",
"tailwindcss-cli": "^0.1.2",
"tsc-files": "^1.1.3",
"typescript": "^5.3.2",
"tsc-files": "^1.1.4",
"typescript": "^5.5.4",
"vitest": "^0.28.5"
},
"config": {
Expand Down
Loading

0 comments on commit 9720f35

Please sign in to comment.