From 92b595581e5988cd57ebeb982a70c85bfef498c3 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 6 Dec 2025 17:38:08 +0900 Subject: feat(client): initialize React + Vite frontend foundation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set up the client-side React application with Vite bundler: - Add React 19 and Vite 7 with the React plugin - Create index.html entry point and App component - Configure Vite with API proxy to backend server - Add client build scripts to package.json - Update tsconfig for React JSX and DOM types - Fix TypeScript errors in auth code (JWT_SECRET type narrowing) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/server/routes/auth.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/server/routes') diff --git a/src/server/routes/auth.ts b/src/server/routes/auth.ts index 25c959b..f0c0428 100644 --- a/src/server/routes/auth.ts +++ b/src/server/routes/auth.ts @@ -15,9 +15,12 @@ import { refreshTokenSchema, } from "../schemas/index.js"; -const JWT_SECRET = process.env.JWT_SECRET; -if (!JWT_SECRET) { - throw new Error("JWT_SECRET environment variable is required"); +function getJwtSecret(): string { + const secret = process.env.JWT_SECRET; + if (!secret) { + throw new Error("JWT_SECRET environment variable is required"); + } + return secret; } const ACCESS_TOKEN_EXPIRES_IN = 60 * 15; // 15 minutes const REFRESH_TOKEN_EXPIRES_IN = 60 * 60 * 24 * 7; // 7 days @@ -101,7 +104,7 @@ export function createAuthRouter(deps: AuthDependencies) { iat: now, exp: now + ACCESS_TOKEN_EXPIRES_IN, }, - JWT_SECRET, + getJwtSecret(), ); // Generate refresh token @@ -165,7 +168,7 @@ export function createAuthRouter(deps: AuthDependencies) { iat: now, exp: now + ACCESS_TOKEN_EXPIRES_IN, }, - JWT_SECRET, + getJwtSecret(), ); // Generate new refresh token (rotation) -- cgit v1.2.3-70-g09d2