Initial v2 commit: complete rebuild with unified API + React admin

Phase 1-14 complete:
- Unified Express.js API (TypeScript, Prisma ORM, PostgreSQL 16)
- React Admin GUI (Vite + Ant Design + Zustand)
- JWT auth with refresh tokens
- Influence: Campaigns, Representatives, Responses, Email Queue
- Map: Locations, Cuts, Shifts, Canvassing System
- NAR data import infrastructure (2025 format)
- Listmonk newsletter integration
- Landing page builder (GrapesJS)
- MkDocs + Code Server integration
- Volunteer portal with GPS tracking
- Monitoring stack (Prometheus, Grafana, Alertmanager)
- Pangolin tunnel integration

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-11 10:05:04 -07:00
commit a77306fac2
590 changed files with 159852 additions and 0 deletions

View File

@@ -0,0 +1,132 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{{CAMPAIGN_TITLE}} - Campaign Message</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
line-height: 1.6;
color: #333;
max-width: 600px;
margin: 0 auto;
padding: 20px;
}
.container {
background-color: #f9f9f9;
border-radius: 8px;
padding: 30px;
border: 1px solid #e0e0e0;
}
.header {
text-align: center;
margin-bottom: 30px;
border-bottom: 2px solid #e74c3c;
padding-bottom: 20px;
}
.logo {
color: #e74c3c;
font-size: 24px;
font-weight: bold;
}
.campaign-badge {
background: linear-gradient(135deg, #e74c3c, #c0392b);
color: white;
padding: 8px 16px;
border-radius: 20px;
font-size: 14px;
font-weight: bold;
display: inline-block;
margin-top: 10px;
}
.content {
background-color: white;
padding: 25px;
border-radius: 6px;
margin-bottom: 20px;
border-left: 4px solid #e74c3c;
}
.message-body {
font-size: 16px;
line-height: 1.7;
margin: 20px 0;
color: #2c3e50;
}
.sender-info {
background-color: #fff5f5;
padding: 15px;
border-radius: 4px;
margin: 20px 0;
border: 1px solid #fecaca;
}
.info-item {
margin: 8px 0;
display: flex;
align-items: center;
}
.info-label {
font-weight: bold;
display: inline-block;
width: 120px;
color: #7f1d1d;
}
.info-value {
color: #2c3e50;
}
.footer {
text-align: center;
font-size: 12px;
color: #6c757d;
margin-top: 30px;
padding-top: 20px;
border-top: 1px solid #e9ecef;
}
.app-branding {
color: #e74c3c;
font-weight: bold;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<div class="logo">{{ORGANIZATION_NAME}}</div>
<div class="campaign-badge">{{CAMPAIGN_TITLE}}</div>
<p style="margin: 10px 0 0 0; color: #6c757d;">Constituent Advocacy Campaign</p>
</div>
<div class="content">
<div class="message-body">
{{MESSAGE}}
</div>
<div class="sender-info">
<h4 style="margin: 0 0 10px 0; color: #7f1d1d;">Campaign Participant Information:</h4>
<div class="info-item">
<span class="info-label">Name:</span>
<span class="info-value">{{USER_NAME}}</span>
</div>
<div class="info-item">
<span class="info-label">Email:</span>
<span class="info-value">{{USER_EMAIL}}</span>
</div>
<div class="info-item">
<span class="info-label">Postal Code:</span>
<span class="info-value">{{POSTAL_CODE}}</span>
</div>
{{#if RECIPIENT_NAME}}
<div class="info-item">
<span class="info-label">To:</span>
<span class="info-value">{{RECIPIENT_NAME}} ({{RECIPIENT_LEVEL}})</span>
</div>
{{/if}}
</div>
</div>
<div class="footer">
<p>This message was sent via <span class="app-branding">{{ORGANIZATION_NAME}}</span> as part of the "<strong>{{CAMPAIGN_TITLE}}</strong>" campaign at {{TIMESTAMP}}</p>
<p>This platform enables constituents to participate in organized advocacy campaigns to communicate with their elected representatives.</p>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,16 @@
{{CAMPAIGN_TITLE}} - Campaign Message
{{MESSAGE}}
---
Campaign Participant Information:
Name: {{USER_NAME}}
Email: {{USER_EMAIL}}
Postal Code: {{POSTAL_CODE}}
{{#if RECIPIENT_NAME}}
To: {{RECIPIENT_NAME}} ({{RECIPIENT_LEVEL}})
{{/if}}
---
This message was sent via {{ORGANIZATION_NAME}} as part of the "{{CAMPAIGN_TITLE}}" campaign at {{TIMESTAMP}}
This platform enables constituents to participate in organized advocacy campaigns to communicate with their elected representatives.

View File

@@ -0,0 +1,167 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Verify Representative Response - {{CAMPAIGN_TITLE}}</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
line-height: 1.6;
color: #333;
max-width: 600px;
margin: 0 auto;
padding: 20px;
}
.container {
background-color: #f9f9f9;
border-radius: 8px;
padding: 30px;
border: 1px solid #e0e0e0;
}
.header {
text-align: center;
margin-bottom: 30px;
border-bottom: 2px solid #2563eb;
padding-bottom: 20px;
}
.logo {
color: #2563eb;
font-size: 24px;
font-weight: bold;
}
.campaign-badge {
background: linear-gradient(135deg, #2563eb, #1d4ed8);
color: white;
padding: 8px 16px;
border-radius: 20px;
font-size: 14px;
font-weight: bold;
display: inline-block;
margin-top: 10px;
}
.content {
background-color: white;
padding: 25px;
border-radius: 6px;
margin-bottom: 20px;
border-left: 4px solid #2563eb;
}
.response-type {
display: inline-block;
background: #dbeafe;
color: #1e40af;
padding: 4px 12px;
border-radius: 12px;
font-size: 13px;
font-weight: 600;
margin-bottom: 12px;
}
.response-text {
font-size: 15px;
line-height: 1.7;
color: #2c3e50;
background: #f8fafc;
padding: 16px;
border-radius: 6px;
border: 1px solid #e2e8f0;
margin: 12px 0;
}
.info-section {
background-color: #eff6ff;
padding: 15px;
border-radius: 4px;
margin: 20px 0;
border: 1px solid #bfdbfe;
}
.info-item {
margin: 8px 0;
display: flex;
align-items: center;
}
.info-label {
font-weight: bold;
display: inline-block;
width: 120px;
color: #1e40af;
}
.info-value {
color: #2c3e50;
}
.cta-section {
text-align: center;
margin: 30px 0;
}
.btn {
display: inline-block;
padding: 14px 32px;
border-radius: 6px;
font-size: 16px;
font-weight: bold;
text-decoration: none;
margin: 8px;
}
.btn-verify {
background: linear-gradient(135deg, #16a34a, #15803d);
color: white;
}
.btn-report {
background: linear-gradient(135deg, #dc2626, #b91c1c);
color: white;
}
.footer {
text-align: center;
font-size: 12px;
color: #6c757d;
margin-top: 30px;
padding-top: 20px;
border-top: 1px solid #e9ecef;
}
.app-branding {
color: #2563eb;
font-weight: bold;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<div class="logo">{{ORGANIZATION_NAME}}</div>
<div class="campaign-badge">{{CAMPAIGN_TITLE}}</div>
<p style="margin: 10px 0 0 0; color: #6c757d;">Response Verification Request</p>
</div>
<div class="content">
<p>A constituent has submitted a response attributed to you as part of the "<strong>{{CAMPAIGN_TITLE}}</strong>" campaign. Please review the details below and verify or report this response.</p>
<div class="response-type">{{RESPONSE_TYPE}}</div>
<div class="response-text">
{{RESPONSE_TEXT}}
</div>
<div class="info-section">
<h4 style="margin: 0 0 10px 0; color: #1e40af;">Submission Details:</h4>
<div class="info-item">
<span class="info-label">Submitted:</span>
<span class="info-value">{{SUBMITTED_DATE}}</span>
</div>
<div class="info-item">
<span class="info-label">Submitted By:</span>
<span class="info-value">{{SUBMITTER_NAME}}</span>
</div>
</div>
</div>
<div class="cta-section">
<p style="margin-bottom: 20px; color: #4b5563;">Did you provide this response?</p>
<a href="{{VERIFICATION_URL}}" class="btn btn-verify">Verify This Response</a>
<a href="{{REPORT_URL}}" class="btn btn-report">Report as Invalid</a>
</div>
<div class="footer">
<p>This verification was sent via <span class="app-branding">{{ORGANIZATION_NAME}}</span> at {{TIMESTAMP}}</p>
<p>If you did not expect this email, you can safely ignore it or click "Report as Invalid" to flag the submission.</p>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,29 @@
{{ORGANIZATION_NAME}} — Response Verification Request
Campaign: {{CAMPAIGN_TITLE}}
A constituent has submitted a response attributed to you as part of the "{{CAMPAIGN_TITLE}}" campaign. Please review the details below and verify or report this response.
Response Type: {{RESPONSE_TYPE}}
Response Text:
{{RESPONSE_TEXT}}
---
Submission Details:
- Submitted: {{SUBMITTED_DATE}}
- Submitted By: {{SUBMITTER_NAME}}
---
Did you provide this response?
Verify This Response: {{VERIFICATION_URL}}
Report as Invalid: {{REPORT_URL}}
---
This verification was sent via {{ORGANIZATION_NAME}} at {{TIMESTAMP}}.
If you did not expect this email, you can safely ignore it or visit the report link above to flag the submission.

View File

@@ -0,0 +1,154 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Shift Details - {{SHIFT_TITLE}}</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
line-height: 1.6;
color: #333;
max-width: 600px;
margin: 0 auto;
padding: 20px;
}
.container {
background-color: #f9f9f9;
border-radius: 8px;
padding: 30px;
border: 1px solid #e0e0e0;
}
.header {
text-align: center;
margin-bottom: 30px;
border-bottom: 2px solid #2563eb;
padding-bottom: 20px;
}
.logo {
color: #2563eb;
font-size: 24px;
font-weight: bold;
}
.shift-badge {
background: linear-gradient(135deg, #2563eb, #1d4ed8);
color: white;
padding: 8px 16px;
border-radius: 20px;
font-size: 14px;
font-weight: bold;
display: inline-block;
margin-top: 10px;
}
.content {
background-color: white;
padding: 25px;
border-radius: 6px;
margin-bottom: 20px;
border-left: 4px solid #2563eb;
}
.info-section {
background-color: #eff6ff;
padding: 15px;
border-radius: 4px;
margin: 20px 0;
border: 1px solid #bfdbfe;
}
.info-item {
margin: 8px 0;
display: flex;
align-items: center;
}
.info-label {
font-weight: bold;
display: inline-block;
width: 120px;
color: #1e40af;
}
.info-value {
color: #2c3e50;
}
.status-badge {
display: inline-block;
padding: 4px 12px;
border-radius: 12px;
font-size: 13px;
font-weight: 600;
background: #dbeafe;
color: #1e40af;
}
.description-section {
background: #f8fafc;
padding: 16px;
border-radius: 6px;
border: 1px solid #e2e8f0;
margin: 12px 0;
}
.footer {
text-align: center;
font-size: 12px;
color: #6c757d;
margin-top: 30px;
padding-top: 20px;
border-top: 1px solid #e9ecef;
}
.app-branding {
color: #2563eb;
font-weight: bold;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<div class="logo">{{ORGANIZATION_NAME}}</div>
<div class="shift-badge">{{SHIFT_TITLE}}</div>
<p style="margin: 10px 0 0 0; color: #6c757d;">Shift Details & Reminder</p>
</div>
<div class="content">
<p>Hi {{USER_NAME}},</p>
<p>Here are the details for your upcoming volunteer shift:</p>
<div class="info-section">
<h4 style="margin: 0 0 10px 0; color: #1e40af;">Shift Information:</h4>
<div class="info-item">
<span class="info-label">Shift:</span>
<span class="info-value"><strong>{{SHIFT_TITLE}}</strong></span>
</div>
<div class="info-item">
<span class="info-label">Date:</span>
<span class="info-value">{{SHIFT_DATE}}</span>
</div>
<div class="info-item">
<span class="info-label">Time:</span>
<span class="info-value">{{SHIFT_START_TIME}} — {{SHIFT_END_TIME}}</span>
</div>
<div class="info-item">
<span class="info-label">Location:</span>
<span class="info-value">{{SHIFT_LOCATION}}</span>
</div>
<div class="info-item">
<span class="info-label">Volunteers:</span>
<span class="info-value">{{CURRENT_VOLUNTEERS}} / {{MAX_VOLUNTEERS}}</span>
</div>
<div class="info-item">
<span class="info-label">Status:</span>
<span class="status-badge">{{SHIFT_STATUS}}</span>
</div>
</div>
{{#if SHIFT_DESCRIPTION}}
<div class="description-section">
<strong>Description:</strong>
<p style="margin: 8px 0 0 0;">{{SHIFT_DESCRIPTION}}</p>
</div>
{{/if}}
</div>
<div class="footer">
<p>This reminder was sent via <span class="app-branding">{{ORGANIZATION_NAME}}</span></p>
<p>Thank you for volunteering!</p>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,23 @@
{{ORGANIZATION_NAME}} — Shift Details & Reminder
Hi {{USER_NAME}},
Here are the details for your upcoming volunteer shift:
Shift Information:
- Shift: {{SHIFT_TITLE}}
- Date: {{SHIFT_DATE}}
- Time: {{SHIFT_START_TIME}} — {{SHIFT_END_TIME}}
- Location: {{SHIFT_LOCATION}}
- Volunteers: {{CURRENT_VOLUNTEERS}} / {{MAX_VOLUNTEERS}}
- Status: {{SHIFT_STATUS}}
{{#if SHIFT_DESCRIPTION}}
Description:
{{SHIFT_DESCRIPTION}}
{{/if}}
---
This reminder was sent via {{ORGANIZATION_NAME}}.
Thank you for volunteering!

View File

@@ -0,0 +1,168 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Shift Signup Confirmation - {{SHIFT_TITLE}}</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
line-height: 1.6;
color: #333;
max-width: 600px;
margin: 0 auto;
padding: 20px;
}
.container {
background-color: #f9f9f9;
border-radius: 8px;
padding: 30px;
border: 1px solid #e0e0e0;
}
.header {
text-align: center;
margin-bottom: 30px;
border-bottom: 2px solid #2563eb;
padding-bottom: 20px;
}
.logo {
color: #2563eb;
font-size: 24px;
font-weight: bold;
}
.shift-badge {
background: linear-gradient(135deg, #2563eb, #1d4ed8);
color: white;
padding: 8px 16px;
border-radius: 20px;
font-size: 14px;
font-weight: bold;
display: inline-block;
margin-top: 10px;
}
.content {
background-color: white;
padding: 25px;
border-radius: 6px;
margin-bottom: 20px;
border-left: 4px solid #2563eb;
}
.info-section {
background-color: #eff6ff;
padding: 15px;
border-radius: 4px;
margin: 20px 0;
border: 1px solid #bfdbfe;
}
.info-item {
margin: 8px 0;
display: flex;
align-items: center;
}
.info-label {
font-weight: bold;
display: inline-block;
width: 100px;
color: #1e40af;
}
.info-value {
color: #2c3e50;
}
.new-user-section {
background-color: #fef3c7;
padding: 15px;
border-radius: 4px;
margin: 20px 0;
border: 1px solid #fde68a;
}
.new-user-section strong {
color: #92400e;
}
.password-box {
background: #fff;
border: 2px dashed #d97706;
padding: 10px 16px;
border-radius: 6px;
font-family: monospace;
font-size: 18px;
text-align: center;
margin: 10px 0;
letter-spacing: 1px;
}
.btn {
display: inline-block;
padding: 12px 28px;
border-radius: 6px;
font-size: 15px;
font-weight: bold;
text-decoration: none;
background: linear-gradient(135deg, #2563eb, #1d4ed8);
color: white;
}
.footer {
text-align: center;
font-size: 12px;
color: #6c757d;
margin-top: 30px;
padding-top: 20px;
border-top: 1px solid #e9ecef;
}
.app-branding {
color: #2563eb;
font-weight: bold;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<div class="logo">{{ORGANIZATION_NAME}}</div>
<div class="shift-badge">Volunteer Shift</div>
<p style="margin: 10px 0 0 0; color: #6c757d;">Signup Confirmation</p>
</div>
<div class="content">
<p>Hi {{USER_NAME}},</p>
<p>You're confirmed for the following volunteer shift:</p>
<div class="info-section">
<h4 style="margin: 0 0 10px 0; color: #1e40af;">Shift Details:</h4>
<div class="info-item">
<span class="info-label">Shift:</span>
<span class="info-value"><strong>{{SHIFT_TITLE}}</strong></span>
</div>
<div class="info-item">
<span class="info-label">Date:</span>
<span class="info-value">{{SHIFT_DATE}}</span>
</div>
<div class="info-item">
<span class="info-label">Time:</span>
<span class="info-value">{{SHIFT_TIME}}</span>
</div>
<div class="info-item">
<span class="info-label">Location:</span>
<span class="info-value">{{SHIFT_LOCATION}}</span>
</div>
</div>
</div>
{{#if IS_NEW_USER}}
<div class="new-user-section">
<strong>A temporary account has been created for you.</strong>
<p style="margin: 8px 0;">You can use this account to manage your volunteer signups:</p>
<div class="password-box">{{TEMP_PASSWORD}}</div>
<p style="margin: 8px 0 0 0; font-size: 13px;">
Log in with your email (<strong>{{USER_EMAIL}}</strong>) and the password above.
</p>
<div style="text-align: center; margin-top: 15px;">
<a href="{{LOGIN_URL}}" class="btn">Log In</a>
</div>
</div>
{{/if}}
<div class="footer">
<p>This confirmation was sent via <span class="app-branding">{{ORGANIZATION_NAME}}</span></p>
<p>If you did not sign up for this shift, you can safely ignore this email.</p>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,28 @@
{{ORGANIZATION_NAME}} — Volunteer Shift Signup Confirmation
Hi {{USER_NAME}},
You're confirmed for the following volunteer shift:
Shift Details:
- Shift: {{SHIFT_TITLE}}
- Date: {{SHIFT_DATE}}
- Time: {{SHIFT_TIME}}
- Location: {{SHIFT_LOCATION}}
{{#if IS_NEW_USER}}
---
A temporary account has been created for you.
You can use this account to manage your volunteer signups.
Email: {{USER_EMAIL}}
Temporary Password: {{TEMP_PASSWORD}}
Log in at: {{LOGIN_URL}}
{{/if}}
---
This confirmation was sent via {{ORGANIZATION_NAME}}.
If you did not sign up for this shift, you can safely ignore this email.