feat: Add environment configuration, ESLint setup, GitHub Actions deployment workflow, comprehensive API documentation, Jest testing configuration, and optimized Vite setup; implement AI model lazy loading and SEO components for improved performance and user experience

This commit is contained in:
defiQUG
2025-10-05 06:34:26 -07:00
parent 52e9acb329
commit e6aec40163
10 changed files with 583 additions and 0 deletions

61
vite.config.optimized.ts Normal file
View File

@@ -0,0 +1,61 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { resolve } from 'path'
// Optimized Vite Configuration
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': resolve(__dirname, './src'),
},
},
server: {
port: 3000,
open: true,
},
build: {
outDir: 'dist',
sourcemap: true,
rollupOptions: {
output: {
manualChunks: {
// Core React libraries
vendor: ['react', 'react-dom'],
// UI and animations
ui: ['framer-motion', 'lucide-react'],
// AI and ML libraries (largest chunk)
ai: ['@tensorflow/tfjs', 'natural', 'ml-matrix', 'compromise'],
// Real-time and networking
realtime: ['socket.io-client', 'ws', 'ioredis', 'redis'],
// Queue management
queue: ['bull', 'uuid'],
// Date utilities
utils: ['date-fns']
},
// Optimize chunk sizes
chunkFileNames: (chunkInfo) => {
const facadeModuleId = chunkInfo.facadeModuleId
? chunkInfo.facadeModuleId.split('/').pop()
: 'chunk'
return `js/${facadeModuleId}-[hash].js`
}
},
},
// Enable compression
minify: 'terser',
terserOptions: {
compress: {
drop_console: true,
drop_debugger: true,
},
},
// Optimize chunks
chunkSizeWarningLimit: 500,
},
})