Files
analiticaNucleo/nuxt4-app/nuxt.config.ts
josedario87 608b4dbe26
All checks were successful
build-and-deploy / build (push) Successful in 3m37s
build-and-deploy / deploy (push) Successful in 4s
Remove all database dependencies and simplify application
BREAKING CHANGE: Remove all data analysis features

This commit removes all database-dependent functionality and simplifies
the application to focus on authentication and user management only.

Changes:
- Remove all /api/data and /api/metadata server endpoints
- Remove Supabase configuration from nuxt.config.ts and .env.example
- Remove @supabase/supabase-js dependency from package.json
- Delete data analysis pages: explorer, metadatos, rawExplorer, panorama,
  comparativa-cosechas, informe-ingresos
- Simplify sidebar navigation to show only "Inicio"
- Update home page to focus on authentication and profile management
- Remove "Supabase" and "Solo lectura" badges from navbar
- Keep only auth-related API endpoints: /api/auth/status and /api/auth/check-group

The application now serves as an authentication-protected portal with:
- Authentik SSO integration
- User profile management
- Settings and notifications pages (coming soon)
- No database or data analysis features
2025-10-13 13:37:52 -06:00

150 lines
4.4 KiB
TypeScript

// https://nuxt.com/docs/api/configuration/nuxt-config
import { disableImportProtection } from './nuxt.config.workaround'
export default defineNuxtConfig({
ssr: true,
compatibilityDate: '2025-07-15',
devtools: { enabled: true },
css: ['~/assets/css/main.css'],
modules: ['@nuxt/image', '@nuxt/ui', '@nuxt/test-utils', '@vite-pwa/nuxt', '@pinia/nuxt'],
// Performance optimizations
experimental: {
payloadExtraction: false,
viewTransition: true
},
// Optimize build
vite: {
plugins: [disableImportProtection()],
server: {
hmr: {
clientPort: 443,
protocol: 'wss'
},
allowedHosts: [
'.nucleoriofrio.com',
'devserver.nucleoriofrio.com',
'analitica.nucleoriofrio.com'
]
},
build: {
cssCodeSplit: true,
rollupOptions: {
output: {
manualChunks: {
'vendor-ui': ['@nuxt/ui'],
'vendor-pinia': ['pinia', '@pinia/nuxt']
}
}
}
}
},
app: {
baseURL: process.env.BASE_URL || '/',
head: {
link: [
{ rel: 'icon', type: 'image/png', href: `${process.env.BASE_URL || ''}/icons/icon-192.png` },
{ rel: 'apple-touch-icon', sizes: '192x192', href: `${process.env.BASE_URL || ''}/icons/icon-192.png` },
{ rel: 'manifest', href: `${process.env.BASE_URL || ''}/manifest.webmanifest` }
],
meta: [
{ name: 'theme-color', content: '#1b1209' },
{ name: 'apple-mobile-web-app-capable', content: 'yes' },
{ name: 'mobile-web-app-capable', content: 'yes' },
{ name: 'apple-mobile-web-app-status-bar-style', content: 'black-translucent' }
]
}
},
nitro: {
baseURL: process.env.BASE_URL || '/',
experimental: {
openAPI: true
},
routeRules: {
'/manifest.webmanifest': {
headers: {
'Content-Type': 'application/manifest+json',
'Cache-Control': 'public, max-age=3600'
}
},
'/sw.js': {
headers: {
'Service-Worker-Allowed': '/',
'Cache-Control': 'public, max-age=0'
}
}
}
},
pwa: {
registerType: 'autoUpdate',
strategies: 'generateSW',
manifestFilename: 'manifest.webmanifest',
manifest: {
name: 'Analítica Núcleo Data Studio',
short_name: 'Analítica',
description: 'Explora y valida tus tablas Supabase desde un único panel en modo lectura.',
start_url: process.env.BASE_URL || '/',
scope: process.env.BASE_URL || '/',
display: 'standalone',
background_color: '#1b1209',
theme_color: '#c08040',
icons: [
{ src: '/icons/icon-192.png', sizes: '192x192', type: 'image/png' },
{ src: '/icons/icon-512.png', sizes: '512x512', type: 'image/png' },
{ src: '/icons/icon-192-maskable.png', sizes: '192x192', type: 'image/png', purpose: 'maskable' },
{ src: '/icons/icon-512-maskable.png', sizes: '512x512', type: 'image/png', purpose: 'maskable' },
{ src: '/icons/icon-192-black.png', sizes: '192x192', type: 'image/png' },
{ src: '/icons/icon-512-black.png', sizes: '512x512', type: 'image/png' }
],
screenshots: [
{
src: '/screenshots/screenshot-desktop.png',
sizes: '2048x1041',
type: 'image/png',
form_factor: 'wide',
label: 'Dashboard en escritorio'
},
{
src: '/screenshots/screenshot-mobile.png',
sizes: '774x1459',
type: 'image/png',
form_factor: 'narrow',
label: 'Vista móvil'
}
]
},
workbox: {
globPatterns: ['**/*.{js,css,html,png,svg,webp,ico,json,woff2}'],
navigateFallback: undefined,
cleanupOutdatedCaches: true,
maximumFileSizeToCacheInBytes: 4 * 1024 * 1024
},
client: {
installPrompt: true,
periodicSyncForUpdates: 3600
},
devOptions: {
enabled: process.env.NODE_ENV === 'development',
type: 'module'
},
includeAssets: [
'favicon.ico',
'icons/icon-192.png',
'icons/icon-512.png',
'icons/icon-192-maskable.png',
'icons/icon-512-maskable.png',
'icons/icon-192-black.png',
'icons/icon-512-black.png',
'screenshots/screenshot-desktop.png',
'screenshots/screenshot-mobile.png'
]
},
runtimeConfig: {
public: {
authentikUrl: process.env.NUXT_PUBLIC_AUTHENTIK_URL || 'https://authentik.nucleoriofrio.com'
}
}
})