Overview
CAFH Platform is built with modern web technologies focused on developer experience, type safety, and performance.Frontend Stack
React 19.2.3
UI library with latest features including hooks, suspense, and concurrent rendering
TypeScript 5.8.2
Type-safe JavaScript with full IDE support
React Router 7.10.1
Hash-based routing for SPA navigation
Tailwind CSS
Utility-first CSS framework (configured inline)
React 19 Features Used
App.tsx
TypeScript Configuration
Fromtsconfig.json:
tsconfig.json
Backend Stack
Express 5.2.1
Web server framework for API endpoints
Nodemailer 8.0.1
Email sending with SMTP support
CORS 2.8.6
Cross-origin resource sharing
dotenv 17.3.1
Environment variable management
Server Implementation
server.ts
Build Tools
Vite 6.2.0
Lightning-fast build tool and dev server
tsx 4.21.0
TypeScript execution for server
@vitejs/plugin-react 5.0.0
Vite plugin for React Fast Refresh
Vite Configuration
Fromvite.config.ts:
vite.config.ts
UI Components & Libraries
Lucide React 0.561.0
600+ SVG icons
Recharts 3.6.0
Analytics charts and graphs
@xyflow/react 12.10.1
Visual automation flow builder
React Markdown 10.1.0
Markdown rendering
Icon Usage
Charts Example
Automation Flow Builder
components/AutomationFlowBuilder.tsx
Data Storage
localStorage
Browser-based data persistence with versioned keys and JSON serialization
storage.ts:
storage.ts
Type System
All data structures are defined intypes.ts with 50+ TypeScript interfaces:
types.ts
Dependencies Overview
Frompackage.json:
Core Dependencies
| Package | Version | Purpose |
|---|---|---|
| react | 19.2.3 | UI framework |
| react-dom | 19.2.3 | React renderer |
| typescript | 5.8.2 | Type system |
| express | 5.2.1 | Backend server |
| vite | 6.2.0 | Build tool |
UI & Components
| Package | Version | Purpose |
|---|---|---|
| lucide-react | 0.561.0 | Icons |
| recharts | 3.6.0 | Charts |
| @xyflow/react | 12.10.1 | Flow diagrams |
| react-markdown | 10.1.0 | Markdown rendering |
| react-router-dom | 7.10.1 | Routing |
Backend & Email
| Package | Version | Purpose |
|---|---|---|
| nodemailer | 8.0.1 | Email sending |
| cors | 2.8.6 | CORS middleware |
| dotenv | 17.3.1 | Environment config |
| tsx | 4.21.0 | TS execution |
Why These Choices?
React 19
React 19
Latest stable version with automatic batching, concurrent rendering, and improved hooks. Excellent TypeScript support.
TypeScript
TypeScript
Catches bugs at compile time, provides IntelliSense, and improves maintainability. Essential for large codebases.
Vite
Vite
Instant HMR, faster builds than Webpack, native ES modules, and excellent DX. Perfect for React development.
localStorage
localStorage
Simple, requires no backend database, works offline, and perfect for MVP. Can be replaced with PostgreSQL/MongoDB later.
Express
Express
Minimal, flexible, well-documented. Handles API routes and email queue efficiently.
Hash Router
Hash Router
Works on any static host without server-side routing configuration. Easy deployment to GitHub Pages, Netlify, etc.
Browser Support
Targeting modern browsers:- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
IE11 is not supported due to ES2022 features and modern React.
Next Steps
Folder Structure
Explore the project organization
Storage System
Understand data persistence
Build Process
Learn about production builds
Architecture
Platform architecture overview