feat: add initial implementation of Kitchen CRM with authentication and dashboard features
- Create global styles and theme management - Implement app shell layout with sidebar navigation - Add authentication layout and pages for login and registration - Develop dashboard page with placeholder content - Introduce routing guards for guest-only and authenticated routes - Set up Zustand for state management of authentication and theme - Create API types and structures for CRM entities - Configure Vite with PWA support and Tailwind CSS
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import path from 'node:path'
|
||||
|
||||
import react from '@vitejs/plugin-react-swc'
|
||||
import { defineConfig } from 'vite'
|
||||
import { VitePWA } from 'vite-plugin-pwa'
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
const pwaPlugin = VitePWA({
|
||||
registerType: 'autoUpdate',
|
||||
includeAssets: ['pwa-icon.svg', 'pwa-192x192.png', 'pwa-512x512.png'],
|
||||
manifest: {
|
||||
name: 'Kitchen CRM',
|
||||
short_name: 'KitchenCRM',
|
||||
display: 'standalone',
|
||||
start_url: '/',
|
||||
lang: 'en',
|
||||
description: 'Multi-tenant CRM dashboard for organizations, contacts, deals, and analytics.',
|
||||
background_color: '#020617',
|
||||
theme_color: '#0f172a',
|
||||
icons: [
|
||||
{
|
||||
src: '/pwa-icon.svg',
|
||||
sizes: 'any',
|
||||
type: 'image/svg+xml',
|
||||
},
|
||||
{
|
||||
src: '/pwa-192x192.png',
|
||||
sizes: '192x192',
|
||||
type: 'image/png',
|
||||
},
|
||||
{
|
||||
src: '/pwa-512x512.png',
|
||||
sizes: '512x512',
|
||||
type: 'image/png',
|
||||
purpose: 'any maskable',
|
||||
},
|
||||
],
|
||||
},
|
||||
devOptions: {
|
||||
enabled: true,
|
||||
suppressWarnings: true,
|
||||
},
|
||||
workbox: {
|
||||
globPatterns: ['**/*.{js,css,html,png,svg,ico,webmanifest,json}'],
|
||||
runtimeCaching: [
|
||||
{
|
||||
urlPattern: ({ url }) => url.pathname.startsWith('/api'),
|
||||
handler: 'NetworkFirst',
|
||||
options: {
|
||||
cacheName: 'api-cache',
|
||||
networkTimeoutSeconds: 5,
|
||||
expiration: {
|
||||
maxEntries: 50,
|
||||
maxAgeSeconds: 60 * 15,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
urlPattern: ({ request }) => request.destination === 'document',
|
||||
handler: 'NetworkFirst',
|
||||
},
|
||||
],
|
||||
},
|
||||
})
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react(), pwaPlugin],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, 'src'),
|
||||
},
|
||||
},
|
||||
envPrefix: 'VITE_',
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
port: 5173,
|
||||
},
|
||||
preview: {
|
||||
port: 4173,
|
||||
},
|
||||
build: {
|
||||
target: 'es2022',
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user