Skip to content

Commit

Permalink
improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
TakashiAihara committed May 6, 2024
1 parent a942497 commit c71e0ac
Show file tree
Hide file tree
Showing 17 changed files with 186 additions and 239 deletions.
3 changes: 1 addition & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=
AUTH_SECRET=

DISCORD_CLIENT_ID=
DISCORD_CLIENT_SECRET=
Expand Down
13 changes: 13 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"recommendations": [
"ms-vscode-remote.remote-containers",
"usernamehw.errorlens",
"ms-vscode.vscode-typescript-next",
"streetsidesoftware.code-spell-checker",
"imgildev.vscode-drizzle-snippets",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"jawandarajbir.react-vscode-extension-pack",
"bradlc.vscode-tailwindcss"
]
}
12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"cSpell.words": [
"Jiti",
"nextjs",
"signin",
"signout",
"superjson",
"tailwindcss",
"tanstack",
"trpc"
]
}
15 changes: 11 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,30 @@
"build": "next build",
"db:push": "drizzle-kit push:mysql",
"db:studio": "drizzle-kit studio",
"db:generate": "drizzle-kit generate:mysql",
"db:check": "drizzle-kit check:mysql",
"db:up": "drizzle-kit up:mysql",
"db:introspect": "drizzle-kit introspect:mysql",
"db:drop": "drizzle-kit drop",
"db:help": "drizzle-kit help",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
"start": "next start",
"type:check": "tsc --pretty --noEmit"
},
"dependencies": {
"@auth/drizzle-adapter": "^0.7.0",
"@auth/drizzle-adapter": "^1.0.1",
"@t3-oss/env-nextjs": "^0.10.1",
"@tanstack/react-query": "^5.34.2",
"@trpc/client": "next",
"@trpc/next": "next",
"@trpc/react-query": "next",
"@trpc/server": "next",
"drizzle-orm": "^0.29.4",
"drizzle-orm": "^0.30.10",
"jiti": "^1.21.0",
"mysql2": "^3.9.7",
"next": "^14.2.3",
"next-auth": "^4.24.7",
"next-auth": "5.0.0-beta.17",
"react": "18.3.1",
"react-dom": "18.3.1",
"server-only": "^0.0.1",
Expand Down
117 changes: 38 additions & 79 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 2 additions & 7 deletions src/app/api/auth/[...nextauth]/route.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
import NextAuth from "next-auth";

import { authOptions } from "~/server/auth";

// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const handler = NextAuth(authOptions);
export { handler as GET, handler as POST };
import { handlers } from "~/auth"
export const { GET, POST } = handlers;
4 changes: 0 additions & 4 deletions src/app/api/trpc/[trpc]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ import { serverEnv } from "~/env/server";
import { appRouter } from "~/server/api/root";
import { createTRPCContext } from "~/server/api/trpc";

/**
* This wraps the `createTRPCContext` helper and provides the required context for the tRPC API when
* handling a HTTP request (e.g. when you make requests from Client Components).
*/
const createContext = async (req: NextRequest) => {
return createTRPCContext({
headers: req.headers,
Expand Down

0 comments on commit c71e0ac

Please sign in to comment.