Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added hooks/useSwipeGesture.ts
Empty file.
10 changes: 10 additions & 0 deletions lib/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// lib/config.ts
import { env } from './env.js';

const config = {
isProduction: env.NODE_ENV === 'production',
isDevelopment: env.NODE_ENV === 'development',
isTest: env.NODE_ENV === 'test',
};

export default config;
21 changes: 21 additions & 0 deletions lib/env.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// lib/env.ts
import { z } from 'zod';

const envSchema = z.object({
PORT: z.coerce.number().default(3000),
HOST: z.string().default('127.0.0.1'),
NODE_ENV: z.enum(['development', 'production', 'test']).default('development'),
NEXTAUTH_URL: z.string().url().optional(),
NEXTAUTH_SECRET: z.string().min(1),
SPOTIFY_CLIENT_ID: z.string().optional(),
SPOTIFY_CLIENT_SECRET: z.string().optional(),
});

const testingSchema = envSchema.extend({
NEXTAUTH_SECRET: z.string().optional(),
});

export const env =
process.env.TESTING === 'true'
? testingSchema.parse(process.env)
: envSchema.parse(process.env);
Empty file added lib/theme/animations.ts
Empty file.
Empty file added lib/theme/tokens.ts
Empty file.
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"test:unit:watch": "jest --watch",
"test:unit:coverage": "jest --coverage",
"test:json": "pnpm exec cross-env TESTING=true bash start-production.sh > /tmp/hrm-server.log 2>&1 & echo $! > /tmp/hrm-server.pid && npx wait-on http://127.0.0.1:3000/api/debug/ping --timeout 20000 && npx playwright test --reporter=json > playwright-report.json; kill $(cat /tmp/hrm-server.pid) 2>/dev/null || true",
"test:visual": "pnpm exec cross-env TESTING=true bash start-production.sh > /tmp/hrm-server.log 2>&1 & echo $! > /tmp/hrm-server.pid && npx wait-on http://127.0.0.1:3000/api/debug/ping --timeout 20000 && playwright test; kill $(cat /tmp/hrm-server.pid) 2>/dev/null || true",
"test:visual": "TESTING=true pnpm exec bash start-production.sh > /tmp/hrm-server.log 2>&1 & echo $! > /tmp/hrm-server.pid && npx wait-on http://127.0.0.1:3000/api/debug/ping --timeout 20000 && playwright test; kill $(cat /tmp/hrm-server.pid) 2>/dev/null || true",
"test:all": "pnpm run test:visual && pnpm run test:unit",
"test:quick": "pnpm run build && pnpm exec cross-env TESTING=true bash start-production.sh > /tmp/hrm-server.log 2>&1 & echo $! > /tmp/hrm-server.pid && npx wait-on http://127.0.0.1:3000/api/debug/ping --timeout 20000 && playwright test --reporter=dot; kill $(cat /tmp/hrm-server.pid) 2>/dev/null || true",
"test:quick": "pnpm run build && TESTING=true pnpm exec bash start-production.sh > /tmp/hrm-server.log 2>&1 & echo $! > /tmp/hrm-server.pid && npx wait-on http://127.0.0.1:3000/api/debug/ping --timeout 20000 && playwright test --reporter=dot; kill $(cat /tmp/hrm-server.pid) 2>/dev/null || true",
"test:visual:ui": "playwright test --ui",
"test:visual:update": "pnpm run build && pnpm exec cross-env TESTING=true bash start-production.sh > /tmp/hrm-server.log 2>&1 & echo $! > /tmp/hrm-server.pid && npx wait-on http://127.0.0.1:3000/api/debug/ping --timeout 20000 && playwright test --update-snapshots --reporter=dot; kill $(cat /tmp/hrm-server.pid) 2>/dev/null || true",
"test:visual:headed": "playwright test --project=chromium --headed",
Expand All @@ -51,8 +51,11 @@
"@emotion/styled": "^11.14.1",
"@mui/icons-material": "^5.15.0",
"@mui/material": "^5.18.0",
"@react-spring/web": "^10.0.3",
"@spotify/web-api-ts-sdk": "^1.2.0",
"express": "^5.1.0",
"framer-motion": "^12.23.24",
"lodash": "^4.17.21",
"next": "16.0.1",
"next-auth": "^4.24.13",
"pino": "^10.1.0",
Expand All @@ -74,6 +77,7 @@
"@testing-library/user-event": "^14.6.1",
"@types/express": "^5.0.5",
"@types/jest": "^30.0.0",
"@types/lodash": "^4.17.21",
"@types/next": "^8.0.7",
"@types/node": "^24.10.1",
"@types/react": "^19.2.6",
Expand Down
112 changes: 112 additions & 0 deletions pnpm-lock.yaml

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

Loading
Loading