Skip to content

Commit 96ff24b

Browse files
committed
supabase migration (wip)
1 parent 3e926c4 commit 96ff24b

52 files changed

Lines changed: 2689 additions & 3010 deletions

Some content is hidden

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

.dockerignore

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

.env.example

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
# Base for OAuth Redirect URLs
1313
BASE_URL="http://localhost:3000"
1414

15-
# Start of DevDogs
16-
DEVDOGS_EPOCH="2024-07-22"
17-
1815
# Discord
1916
DISCORD_CLIENT_ID=""
2017
DISCORD_CLIENT_SECRET=""
@@ -30,34 +27,4 @@ GITHUB_TOKEN="ghp_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
3027

3128
# Google
3229
GOOGLE_CLIENT_ID="000000000000-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.apps.googleusercontent.com"
33-
GOOGLE_CLIENT_SECRET="aaaaaa-aa-aaaaaaaaaaaaaaaaaaaaaaaaa"
34-
35-
# Supabase
36-
# For local development, run `pnpm supabase:start` and use the credentials below.
37-
# For production, use the connection details from your Supabase project dashboard.
38-
SUPABASE_PORT="54321"
39-
# SUPABASE_URL is derived from SUPABASE_PORT for local dev. Only set this for production.
40-
# SUPABASE_URL=""
41-
# SUPABASE_ANON_KEY is derived from the default Supabase JWT secret for local dev.
42-
# Only set this if you customized [auth.jwt.secret] in config.toml, or for production.
43-
# SUPABASE_ANON_KEY=""
44-
45-
# Supabase Postgres
46-
# For local development, run `pnpm supabase:start` and use the credentials below.
47-
# For production, use the connection details from your Supabase project dashboard.
48-
POSTGRES_USER="postgres"
49-
POSTGRES_PASSWORD="postgres"
50-
POSTGRES_HOST="127.0.0.1"
51-
POSTGRES_PORT="54322"
52-
POSTGRES_DATABASE="postgres"
53-
54-
# S3 (Supabase Storage)
55-
# For local development, use the credentials output by `pnpm supabase:start`.
56-
S3_PORT="54321"
57-
S3_REGION="local"
58-
S3_ACCESS_KEY_ID=""
59-
S3_SECRET_ACCESS_KEY=""
60-
61-
# For Production
62-
SHARED_AUTH_CLIENT_ID=""
63-
SHARED_AUTH_CLIENT_SECRET=""
30+
GOOGLE_CLIENT_SECRET="aaaaaa-aa-aaaaaaaaaaaaaaaaaaaaaaaaa"

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ yarn-error.log*
3333
.pnpm-debug.log*
3434

3535
# local env files
36-
# do not commit any .env files to git, except for the .env.example file. https://create.t3.gg/en/usage/env-variables#using-environment-variables
37-
.env
38-
.env*.local
36+
# do not commit any .env files to git, except for the .env.example file.
37+
.env*
38+
!.env.example
3939

4040
# vercel
4141
.vercel

drizzle.config.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
import { type Config } from "drizzle-kit";
2-
import { env } from "~/env";
2+
import { loadEnvConfig } from "@next/env";
3+
4+
loadEnvConfig(process.cwd());
35

46
export default {
57
schema: "./src/server/db/schema/tables.ts",
68
dialect: "postgresql",
79
out: "./drizzle",
810
schemaFilter: ["public"],
911
dbCredentials: {
10-
host: env.POSTGRES_HOST,
11-
user: env.POSTGRES_USER,
12-
password: env.POSTGRES_PASSWORD,
13-
port: env.POSTGRES_PORT,
14-
database: env.POSTGRES_DATABASE,
12+
url: process.env.DB_URL!,
1513
},
1614
} satisfies Config;

next.config.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,11 @@
33
* for Docker builds.
44
*/
55
import type { NextConfig } from "next";
6-
import "./src/env.ts";
6+
import "~/env";
77

88
const config = {
99
async redirects() {
1010
return [
11-
{
12-
source: "/api/auth/callback/google",
13-
destination: "/api/auth",
14-
permanent: true,
15-
},
1611
{
1712
source: "/settings",
1813
destination: "/settings/profile",

package.json

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@
99
"db:generate": "drizzle-kit generate",
1010
"db:migrate": "drizzle-kit migrate",
1111
"db:push": "drizzle-kit push",
12-
"db:studio": "drizzle-kit studio",
13-
"supabase:start": "dotenv -- supabase start",
14-
"supabase:stop": "supabase stop",
15-
"dev": "pnpm supabase:start && pnpm db:push && turbo run Next.js Drizzle-Studio",
16-
"Next.js": "next dev --turbo",
17-
"Drizzle-Studio": "drizzle-kit studio",
12+
"sb:start": "dotenv -- supabase start && supabase status -o env > .env.local",
13+
"sb:stop": "supabase stop",
14+
"sb:restart": "pnpm sb:stop && pnpm sb:start",
15+
"dev": "pnpm sb:start && pnpm db:push && pnpm next dev",
1816
"format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,mdx}\" --cache",
1917
"format:write": "prettier --write \"**/*.{ts,tsx,js,jsx,mdx}\" --cache",
2018
"lint": "eslint src",
@@ -28,55 +26,58 @@
2826
},
2927
"dependencies": {
3028
"@date-fns/tz": "^1.4.1",
31-
"@discordjs/builders": "^1.13.1",
32-
"@discordjs/rest": "^2.6.0",
29+
"@discordjs/builders": "^1.14.1",
30+
"@discordjs/rest": "^2.6.1",
3331
"@octokit/graphql": "^9.0.3",
3432
"@paralleldrive/cuid2": "^3.3.0",
3533
"@radix-ui/react-alert-dialog": "^1.1.15",
3634
"@radix-ui/react-avatar": "^1.1.11",
3735
"@radix-ui/react-collapsible": "^1.1.12",
3836
"@radix-ui/react-dialog": "^1.1.15",
3937
"@radix-ui/react-dropdown-menu": "^2.1.16",
40-
"@t3-oss/env-nextjs": "^0.13.10",
38+
"@supabase/ssr": "^0.10.0",
39+
"@supabase/supabase-js": "^2.101.1",
40+
"@t3-oss/env-nextjs": "^0.13.11",
4141
"@tailwindcss/forms": "^0.5.11",
4242
"@tailwindcss/typography": "^0.5.19",
4343
"bcrypt": "^6.0.0",
4444
"date-fns": "^4.1.0",
45-
"discord-api-types": "^0.38.37",
45+
"discord-api-types": "^0.38.44",
4646
"discord-interactions": "^4.4.0",
4747
"drizzle-orm": "1.0.0-beta.11-05230d9",
48-
"@supabase/ssr": "^0.6.1",
49-
"postgres": "^3.4.7",
50-
"next": "^16.1.5",
48+
"next": "^16.2.2",
49+
"postgres": "^3.4.8",
5150
"react": "^19.2.4",
5251
"react-dom": "^19.2.4",
5352
"react-fast-marquee": "^1.6.5",
54-
"react-icons": "^5.5.0",
53+
"react-icons": "^5.6.0",
5554
"zod": "4.1.8",
5655
"zod-form-data": "^3.0.1"
5756
},
5857
"devDependencies": {
59-
"@eslint/eslintrc": "^3.3.3",
60-
"@tailwindcss/postcss": "^4.1.18",
58+
"@eslint/eslintrc": "^3.3.5",
59+
"@next/env": "^16.2.2",
60+
"@supabase/auth-js": "^2.101.1",
61+
"@tailwindcss/postcss": "^4.2.2",
6162
"@types/bcrypt": "^6.0.0",
62-
"@types/node": "^25.2.0",
63-
"@types/react": "^19.2.7",
63+
"@types/node": "^25.5.0",
64+
"@types/react": "^19.2.14",
6465
"@types/react-dom": "^19.2.3",
6566
"dotenv-cli": "^10.0.0",
6667
"drizzle-kit": "1.0.0-beta.11-05230d9",
67-
"eslint": "^9.39.2",
68-
"eslint-config-next": "^15.5.9",
68+
"eslint": "^9.39.4",
69+
"eslint-config-next": "^15.5.14",
6970
"eslint-plugin-drizzle": "^0.2.3",
70-
"postcss": "^8.5.6",
71-
"prettier": "^3.7.4",
71+
"postcss": "^8.5.8",
72+
"prettier": "^3.8.1",
7273
"prettier-plugin-tailwindcss": "^0.7.2",
7374
"raw-loader": "^4.0.2",
74-
"tailwindcss": "^4.1.18",
75-
"turbo": "^2.8.3",
76-
"typescript": "^5.9.3",
77-
"typescript-eslint": "^8.52.0",
7875
"supabase": "^2.84.7",
79-
"vercel": "^50.10.0"
76+
"tailwindcss": "^4.2.2",
77+
"turbo": "^2.9.3",
78+
"typescript": "^5.9.3",
79+
"typescript-eslint": "^8.58.0",
80+
"vercel": "^50.38.3"
8081
},
8182
"packageManager": "pnpm@10.28.1"
8283
}

patches/drizzle-kit.patch

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

0 commit comments

Comments
 (0)