strat-gameplay-webapp/frontend-sba/nuxt.config.ts
Cal Corum e0c12467b0 CLAUDE: Improve UX with single-click OAuth, enhanced games list, and layout fix
Frontend UX improvements:
- Single-click Discord OAuth from home page (no intermediate /auth page)
- Auto-redirect authenticated users from home to /games
- Fixed Nuxt layout system - app.vue now wraps NuxtPage with NuxtLayout
- Games page now has proper card container with shadow/border styling
- Layout header includes working logout with API cookie clearing

Games list enhancements:
- Display team names (lname) instead of just team IDs
- Show current score for each team
- Show inning indicator (Top/Bot X) for active games
- Responsive header with wrapped buttons on mobile

Backend improvements:
- Added team caching to SbaApiClient (1-hour TTL)
- Enhanced GameListItem with team names, scores, inning data
- Games endpoint now enriches response with SBA API team data

Docker optimizations:
- Optimized Dockerfile using --chown flag on COPY (faster than chown -R)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 16:14:00 -06:00

48 lines
1.3 KiB
TypeScript

export default defineNuxtConfig({
srcDir: '.',
modules: ['@nuxtjs/tailwindcss', '@pinia/nuxt', '@nuxt/eslint'],
pages: true,
dir: {
pages: 'pages'
},
runtimeConfig: {
// Server-side only (for SSR fetches within Docker network)
apiUrlInternal: process.env.NUXT_API_URL_INTERNAL || process.env.NUXT_PUBLIC_API_URL || 'http://localhost:8000',
public: {
leagueId: 'sba',
leagueName: 'Stratomatic Baseball Association',
apiUrl: process.env.NUXT_PUBLIC_API_URL || 'http://localhost:8000',
wsUrl: process.env.NUXT_PUBLIC_WS_URL || 'http://localhost:8000',
discordClientId: process.env.NUXT_PUBLIC_DISCORD_CLIENT_ID || '',
discordRedirectUri: process.env.NUXT_PUBLIC_DISCORD_REDIRECT_URI || 'http://localhost:3000/auth/callback',
}
},
compatibilityDate: '2025-07-15',
devtools: { enabled: true },
// Allow access from Nginx Proxy Manager
devServer: {
host: '0.0.0.0', // Listen on all network interfaces
port: 3000
},
// Vite config for external hostname access
// Configure NUXT_ALLOWED_HOSTS env var for your domains (comma-separated)
vite: {
server: {
allowedHosts: process.env.NUXT_ALLOWED_HOSTS?.split(',') || ['localhost', '127.0.0.1']
}
},
typescript: {
strict: true,
typeCheck: false // Disable in dev - use `npm run type-check` manually
}
})