|
| 1 | +import React from 'react'; |
| 2 | +import clsx from 'clsx'; |
| 3 | +import styles from './styles.module.css'; |
| 4 | + |
| 5 | +function MessageIcon() { |
| 6 | + return ( |
| 7 | + <svg |
| 8 | + className={styles.featureSvg} |
| 9 | + viewBox="0 0 24 24" |
| 10 | + fill="none" |
| 11 | + stroke="currentColor" |
| 12 | + strokeWidth="1.5" |
| 13 | + strokeLinecap="round" |
| 14 | + strokeLinejoin="round" |
| 15 | + > |
| 16 | + <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" /> |
| 17 | + <line x1="8" y1="9" x2="16" y2="9" /> |
| 18 | + <line x1="8" y1="13" x2="14" y2="13" /> |
| 19 | + </svg> |
| 20 | + ); |
| 21 | +} |
| 22 | + |
| 23 | +function ShieldCheckIcon() { |
| 24 | + return ( |
| 25 | + <svg |
| 26 | + className={styles.featureSvg} |
| 27 | + viewBox="0 0 24 24" |
| 28 | + fill="none" |
| 29 | + stroke="currentColor" |
| 30 | + strokeWidth="1.5" |
| 31 | + strokeLinecap="round" |
| 32 | + strokeLinejoin="round" |
| 33 | + > |
| 34 | + <path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" /> |
| 35 | + <polyline points="9 12 11 14 15 10" /> |
| 36 | + </svg> |
| 37 | + ); |
| 38 | +} |
| 39 | + |
| 40 | +function ShareIcon() { |
| 41 | + return ( |
| 42 | + <svg |
| 43 | + className={styles.featureSvg} |
| 44 | + viewBox="0 0 24 24" |
| 45 | + fill="none" |
| 46 | + stroke="currentColor" |
| 47 | + strokeWidth="1.5" |
| 48 | + strokeLinecap="round" |
| 49 | + strokeLinejoin="round" |
| 50 | + > |
| 51 | + <circle cx="18" cy="5" r="3" /> |
| 52 | + <circle cx="6" cy="12" r="3" /> |
| 53 | + <circle cx="18" cy="19" r="3" /> |
| 54 | + <line x1="8.59" y1="13.51" x2="15.42" y2="17.49" /> |
| 55 | + <line x1="15.41" y1="6.51" x2="8.59" y2="10.49" /> |
| 56 | + </svg> |
| 57 | + ); |
| 58 | +} |
| 59 | + |
| 60 | +type FeatureItem = { |
| 61 | + title: string; |
| 62 | + Icon: React.ComponentType; |
| 63 | + description: React.JSX.Element; |
| 64 | +}; |
| 65 | + |
| 66 | +const FeatureList: FeatureItem[] = [ |
| 67 | + { |
| 68 | + title: 'Unified Message Model', |
| 69 | + Icon: MessageIcon, |
| 70 | + description: ( |
| 71 | + <> |
| 72 | + One <code>IMessage</code>, one <code>IChannelConnector</code>, one |
| 73 | + consistent programming model — the same abstractions for SMS, |
| 74 | + email, push notifications, and chat. No provider lock-in, no SDK |
| 75 | + fragmentation. |
| 76 | + </> |
| 77 | + ), |
| 78 | + }, |
| 79 | + { |
| 80 | + title: 'Schema-Driven Validation', |
| 81 | + Icon: ShieldCheckIcon, |
| 82 | + description: ( |
| 83 | + <> |
| 84 | + Every connector declares its capabilities and constraints via{' '} |
| 85 | + <code>IChannelSchema</code>. Validate messages before they reach the |
| 86 | + provider — catch invalid payloads at build time, not at send |
| 87 | + time. |
| 88 | + </> |
| 89 | + ), |
| 90 | + }, |
| 91 | + { |
| 92 | + title: 'Extensible by Design', |
| 93 | + Icon: ShareIcon, |
| 94 | + description: ( |
| 95 | + <> |
| 96 | + Extend the framework with custom connectors for any provider — |
| 97 | + social messaging (Slack, Teams, WhatsApp), protocol-level channels |
| 98 | + (SMPP, SMTP, APNs), or proprietary gateways. One base class, any |
| 99 | + transport. |
| 100 | + </> |
| 101 | + ), |
| 102 | + }, |
| 103 | +]; |
| 104 | + |
| 105 | +function Feature({ title, Icon, description }: FeatureItem) { |
| 106 | + return ( |
| 107 | + <div className={clsx('col col--4')}> |
| 108 | + <div className="text--center"> |
| 109 | + <Icon /> |
| 110 | + </div> |
| 111 | + <div className="text--center padding-horiz--md"> |
| 112 | + <h3>{title}</h3> |
| 113 | + <p>{description}</p> |
| 114 | + </div> |
| 115 | + </div> |
| 116 | + ); |
| 117 | +} |
| 118 | + |
| 119 | +export default function HomepageFeatures(): React.JSX.Element { |
| 120 | + return ( |
| 121 | + <section className={styles.features}> |
| 122 | + <div className="container"> |
| 123 | + <div className="row"> |
| 124 | + {FeatureList.map((props, idx) => ( |
| 125 | + <Feature key={idx} {...props} /> |
| 126 | + ))} |
| 127 | + </div> |
| 128 | + </div> |
| 129 | + </section> |
| 130 | + ); |
| 131 | +} |
0 commit comments