Overview
Trazea uses a modern, production-ready tech stack focused on developer experience, type safety, and performance. Every technology choice is intentional and serves a specific purpose in the architecture.Frontend Stack
Core Framework
React 19.2.0
Purpose: UI library for building component-based interfaces Why React 19?- Latest stable release with improved performance
- Enhanced Suspense and Error Boundaries
- Better TypeScript integration
- Automatic batching for better performance
- Server Components support (future-ready)
- Functional components with hooks
- Context API for global state
- Suspense for lazy loading
- Error Boundaries for error handling
TypeScript 5.9.3
Purpose: Static type checking and enhanced developer experience Configuration:- Strict mode enabled
- ES2022 target
- ESNext module resolution
- Path aliases (
@/*forsrc/*)
- Compile-time error detection
- Superior autocomplete and IntelliSense
- Self-documenting code
- Safer refactoring
- Type inference with Zod schemas
Build Tool
Vite 7.2.2 (Rolldown variant)
Purpose: Lightning-fast build tool and dev server Why Vite?- Instant HMR (Hot Module Replacement)
- Native ES modules in development
- Optimized production builds
- First-class TypeScript support
- Plugin ecosystem
- Rust-based bundler for even faster builds
- Drop-in replacement for standard Vite
- Better performance on large codebases
vite.config.ts
pnpm dev- Development server on port 5173pnpm build- Production buildpnpm preview- Preview production build
Styling
Tailwind CSS 4.1.17
Purpose: Utility-first CSS framework Why Tailwind?- No context switching between HTML and CSS
- Automatic purging of unused styles
- Consistent design system
- Responsive design utilities
- Dark mode support
@tailwindcss/vite plugin
tailwind-merge(3.4.0) - Merge conflicting classesclass-variance-authority(0.7.1) - Type-safe variant managementtw-animate-css(1.4.0) - Additional animations
Radix UI
Purpose: Accessible component primitives Components Used (all v1.x - v2.x):@radix-ui/react-dialog- Modals and dialogs@radix-ui/react-dropdown-menu- Dropdown menus@radix-ui/react-select- Select inputs@radix-ui/react-tabs- Tab navigation@radix-ui/react-tooltip- Tooltips@radix-ui/react-avatar- User avatars@radix-ui/react-checkbox- Checkboxes@radix-ui/react-label- Form labels@radix-ui/react-separator- Visual separators@radix-ui/react-slider- Range sliders@radix-ui/react-popover- Popovers@radix-ui/react-alert-dialog- Alert dialogs@radix-ui/react-collapsible- Collapsible sections@radix-ui/react-hover-card- Hover cards
- WAI-ARIA compliant
- Keyboard navigation
- Focus management
- Unstyled by default (Tailwind integration)
- TypeScript definitions included
Lucide React 0.553.0
Purpose: Icon library Why Lucide?- 1000+ consistent icons
- Tree-shakeable (only used icons bundled)
- TypeScript support
- Small bundle size
- Active development
State Management
Zustand 5.0.8
Purpose: Lightweight client-side state management Why Zustand?- Minimal boilerplate
- No providers needed
- TypeScript-first
- Small bundle size (1kb)
- React 19 compatible
- UI state (modals, filters, selections)
- Shopping cart (request cart)
- User preferences
- Temporary form data
TanStack Query 5.90.10
Purpose: Server state management and data fetching Why TanStack Query?- Automatic caching
- Background refetching
- Stale-while-revalidate pattern
- Request deduplication
- Optimistic updates
- Pagination support
- TypeScript-first
useQuery- Fetch datauseMutation- Modify datauseInfiniteQuery- Infinite scroll- Query invalidation
- Optimistic updates
@tanstack/react-query-devtools (5.90.2) for debugging
Forms & Validation
React Hook Form 7.66.1
Purpose: Performant form library Why React Hook Form?- Minimal re-renders
- Uncontrolled inputs by default
- Built-in validation
- TypeScript support
- Small bundle size
Zod 4.1.13
Purpose: TypeScript-first schema validation Why Zod?- Type inference
- Composable schemas
- Error messages
- Transform data
- Integration with React Hook Form
@hookform/resolvers 5.2.2
Purpose: Validation resolver for React Hook Form Connects Zod schemas with React Hook Form for seamless validation.Routing
React Router 7.9.6
Purpose: Client-side routing Features Used:- File-based routing structure
- Nested routes
- Protected routes
- Route parameters
- Search params
- Navigation guards
UI Enhancements
Sonner 2.0.7
Purpose: Toast notifications Why Sonner?- Beautiful default styling
- Promise-based API
- Stacking notifications
- Custom JSX content
- Accessible
next-themes 0.4.6
Purpose: Dark mode support Features:- System preference detection
- Persistent theme selection
- No flash on load
- TypeScript support
embla-carousel-react 8.6.0
Purpose: Touch-friendly carousels Used for image galleries and product showcases.react-day-picker 9.13.0
Purpose: Date picker component Used for date filtering and warranty date selection.react-dropzone 14.3.8
Purpose: Drag-and-drop file uploads Used for Excel file uploads and warranty photo uploads.Vaul 1.1.2
Purpose: Mobile-friendly drawer component Used for mobile navigation and bottom sheets.Utilities
date-fns 4.1.0
Purpose: Date manipulation and formatting Why date-fns?- Modular (tree-shakeable)
- Immutable
- TypeScript support
- Extensive locale support
XLSX 0.18.5
Purpose: Excel file parsing and generation Used for:- Bulk spare parts import
- Count report exports
- Inventory exports
clsx 2.1.1 & tailwind-merge 3.4.0
Purpose: Conditional class name managementBackend Stack
Supabase 2.77.0
Purpose: Backend-as-a-Service platform Components:PostgreSQL Database
- 17 main tables
- Views for complex queries
- Triggers for audit logging
- Functions for business logic
Authentication
- Email/password
- Google OAuth
- JWT-based sessions
- User management
Row Level Security (RLS)
- Table-level policies
- User context filtering
- Multi-tenancy support
- Location-based access control
Storage
- Image uploads (spare parts, warranties)
- Excel file temporary storage
- Automatic image optimization
- CDN distribution
Real-time Subscriptions
- Inventory updates
- Notification delivery
- Request status changes
@supabase/supabase-js (2.77.0)
Monitoring & Error Tracking
Sentry 10.26.0
Purpose: Application monitoring and error tracking Features Used:- Automatic error capture
- Source map upload
- User context tracking
- Breadcrumb logging
- Performance monitoring
- Release tracking
@sentry/react
Development Tools
ESLint 9.39.1
Purpose: Code linting and quality Plugins:@eslint/js(9.39.1) - Core rulestypescript-eslint(8.46.3) - TypeScript ruleseslint-plugin-react-hooks(7.0.1) - React Hooks ruleseslint-plugin-react-refresh(0.4.24) - HMR compatibility
- No unused variables
- Proper hook dependencies
- TypeScript best practices
- React best practices
Testing (Planned)
Vitest
Purpose: Unit and integration testing Configuration in package.json:Testing Library
@testing-library/react(16.3.0)@testing-library/dom(10.4.1)jsdom(27.2.0) - DOM simulation
Package Manager
pnpm
Why pnpm?- Faster than npm/yarn
- Efficient disk space usage
- Strict dependency resolution
- Monorepo support
- Better security
Progressive Web App
vite-plugin-pwa 1.2.0
Purpose: PWA functionality Features:- Service worker generation
- Offline support
- Install prompts
- App manifest
- Icon generation
Docker Support
Configuration:Dockerfile + docker-compose.yml
Version Summary
Production Dependencies
| Package | Version | Purpose |
|---|---|---|
| react | 19.2.0 | UI framework |
| typescript | 5.9.3 | Type safety |
| vite | 7.2.2 | Build tool |
| tailwindcss | 4.1.17 | Styling |
| @supabase/supabase-js | 2.77.0 | Backend client |
| @tanstack/react-query | 5.90.10 | Server state |
| zustand | 5.0.8 | Client state |
| react-hook-form | 7.66.1 | Forms |
| zod | 4.1.13 | Validation |
| react-router-dom | 7.9.6 | Routing |
| @sentry/react | 10.26.0 | Error tracking |
| lucide-react | 0.553.0 | Icons |
| sonner | 2.0.7 | Notifications |
| date-fns | 4.1.0 | Date utilities |
| xlsx | 0.18.5 | Excel handling |
Radix UI Components
| Package | Version |
|---|---|
| @radix-ui/react-dialog | 1.1.15 |
| @radix-ui/react-dropdown-menu | 2.1.16 |
| @radix-ui/react-select | 2.2.6 |
| @radix-ui/react-tabs | 1.1.13 |
| @radix-ui/react-tooltip | 1.2.8 |
| @radix-ui/react-avatar | 1.1.11 |
| @radix-ui/react-checkbox | 1.3.3 |
Why This Stack?
Performance
- Vite for instant HMR
- React 19 with automatic batching
- TanStack Query for smart caching
- Tree-shaking with Vite + pnpm
Developer Experience
- TypeScript for type safety
- Zod for schema validation
- Hot reload with Vite
- Extensive tooling
Maintainability
- FSD architecture
- Strong typing
- Modular components
- Clear separation of concerns
Scalability
- Supabase scales with usage
- React’s component model
- TanStack Query handles complex data
- PWA for offline support
Related Resources
Architecture Overview
High-level system design
Feature-Sliced Design
Code organization methodology
Database Model
Database schema and tables
Getting Started
Set up your development environment