Add ACMCC app source, Supabase backend, and project config

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-01 20:19:26 -04:00
parent 313b51b412
commit 183fe0a93c
1422 changed files with 259271 additions and 0 deletions
@@ -0,0 +1,67 @@
import * as React from 'npm:react@18.3.1'
import { Body, Button, Container, Head, Heading, Html, Preview, Section, Text } from 'npm:@react-email/components@0.0.22'
import type { TemplateEntry } from './registry.ts'
interface SignupCodeInviteProps {
recipientName?: string
associationName?: string
code?: string
link?: string
roleLabel?: string
expiresAt?: string
}
const SITE_NAME = 'Avria Community Management'
const SignupCodeInviteEmail = ({ recipientName, associationName, code, link, roleLabel, expiresAt }: SignupCodeInviteProps) => (
<Html lang="en" dir="ltr">
<Head />
<Preview>Your registration code for {associationName || SITE_NAME}</Preview>
<Body style={main}>
<Container style={container}>
<Section style={brandBar} />
<Heading style={h1}>You're invited to register</Heading>
<Text style={text}>Hello {recipientName || 'there'},</Text>
<Text style={text}>
{associationName ? `${associationName}` : SITE_NAME} has set up an account for you
{roleLabel ? ` as a ${roleLabel}` : ''}. Click the button below to complete your registration —
your email will be verified automatically.
</Text>
{link && <Button href={link} style={button}>Complete registration</Button>}
{code && (
<Text style={meta}>
Or enter this code manually: <strong style={{ color: '#111827' }}>{code}</strong>
</Text>
)}
{expiresAt && <Text style={meta}>This invitation expires on {expiresAt}.</Text>}
<Text style={footer}>
If you weren't expecting this email, you can safely ignore it.
</Text>
</Container>
</Body>
</Html>
)
export const template = {
component: SignupCodeInviteEmail,
subject: (data: Record<string, any>) =>
`Your registration code for ${data.associationName || SITE_NAME}`,
displayName: 'Sign-up code invitation',
previewData: {
recipientName: 'Jane Smith',
associationName: 'Sample HOA',
code: 'ABC123XYZ9',
link: 'https://avria.cloud/register/ABC123XYZ9',
roleLabel: 'Homeowner',
expiresAt: 'June 1, 2026',
},
} satisfies TemplateEntry
const main = { backgroundColor: '#ffffff', fontFamily: 'Inter, Arial, sans-serif' }
const container = { maxWidth: '600px', margin: '0 auto', padding: '28px 24px' }
const brandBar = { height: '5px', backgroundColor: '#2563eb', borderRadius: '6px', marginBottom: '24px' }
const h1 = { color: '#111827', fontSize: '24px', lineHeight: '32px', margin: '0 0 14px', fontWeight: '700' }
const text = { color: '#374151', fontSize: '15px', lineHeight: '24px', margin: '0 0 18px' }
const meta = { color: '#6b7280', fontSize: '13px', lineHeight: '20px', margin: '14px 0 0' }
const button = { backgroundColor: '#2563eb', color: '#ffffff', borderRadius: '6px', fontSize: '14px', fontWeight: '600', textDecoration: 'none', padding: '12px 18px' }
const footer = { color: '#6b7280', fontSize: '12px', lineHeight: '18px', margin: '28px 0 0' }
@@ -0,0 +1,46 @@
import * as React from 'npm:react@18.3.1'
import { Body, Container, Head, Heading, Html, Preview, Text, Button } from 'npm:@react-email/components@0.0.22'
import type { TemplateEntry } from './registry.ts'
const SITE_NAME = 'Avria Community Management'
const DEFAULT_LINK = 'https://avria.cloud/dashboard/tasks'
interface Props {
taskTitle?: string
assignedByName?: string
link?: string
}
const TaskNotificationEmail = ({ taskTitle, assignedByName, link }: Props) => (
<Html lang="en" dir="ltr">
<Head />
<Preview>New task assigned to you</Preview>
<Body style={main}>
<Container style={container}>
<Heading style={h1}>New task assigned</Heading>
<Text style={text}>
{assignedByName ? `${assignedByName} has assigned ` : 'You have been assigned '}
a new task:
</Text>
<Text style={taskBox}><strong>{taskTitle || 'New task'}</strong></Text>
<Button href={link || DEFAULT_LINK} style={button}>View Task</Button>
<Text style={footer}>This notification was sent by {SITE_NAME}.</Text>
</Container>
</Body>
</Html>
)
export const template = {
component: TaskNotificationEmail,
subject: (d: Record<string, any>) => `New Task Assigned: ${d.taskTitle || 'New task'}`,
displayName: 'Task notification',
previewData: { taskTitle: 'Review monthly financial report', assignedByName: 'Jane Admin', link: DEFAULT_LINK },
} satisfies TemplateEntry
const main = { backgroundColor: '#ffffff', fontFamily: 'Inter, Arial, sans-serif' }
const container = { maxWidth: '600px', margin: '0 auto', padding: '28px 24px' }
const h1 = { color: '#111827', fontSize: '22px', lineHeight: '30px', margin: '0 0 14px', fontWeight: '700' }
const text = { color: '#374151', fontSize: '15px', lineHeight: '24px', margin: '0 0 12px' }
const taskBox = { background: '#f6f7f9', border: '1px solid #e5e7eb', borderRadius: '6px', padding: '12px 14px', color: '#111827', fontSize: '15px', margin: '0 0 20px' }
const button = { backgroundColor: '#2941a4', color: '#ffffff', borderRadius: '6px', fontSize: '14px', fontWeight: '600', textDecoration: 'none', padding: '12px 18px' }
const footer = { color: '#6b7280', fontSize: '12px', lineHeight: '18px', margin: '28px 0 0' }
@@ -0,0 +1,70 @@
import * as React from 'npm:react@18.3.1'
import { Body, Button, Container, Head, Heading, Html, Preview, Section, Text } from 'npm:@react-email/components@0.0.22'
import type { TemplateEntry } from './registry.ts'
interface TenantInfoRequestProps {
ownerName?: string
propertyAddress?: string
associationName?: string
requesterName?: string
customMessage?: string
link?: string
expiresAt?: string
}
const SITE_NAME = 'Avria Community Management'
const TenantInfoRequestEmail = ({ ownerName, propertyAddress, associationName, requesterName, customMessage, link, expiresAt }: TenantInfoRequestProps) => (
<Html lang="en" dir="ltr">
<Head />
<Preview>Tenant information requested for {propertyAddress || 'your property'}</Preview>
<Body style={main}>
<Container style={container}>
<Section style={brandBar} />
<Heading style={h1}>Tenant information requested</Heading>
<Text style={text}>Hello {ownerName || 'Owner'},</Text>
<Text style={text}>
{requesterName || SITE_NAME} is requesting current tenant information
{propertyAddress ? ` for the property at ${propertyAddress}` : ''}
{associationName ? ` (${associationName})` : ''}.
Please use the secure link below to submit or update this information.
</Text>
{customMessage && (
<Section style={messageBox}>
<Text style={messageText}>{customMessage}</Text>
</Section>
)}
{link && <Button href={link} style={button}>Submit tenant information</Button>}
{expiresAt && <Text style={meta}>This link expires on {expiresAt}.</Text>}
<Text style={footer}>This request was sent by {SITE_NAME}. If you weren't expecting it, you can ignore this email.</Text>
</Container>
</Body>
</Html>
)
export const template = {
component: TenantInfoRequestEmail,
subject: (data: Record<string, any>) =>
`Action needed: Submit tenant information${data.propertyAddress ? ` for ${data.propertyAddress}` : ''}`,
displayName: 'Tenant info request',
previewData: {
ownerName: 'Jane Owner',
propertyAddress: '123 Main Street',
associationName: 'Sunset Hills HOA',
requesterName: 'Avria Community Management',
customMessage: 'Please update your tenant details before the end of the month.',
link: 'https://avria.cloud/tenant-info/sample-token',
expiresAt: 'June 1, 2026',
},
} satisfies TemplateEntry
const main = { backgroundColor: '#ffffff', fontFamily: 'Inter, Arial, sans-serif' }
const container = { maxWidth: '600px', margin: '0 auto', padding: '28px 24px' }
const brandBar = { height: '5px', backgroundColor: '#2563eb', borderRadius: '6px', marginBottom: '24px' }
const h1 = { color: '#111827', fontSize: '24px', lineHeight: '32px', margin: '0 0 14px', fontWeight: '700' }
const text = { color: '#374151', fontSize: '15px', lineHeight: '24px', margin: '0 0 18px' }
const messageBox = { backgroundColor: '#f0f9ff', border: '1px solid #bae6fd', borderRadius: '8px', padding: '14px 16px', margin: '0 0 20px' }
const messageText = { color: '#0369a1', fontSize: '14px', lineHeight: '22px', margin: '0', whiteSpace: 'pre-wrap' as const }
const meta = { color: '#6b7280', fontSize: '13px', lineHeight: '20px', margin: '14px 0 0' }
const button = { backgroundColor: '#2563eb', color: '#ffffff', borderRadius: '6px', fontSize: '14px', fontWeight: '600', textDecoration: 'none', padding: '12px 18px' }
const footer = { color: '#6b7280', fontSize: '12px', lineHeight: '18px', margin: '28px 0 0' }
@@ -0,0 +1,59 @@
import * as React from 'npm:react@18.3.1'
import { Body, Button, Container, Head, Heading, Html, Preview, Section, Text } from 'npm:@react-email/components@0.0.22'
import type { TemplateEntry } from './registry.ts'
interface TicketResponseProps {
recipientName?: string
responderName?: string
ticketTitle?: string
response?: string
link?: string
}
const SITE_NAME = 'Avria Community Management'
const TicketResponseEmail = ({ recipientName, responderName, ticketTitle, response, link }: TicketResponseProps) => (
<Html lang="en" dir="ltr">
<Head />
<Preview>New response on your ticket: {ticketTitle || 'Support request'}</Preview>
<Body style={main}>
<Container style={container}>
<Section style={brandBar} />
<Heading style={h1}>New response on your ticket</Heading>
<Text style={text}>{recipientName ? `${recipientName}, ` : ''}{responderName || 'Staff'} replied to your homeowner ticket.</Text>
<Section style={panel}>
<Text style={label}>Ticket</Text>
<Text style={value}>{ticketTitle || 'Support request'}</Text>
</Section>
{response && <Text style={quote}>{response}</Text>}
{link && <Button href={link} style={button}>View ticket</Button>}
<Text style={footer}>This notification was sent by {SITE_NAME}.</Text>
</Container>
</Body>
</Html>
)
export const template = {
component: TicketResponseEmail,
subject: (data: Record<string, any>) => `New response: ${data.ticketTitle || 'Your homeowner ticket'}`,
displayName: 'Ticket response notification',
previewData: {
recipientName: 'Demo Homeowner',
responderName: 'Avria Staff',
ticketTitle: 'Gate access issue',
response: 'Thanks for the details. We are reviewing this now and will follow up shortly.',
link: 'https://avria.cloud/homeowner/tickets',
},
} satisfies TemplateEntry
const main = { backgroundColor: '#ffffff', fontFamily: 'Inter, Arial, sans-serif' }
const container = { maxWidth: '600px', margin: '0 auto', padding: '28px 24px' }
const brandBar = { height: '5px', backgroundColor: '#2563eb', borderRadius: '6px', marginBottom: '24px' }
const h1 = { color: '#111827', fontSize: '24px', lineHeight: '32px', margin: '0 0 14px', fontWeight: '700' }
const text = { color: '#374151', fontSize: '15px', lineHeight: '24px', margin: '0 0 18px' }
const panel = { backgroundColor: '#f8fafc', border: '1px solid #e5e7eb', borderRadius: '8px', padding: '16px', margin: '20px 0' }
const label = { color: '#6b7280', fontSize: '12px', textTransform: 'uppercase' as const, letterSpacing: '0.04em', margin: '0 0 6px' }
const value = { color: '#111827', fontSize: '17px', lineHeight: '24px', fontWeight: '700', margin: '0' }
const quote = { color: '#374151', fontSize: '14px', lineHeight: '22px', backgroundColor: '#f8fafc', borderLeft: '4px solid #2563eb', padding: '12px 14px', margin: '0 0 22px', whiteSpace: 'pre-wrap' as const }
const button = { backgroundColor: '#2563eb', color: '#ffffff', borderRadius: '6px', fontSize: '14px', fontWeight: '600', textDecoration: 'none', padding: '12px 18px' }
const footer = { color: '#6b7280', fontSize: '12px', lineHeight: '18px', margin: '28px 0 0' }
@@ -0,0 +1,65 @@
import * as React from 'npm:react@18.3.1'
import { Body, Button, Container, Head, Heading, Html, Preview, Section, Text } from 'npm:@react-email/components@0.0.22'
import type { TemplateEntry } from './registry.ts'
interface TicketSubmittedProps {
recipientName?: string
homeownerName?: string
ticketTitle?: string
priority?: string
category?: string
summary?: string
link?: string
}
const SITE_NAME = 'Avria Community Management'
const TicketSubmittedEmail = ({ recipientName, homeownerName, ticketTitle, priority, category, summary, link }: TicketSubmittedProps) => (
<Html lang="en" dir="ltr">
<Head />
<Preview>New homeowner ticket: {ticketTitle || 'Support request'}</Preview>
<Body style={main}>
<Container style={container}>
<Section style={brandBar} />
<Heading style={h1}>New homeowner ticket</Heading>
<Text style={text}>{recipientName ? `${recipientName}, ` : ''}a homeowner submitted a ticket that needs staff review.</Text>
<Section style={panel}>
<Text style={label}>Ticket</Text>
<Text style={value}>{ticketTitle || 'Support request'}</Text>
<Text style={meta}>{homeownerName || 'Homeowner'}{category ? ` · ${category}` : ''}{priority ? ` · ${priority} priority` : ''}</Text>
</Section>
{summary && <Text style={summaryStyle}>{summary}</Text>}
{link && <Button href={link} style={button}>Open ticket inbox</Button>}
<Text style={footer}>This notification was sent by {SITE_NAME}.</Text>
</Container>
</Body>
</Html>
)
export const template = {
component: TicketSubmittedEmail,
subject: (data: Record<string, any>) => `New homeowner ticket: ${data.ticketTitle || 'Support request'}`,
displayName: 'Ticket submitted notification',
previewData: {
recipientName: 'Alex',
homeownerName: 'Demo Homeowner',
ticketTitle: 'Gate access issue',
priority: 'medium',
category: 'general',
summary: 'Issue Description:\nThe gate code is not working.\n\nProperty: 100 Main Street',
link: 'https://avria.cloud/dashboard/form-inbox',
},
} satisfies TemplateEntry
const main = { backgroundColor: '#ffffff', fontFamily: 'Inter, Arial, sans-serif' }
const container = { maxWidth: '600px', margin: '0 auto', padding: '28px 24px' }
const brandBar = { height: '5px', backgroundColor: '#2563eb', borderRadius: '6px', marginBottom: '24px' }
const h1 = { color: '#111827', fontSize: '24px', lineHeight: '32px', margin: '0 0 14px', fontWeight: '700' }
const text = { color: '#374151', fontSize: '15px', lineHeight: '24px', margin: '0 0 18px' }
const panel = { backgroundColor: '#f8fafc', border: '1px solid #e5e7eb', borderRadius: '8px', padding: '16px', margin: '20px 0' }
const label = { color: '#6b7280', fontSize: '12px', textTransform: 'uppercase' as const, letterSpacing: '0.04em', margin: '0 0 6px' }
const value = { color: '#111827', fontSize: '17px', lineHeight: '24px', fontWeight: '700', margin: '0 0 6px' }
const meta = { color: '#6b7280', fontSize: '13px', lineHeight: '20px', margin: '0' }
const summaryStyle = { color: '#374151', fontSize: '14px', lineHeight: '22px', whiteSpace: 'pre-wrap' as const, margin: '0 0 22px' }
const button = { backgroundColor: '#2563eb', color: '#ffffff', borderRadius: '6px', fontSize: '14px', fontWeight: '600', textDecoration: 'none', padding: '12px 18px' }
const footer = { color: '#6b7280', fontSize: '12px', lineHeight: '18px', margin: '28px 0 0' }
@@ -0,0 +1,60 @@
import * as React from 'npm:react@18.3.1'
import { Body, Button, Container, Head, Heading, Html, Preview, Section, Text } from 'npm:@react-email/components@0.0.22'
import type { TemplateEntry } from './registry.ts'
interface VendorInsuranceRequestProps {
vendorName?: string
requesterName?: string
link?: string
expiresAt?: string
}
const SITE_NAME = 'Avria Community Management'
const VendorInsuranceRequestEmail = ({ vendorName, requesterName, link, expiresAt }: VendorInsuranceRequestProps) => (
<Html lang="en" dir="ltr">
<Head />
<Preview>Insurance information requested for {vendorName || 'your account'}</Preview>
<Body style={main}>
<Container style={container}>
<Section style={brandBar} />
<Heading style={h1}>Insurance information requested</Heading>
<Text style={text}>
Hello {vendorName || 'Vendor'},
</Text>
<Text style={text}>
{requesterName || SITE_NAME} is requesting your current certificate of insurance information.
Please use the secure link below to submit your insurance carrier, policy number, and expiration date.
You can also upload a copy of your certificate.
</Text>
{link && <Button href={link} style={button}>Submit insurance information</Button>}
{expiresAt && (
<Text style={meta}>This link expires on {expiresAt}.</Text>
)}
<Text style={footer}>This request was sent by {SITE_NAME}. If you weren't expecting it, you can ignore this email.</Text>
</Container>
</Body>
</Html>
)
export const template = {
component: VendorInsuranceRequestEmail,
subject: (data: Record<string, any>) =>
`Action needed: Submit insurance information for ${data.vendorName || 'your account'}`,
displayName: 'Vendor insurance request',
previewData: {
vendorName: 'Acme Plumbing',
requesterName: 'Avria Community Management',
link: 'https://avria.cloud/vendor-insurance/sample-token',
expiresAt: 'June 1, 2026',
},
} satisfies TemplateEntry
const main = { backgroundColor: '#ffffff', fontFamily: 'Inter, Arial, sans-serif' }
const container = { maxWidth: '600px', margin: '0 auto', padding: '28px 24px' }
const brandBar = { height: '5px', backgroundColor: '#2563eb', borderRadius: '6px', marginBottom: '24px' }
const h1 = { color: '#111827', fontSize: '24px', lineHeight: '32px', margin: '0 0 14px', fontWeight: '700' }
const text = { color: '#374151', fontSize: '15px', lineHeight: '24px', margin: '0 0 18px' }
const meta = { color: '#6b7280', fontSize: '13px', lineHeight: '20px', margin: '14px 0 0' }
const button = { backgroundColor: '#2563eb', color: '#ffffff', borderRadius: '6px', fontSize: '14px', fontWeight: '600', textDecoration: 'none', padding: '12px 18px' }
const footer = { color: '#6b7280', fontSize: '12px', lineHeight: '18px', margin: '28px 0 0' }
@@ -0,0 +1,58 @@
import * as React from 'npm:react@18.3.1'
import { Body, Button, Container, Head, Heading, Html, Preview, Section, Text } from 'npm:@react-email/components@0.0.22'
import type { TemplateEntry } from './registry.ts'
interface VendorProfileRequestProps {
vendorName?: string
requesterName?: string
link?: string
expiresAt?: string
}
const SITE_NAME = 'Avria Community Management'
const VendorProfileRequestEmail = ({ vendorName, requesterName, link, expiresAt }: VendorProfileRequestProps) => (
<Html lang="en" dir="ltr">
<Head />
<Preview>Vendor profile information requested for {vendorName || 'your account'}</Preview>
<Body style={main}>
<Container style={container}>
<Section style={brandBar} />
<Heading style={h1}>Vendor profile update requested</Heading>
<Text style={text}>Hello {vendorName || 'Vendor'},</Text>
<Text style={text}>
{requesterName || SITE_NAME} is requesting that you submit or update your vendor profile.
Please use the secure link below to provide your remittance address, Tax ID (W-9 / 1099 status),
insurance documentation, and direct deposit (ACH) details.
</Text>
{link && <Button href={link} style={button}>Submit vendor profile</Button>}
{expiresAt && <Text style={meta}>This secure link expires on {expiresAt}.</Text>}
<Text style={footer}>
This request was sent by {SITE_NAME}. If you weren't expecting it, you can ignore this email.
</Text>
</Container>
</Body>
</Html>
)
export const template = {
component: VendorProfileRequestEmail,
subject: (data: Record<string, any>) =>
`Action needed: Submit vendor profile for ${data.vendorName || 'your account'}`,
displayName: 'Vendor profile request',
previewData: {
vendorName: 'Acme Plumbing',
requesterName: 'Avria Community Management',
link: 'https://avria.cloud/vendor-profile/sample-token',
expiresAt: 'June 1, 2026',
},
} satisfies TemplateEntry
const main = { backgroundColor: '#ffffff', fontFamily: 'Inter, Arial, sans-serif' }
const container = { maxWidth: '600px', margin: '0 auto', padding: '28px 24px' }
const brandBar = { height: '5px', backgroundColor: '#2563eb', borderRadius: '6px', marginBottom: '24px' }
const h1 = { color: '#111827', fontSize: '24px', lineHeight: '32px', margin: '0 0 14px', fontWeight: '700' }
const text = { color: '#374151', fontSize: '15px', lineHeight: '24px', margin: '0 0 18px' }
const meta = { color: '#6b7280', fontSize: '13px', lineHeight: '20px', margin: '14px 0 0' }
const button = { backgroundColor: '#2563eb', color: '#ffffff', borderRadius: '6px', fontSize: '14px', fontWeight: '600', textDecoration: 'none', padding: '12px 18px' }
const footer = { color: '#6b7280', fontSize: '12px', lineHeight: '18px', margin: '28px 0 0' }