Skip to content

Commit 41e0673

Browse files
feat: connect to backend auth, remove all local db/auth, fix errors (#3)
* feat: connect to backend auth, remove all local db/auth, fix errors * chore: format * fix: use getBaseUrl instead of headers * fix: use better-auth User type
1 parent 5169bef commit 41e0673

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+801
-1946
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ const config = {
66
},
77
"plugins": [
88
"@typescript-eslint",
9-
"drizzle"
109
],
1110
"extends": [
1211
"next/core-web-vitals",
@@ -38,24 +37,6 @@ const config = {
3837
}
3938
}
4039
],
41-
"drizzle/enforce-delete-with-where": [
42-
"error",
43-
{
44-
"drizzleObjectName": [
45-
"db",
46-
"ctx.db"
47-
]
48-
}
49-
],
50-
"drizzle/enforce-update-with-where": [
51-
"error",
52-
{
53-
"drizzleObjectName": [
54-
"db",
55-
"ctx.db"
56-
]
57-
}
58-
]
5940
}
6041
}
61-
module.exports = config;
42+
module.exports = config;

drizzle.config.ts

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

next.config.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,18 @@
22
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful
33
* for Docker builds.
44
*/
5-
import "./src/env.js";
5+
import { env } from "./src/env.js";
66

77
/** @type {import("next").NextConfig} */
8-
const config = {};
8+
const config = {
9+
async rewrites() {
10+
return [
11+
{
12+
source: "/api/:path*",
13+
destination: `${env.BACKEND_URL}/api/:path*`,
14+
},
15+
];
16+
},
17+
};
918

1019
export default config;

package.json

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@
66
"scripts": {
77
"build": "next build",
88
"check": "next lint && tsc --noEmit",
9-
"db:generate": "drizzle-kit generate",
10-
"db:migrate": "drizzle-kit migrate",
11-
"db:push": "drizzle-kit push",
12-
"db:studio": "drizzle-kit studio",
13-
"dev": "next dev --turbo",
9+
"dev": "PORT=3001 next dev --turbo",
1410
"format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,mdx}\" --cache",
1511
"format:write": "prettier --write \"**/*.{ts,tsx,js,jsx,mdx}\" --cache",
1612
"lint": "next lint",
@@ -20,9 +16,8 @@
2016
"typecheck": "tsc --noEmit"
2117
},
2218
"dependencies": {
23-
"@auth/drizzle-adapter": "^1.7.2",
2419
"@hookform/resolvers": "^3.9.1",
25-
"@polinetwork/backend": "^0.2.1",
20+
"@polinetwork/backend": "^0.4.1",
2621
"@radix-ui/react-alert-dialog": "^1.1.3",
2722
"@radix-ui/react-avatar": "^1.1.1",
2823
"@radix-ui/react-collapsible": "^1.1.1",
@@ -35,22 +30,23 @@
3530
"@radix-ui/react-slot": "^1.1.0",
3631
"@radix-ui/react-tooltip": "^1.1.4",
3732
"@t3-oss/env-nextjs": "^0.10.1",
38-
"@tanstack/react-query": "^5.50.0",
33+
"@tanstack/react-query": "^5.74.3",
3934
"@tanstack/react-table": "^8.21.2",
40-
"@trpc/client": "^11.0.0-rc.446",
41-
"@trpc/react-query": "^11.0.0-rc.446",
42-
"@trpc/server": "^11.0.0-rc.446",
35+
"@trpc/client": "^11.1.0",
36+
"@trpc/react-query": "^11.1.0",
37+
"@trpc/tanstack-react-query": "^11.1.0",
38+
"better-auth": "^1.2.7",
4339
"class-variance-authority": "^0.7.1",
4440
"clsx": "^2.1.1",
45-
"drizzle-orm": "^0.33.0",
41+
"cmdk": "^1.1.1",
4642
"geist": "^1.3.0",
4743
"lucide-react": "^0.475.0",
4844
"next": "^15.2.3",
49-
"next-auth": "5.0.0-beta.25",
5045
"next-themes": "^0.4.4",
5146
"postgres": "^3.4.4",
5247
"react": "^18.3.1",
5348
"react-dom": "^18.3.1",
49+
"react-hook-form": "^7.55.0",
5450
"server-only": "^0.0.1",
5551
"superjson": "^2.2.1",
5652
"tailwind-merge": "^3.0.1",
@@ -64,10 +60,8 @@
6460
"@types/react-dom": "^18.3.0",
6561
"@typescript-eslint/eslint-plugin": "^8.1.0",
6662
"@typescript-eslint/parser": "^8.1.0",
67-
"drizzle-kit": "^0.24.0",
6863
"eslint": "^8.57.0",
6964
"eslint-config-next": "^15.0.1",
70-
"eslint-plugin-drizzle": "^0.2.3",
7165
"postcss": "^8.4.39",
7266
"prettier": "^3.3.2",
7367
"prettier-plugin-tailwindcss": "^0.6.5",

0 commit comments

Comments
 (0)