Skip to content

Commit 2c3d0ff

Browse files
Fix deployment, auth, and AI issues
This commit addresses three critical issues: - Resolves Vercel deployment failures by fixing the Next.js and ESLint configurations. - Corrects the Google authentication flow by updating the NextAuth.js configuration. - Implements a functional AI chat service using the Vercel AI SDK, replacing the previous placeholder.
1 parent 386b296 commit 2c3d0ff

16 files changed

Lines changed: 175 additions & 118 deletions

File tree

.eslintrc.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,34 @@
1-
import { dirname } from "path";
2-
import { fileURLToPath } from "url";
3-
import { FlatCompat } from "@eslint/eslintrc";
41

5-
const __filename = fileURLToPath(import.meta.url);
6-
const __dirname = dirname(__filename);
7-
8-
const compat = new FlatCompat({
9-
baseDirectory: __dirname,
10-
});
2+
import nextPlugin from "@next/eslint-plugin-next";
3+
import reactPlugin from "eslint-plugin-react";
4+
import reactHooksPlugin from "eslint-plugin-react-hooks";
5+
import typescriptPlugin from "@typescript-eslint/eslint-plugin";
6+
import typescriptParser from "@typescript-eslint/parser";
117

128
const eslintConfig = [
13-
...compat.extends("next/core-web-vitals", "next/typescript"),
9+
{
10+
files: ["**/*.ts", "**/*.tsx"],
11+
languageOptions: {
12+
parser: typescriptParser,
13+
globals: {
14+
React: "readonly",
15+
},
16+
},
17+
plugins: {
18+
"@next/next": nextPlugin,
19+
react: reactPlugin,
20+
"react-hooks": reactHooksPlugin,
21+
"@typescript-eslint": typescriptPlugin,
22+
},
23+
rules: {
24+
...nextPlugin.configs.recommended.rules,
25+
...reactPlugin.configs.recommended.rules,
26+
...reactHooksPlugin.configs.recommended.rules,
27+
"react/react-in-jsx-scope": "off",
28+
"react/prop-types": "off",
29+
"@typescript-eslint/no-unused-vars": "warn",
30+
},
31+
},
1432
{
1533
ignores: [
1634
"node_modules/**",

next.config.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,6 @@ const nextConfig = {
66
eslint: {
77
ignoreDuringBuilds: false,
88
},
9-
// Skip linting during build to speed up deployment
10-
eslint: {
11-
ignoreDuringBuilds: true,
12-
},
13-
// Skip type checking during build
14-
typescript: {
15-
ignoreBuildErrors: true,
16-
},
179
}
1810

19-
module.exports = nextConfig
11+
module.exports = nextConfig

package-lock.json

Lines changed: 111 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"dev": "next dev",
66
"build": "prisma generate && next build",
77
"start": "next start",
8-
"lint": "next lint",
8+
"lint": "eslint .",
99
"db:push": "prisma db push",
1010
"db:studio": "prisma studio",
1111
"db:generate": "prisma generate"
@@ -40,7 +40,8 @@
4040
"recharts": "^2.8.0",
4141
"sonner": "^1.0.0",
4242
"tailwind-merge": "^2.0.0",
43-
"zod": "^3.22.0"
43+
"zod": "^3.22.0",
44+
"@ai-sdk/openai": "^0.0.33"
4445
},
4546
"devDependencies": {
4647
"@tailwindcss/postcss": "^4.1.14",

0 commit comments

Comments
 (0)