BREAKING: postgres + saas

This commit is contained in:
Vasily Zubarev
2025-04-03 13:07:54 +02:00
parent 54a892ddb0
commit f523b1f8ba
136 changed files with 3971 additions and 1563 deletions

View File

@@ -0,0 +1,57 @@
import React from "react"
interface EmailLayoutProps {
children: React.ReactNode
preview?: string
}
export const EmailLayout: React.FC<EmailLayoutProps> = ({ children, preview = "" }) => (
<html>
<head>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="color-scheme" content="light" />
<meta name="supported-color-schemes" content="light" />
{preview && <title>{preview}</title>}
<style
dangerouslySetInnerHTML={{
__html: `
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
margin: 0;
padding: 0;
color: #333;
background-color: #f9f9f9;
}
.container {
max-width: 600px;
margin: 40px auto;
padding: 20px;
background-color: #ffffff;
border-radius: 8px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.header {
margin-bottom: 20px;
text-align: left;
}
.logo {
width: 60px;
height: 60px;
margin-bottom: 10px;
}
.footer {
margin-top: 30px;
text-align: center;
font-size: 12px;
color: #666;
}
`,
}}
/>
</head>
<body>
<div className="container">{children}</div>
</body>
</html>
)

View File

@@ -0,0 +1,31 @@
import React from "react"
import { EmailLayout } from "./email-layout"
export const NewsletterWelcomeEmail: React.FC = () => (
<EmailLayout preview="Welcome to TaxHacker Newsletter!">
<h2 style={{ color: "#4f46e5" }}>👋 Welcome to TaxHacker!</h2>
<p style={{ fontSize: "16px", lineHeight: "1.5", color: "#333" }}>
Thank you for subscribing to our updates. We'll keep you updated about:
</p>
<ul
style={{
paddingLeft: "20px",
fontSize: "16px",
lineHeight: "1.5",
color: "#333",
}}
>
<li>New features and improvements</li>
<li>Our plans and timelines</li>
<li>Updates about our SaaS version</li>
</ul>
<div style={{ marginTop: "30px", borderTop: "1px solid #eee", paddingTop: "20px" }}>
<p style={{ fontSize: "16px", color: "#333" }}>
Best regards,
<br />
The TaxHacker Team
</p>
</div>
</EmailLayout>
)

View File

@@ -0,0 +1,38 @@
import React from "react"
import { EmailLayout } from "./email-layout"
interface OTPEmailProps {
otp: string
}
export const OTPEmail: React.FC<OTPEmailProps> = ({ otp }) => (
<EmailLayout preview="Your TaxHacker verification code">
<h2 style={{ textAlign: "center", color: "#4f46e5" }}>🔑 Your TaxHacker verification code</h2>
<div
style={{
margin: "20px 0",
padding: "20px",
backgroundColor: "#f3f4f6",
borderRadius: "6px",
textAlign: "center",
}}
>
<p style={{ fontSize: "16px", marginBottom: "10px" }}>Your verification code is:</p>
<p
style={{
fontSize: "24px",
fontWeight: "bold",
color: "#4f46e5",
letterSpacing: "2px",
margin: "0",
}}
>
{otp}
</p>
</div>
<p style={{ fontSize: "14px", color: "#666", textAlign: "center" }}>This code will expire in 10 minutes.</p>
<p style={{ fontSize: "14px", color: "#666", textAlign: "center" }}>
If you didn't request this code, please ignore this email.
</p>
</EmailLayout>
)