Overview
The system uses environment variables for configuration and includes multiple configuration files for different aspects of the application.Configuration Files
Vite Configuration
The main build configuration is invite.config.ts:
vite.config.ts
Key Configuration Options
Server Settings (vite.config.ts:8-11)
host: "::"- Listen on all network interfaces (IPv6)port: 5173- Default development server port
vite.config.ts:12-14)
@vitejs/plugin-react-swc- Fast React refresh using SWClovable-tagger- Component tagging (development only)
vite.config.ts:20-25)
drop_console: true- Remove console.log in productiondrop_debugger: true- Remove debugger statementssourcemap: false- Disable source maps for smaller builds
vite.config.ts:17-19)
@/*resolves to./src/*- Simplifies imports:
import { Button } from '@/components/ui/button'
TypeScript Configuration
The project uses multiple TypeScript configuration files: tsconfig.json - Root configurationThe TypeScript configuration uses relaxed type checking to prioritize development speed.
For production applications, consider enabling stricter type checking.
Tailwind Configuration
The UI styling is configured through Tailwind CSS with:- tailwindcss - Utility-first CSS framework
- @tailwindcss/typography - Beautiful typographic defaults
- tailwindcss-animate - Animation utilities
PostCSS Configuration
Autoprefixer is configured to add vendor prefixes automatically for better browser compatibility.Application Configuration
API Base URL
The API endpoint is configured via environment variable:.env
src/services/authService.ts
Authentication Configuration
Session Storage- Authentication credentials stored in
sessionStorage - Automatically cleared on browser close
- Basic Auth with Base64 encoding
src/components/auth/IdleHandler.tsx:21)
src/components/auth/IdleHandler.tsx:29)
- mousedown
- keydown
- scroll
- click
- touchstart
Router Configuration
The application uses React Router v6 with protected routes:- Public routes:
/login,/register - Protected routes: All application pages
- Redirect to login when unauthenticated
- Return to requested page after login
UI Component Configuration
Radix UI Components
The system uses Radix UI primitives for accessible, unstyled components:- Accordion
- Alert Dialog
- Avatar
- Checkbox
- Dialog
- Dropdown Menu
- Form controls
- Navigation Menu
- Popover
- Select
- Tabs
- Toast notifications
- And more…
Theming
Theme management vianext-themes:
- Light/Dark mode support
- System preference detection
- Persistent theme selection
Form Validation
React Hook Form + Zod- Type-safe form validation
- Schema-based validation
- Real-time error feedback
Build Configuration
Development Mode
- Hot Module Replacement (HMR)
- Component tagging enabled
- Source maps enabled
- Fast refresh with SWC
Production Mode
- Tree shaking
- Code splitting
- Minification
- Console removal
- Debugger removal
Development Build Mode
- Source maps included
- Console logs preserved
- Debugging enabled
Linting Configuration
ESLint Setup
The project uses ESLint with multiple plugins:@eslint/js- Core ESLint rulestypescript-eslint- TypeScript-specific ruleseslint-plugin-react-hooks- React Hooks ruleseslint-plugin-react-refresh- Fast refresh compatibilityeslint-plugin-simple-import-sort- Import organization
Advanced Configuration
Customizing the Dev Server
Modifyvite.config.ts to customize server behavior:
Environment-Specific Builds
Create environment-specific configuration:.env.development- Development variables.env.production- Production variables.env.local- Local overrides (gitignored)
Adding Build Plugins
Extend Vite with additional plugins:vite.config.ts
Configuration Checklist
Next Steps
Environment Setup
Configure development and production environments
User Management
Set up user authentication and roles