feat: Implement browser-compatible processing pipeline for student requests
- Added SimpleBrowserProcessor class to handle student requests in a queue. - Introduced methods for adding requests, notifying subscribers, and processing the queue. - Mock AI matching logic implemented to simulate resource matching based on request categories and urgency. - Added generateInsights method to analyze request trends and urgencies. feat: Create authentication context for user management - Developed AuthContext to manage user authentication state. - Implemented login and logout functionalities with mock user data. - Added loading state management during authentication processes. feat: Add notification context for managing user notifications - Created NotificationContext to handle notifications throughout the application. - Implemented methods for adding, marking as read, and removing notifications. feat: Introduce common hooks for utility functions - Developed useHashRoute for hash-based routing. - Created useLocalStorage for managing local storage with TypeScript support. - Implemented useMediaQuery for responsive design handling. - Added useDebounce for debouncing values in state. feat: Implement donation impact calculation hook - Created useDonationImpact hook to calculate the impact of donations. - Added useFormValidation hook for form state management and validation. feat: Design main layout and page structure components - Developed MainLayout and PageShell components for consistent layout structure. - Created SectionHeader and Card components for reusable UI elements. feat: Build HomePage with impact statistics and service offerings - Implemented HomePage component with hero section, impact stats, and service cards. - Integrated tracking for donation and volunteer actions. feat: Add analytics utilities for tracking events - Created analytics utility for tracking page views and custom events. - Implemented donation and volunteer tracking functionalities. feat: Enhance helper functions for various utilities - Developed utility functions for impact calculation, formatting, validation, and debouncing.
This commit is contained in:
@@ -2,7 +2,7 @@ import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import { resolve } from 'path'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
// Optimized Vite Configuration for Production
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
resolve: {
|
||||
@@ -20,11 +20,30 @@ export default defineConfig({
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: {
|
||||
// Core React libraries
|
||||
vendor: ['react', 'react-dom'],
|
||||
motion: ['framer-motion'],
|
||||
icons: ['lucide-react'],
|
||||
|
||||
// UI and animations
|
||||
ui: ['framer-motion', 'lucide-react'],
|
||||
|
||||
// AI libraries (browser-compatible)
|
||||
ai: ['@tensorflow/tfjs'],
|
||||
|
||||
// Utilities
|
||||
utils: ['date-fns', 'react-helmet-async']
|
||||
},
|
||||
chunkFileNames: 'js/[name]-[hash].js'
|
||||
}
|
||||
},
|
||||
// Enable compression
|
||||
minify: 'terser',
|
||||
terserOptions: {
|
||||
compress: {
|
||||
drop_console: true,
|
||||
drop_debugger: true,
|
||||
},
|
||||
},
|
||||
// Optimize chunks
|
||||
chunkSizeWarningLimit: 500,
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user