From d25b9c382af896787ba82fd9f67e1f64ea5e6b9d Mon Sep 17 00:00:00 2001
From: BikerViking <160994481+BikerViking@users.noreply.github.com>
Date: Wed, 27 Aug 2025 15:59:01 -0400
Subject: [PATCH] fix: remove deprecated deps and restore accessibility
---
client/index.html | 8 +-
client/public/manifest.webmanifest | 8 +-
client/src/modules/App.tsx | 2 +-
client/src/modules/sections/Coverage.tsx | 2 +-
client/src/modules/sections/Credentials.tsx | 2 +-
client/src/modules/sections/ServiceMap.tsx | 10 +-
client/src/modules/widgets/ChatWidget.tsx | 12 ++-
server/package.json | 3 +-
server/server.js | 110 ++------------------
9 files changed, 39 insertions(+), 118 deletions(-)
diff --git a/client/index.html b/client/index.html
index 899f9c9..afe1075 100644
--- a/client/index.html
+++ b/client/index.html
@@ -10,7 +10,7 @@
"@context": "https://schema.org",
"@type": "Notary",
"name": "Keystone Notary Group, LLC",
- "image": "https://www.keystonenotarygroup.com/assets/logo_1.webp",
+ "image": "/assets/logo_1.png",
"url": "https://www.keystonenotarygroup.com",
"telephone": "+1-267-309-9000",
"email": "info@keystonenotarygroup.com",
@@ -31,8 +31,8 @@
-
-
+
+
@@ -58,7 +58,7 @@
"@context": "https://schema.org",
"@type": "LocalBusiness",
"name": "Keystone Notary Group, LLC",
- "image": "https://www.keystonenotarygroup.com/assets/logo_1.webp",
+ "image": "/assets/logo_1.png",
"url": "https://www.keystonenotarygroup.com",
"telephone": "+1-267-309-9000",
"email": "info@keystonenotarygroup.com",
diff --git a/client/public/manifest.webmanifest b/client/public/manifest.webmanifest
index 780a58c..b331a41 100644
--- a/client/public/manifest.webmanifest
+++ b/client/public/manifest.webmanifest
@@ -7,14 +7,14 @@
"theme_color": "#0b0b0d",
"icons": [
{
- "src": "https://www.keystonenotarygroup.com/assets/icon-192.webp",
+ "src": "/assets/icon-192.png",
"sizes": "192x192",
- "type": "image/webp"
+ "type": "image/png"
},
{
- "src": "https://www.keystonenotarygroup.com/assets/icon-512.webp",
+ "src": "/assets/icon-512.png",
"sizes": "512x512",
- "type": "image/webp"
+ "type": "image/png"
}
]
}
\ No newline at end of file
diff --git a/client/src/modules/App.tsx b/client/src/modules/App.tsx
index 271d897..30fccc3 100644
--- a/client/src/modules/App.tsx
+++ b/client/src/modules/App.tsx
@@ -45,7 +45,7 @@ export default function App(){
+
{m.text}
))}AI assistant powered by OpenAI. Do not share sensitive info.
diff --git a/server/package.json b/server/package.json index e368386..83ad935 100644 --- a/server/package.json +++ b/server/package.json @@ -18,11 +18,10 @@ "express": "^4.19.2", "express-rate-limit": "^7.3.1", "morgan": "^1.10.0", - "nodemailer": "^6.9.14", "@sendgrid/mail": "^8.1.3", "googleapis": "^140.0.0", "cookie-parser": "^1.4.6", - "multer": "2.0.2", + "multer": "^1.4.5-lts.1", "redis": "^4.6.7" }, "devDependencies": { diff --git a/server/server.js b/server/server.js index 66d33e9..99855c0 100644 --- a/server/server.js +++ b/server/server.js @@ -3,7 +3,6 @@ import express from "express"; import cors from "cors"; import morgan from "morgan"; import rateLimit from "express-rate-limit"; -import nodemailer from "nodemailer"; import cookieParser from "cookie-parser"; import { google } from "googleapis"; // Redis is optional; dynamically import so tests can run without the module @@ -190,17 +189,10 @@ app.use(express.json()); app.use(morgan("tiny")); app.use(cookieParser()); -// DEMO / ZERO-CONFIG MODE: -// - If SMTP isn't set, log emails to console and still return success. -// - If OPENAI_API_KEY is missing, return a helpful canned response. -const ZERO_CONFIG = !process.env.SMTP_HOST || !process.env.OPENAI_API_KEY; - const limiter = rateLimit({ windowMs: 60 * 1000, max: 30 }); app.use("/api/", limiter); // --- Admin magic-link auth & CMS storage --- -const ADMIN_EMAIL = - process.env.ADMIN_EMAIL || process.env.EMAIL_TO || "owner@example.com"; const ADMIN_TOKEN_TTL_MS = 15 * 60 * 1000; const ADMIN_SESSION_TTL_MS = 12 * 60 * 60 * 1000; const REDIS_URL = process.env.REDIS_URL; @@ -309,17 +301,6 @@ app.post("/api/admin/request-magic-link", async (req, res) => { } catch (e) { console.error("Send email failed", e); } - } else if (transporter) { - try { - await transporter.sendMail({ - to: email, - from: process.env.EMAIL_FROM || "no-reply@example.com", - subject: "Your Keystone admin link", - text: `Click to log in: ${url}`, - }); - } catch (e) { - console.error(e); - } } else { console.log("[DEMO] Admin magic link:", url); } @@ -579,40 +560,6 @@ app.get("/api/route", async (req, res) => { return res.status(501).json({ error: "routing provider not configured" }); }); -let transporter = null; -if (process.env.EMAIL_TRANSPORT === "smtp") { - transporter = nodemailer.createTransport({ - host: process.env.SMTP_HOST, - port: Number(process.env.SMTP_PORT || 587), - secure: false, - auth: { user: process.env.SMTP_USER, pass: process.env.SMTP_PASS }, - }); -} - -function buildICS(summary, description) { - const dt = new Date(); - const dtStart = new Date(dt.getTime() + 60 * 60 * 1000); // default start in 1h - const dtEnd = new Date(dtStart.getTime() + 60 * 60 * 1000); // 1h duration - function fmt(d) { - return d.toISOString().replace(/[-:]/g, "").split(".")[0] + "Z"; - } - return [ - "BEGIN:VCALENDAR", - "VERSION:2.0", - "PRODID:-//Keystone Notary Group//EN", - "CALSCALE:GREGORIAN", - "METHOD:PUBLISH", - "BEGIN:VEVENT", - "UID:keystone-" + Date.now() + "@keystone", - "DTSTAMP:" + fmt(new Date()), - "DTSTART:" + fmt(dtStart), - "DTEND:" + fmt(dtEnd), - "SUMMARY:" + summary, - "DESCRIPTION:" + description.replace(/\n/g, "\\n"), - "END:VEVENT", - "END:VCALENDAR", - ].join("\r\n"); -} app.post("/api/contact", async (req, res) => { const { @@ -632,7 +579,7 @@ app.post("/api/contact", async (req, res) => { // reCAPTCHA check when secret is set if (RECAPTCHA_SECRET) { try { - const r = await fetch("https://www.google.com/recaptcha/api/siteverify", { + const r = await global.fetch("https://www.google.com/recaptcha/api/siteverify", { method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded" }, body: new URLSearchParams({ @@ -709,26 +656,6 @@ ${message} uploads, }); - const html = ` -
- We received your message-Thanks for reaching out to Keystone Notary Group, LLC. We'll respond shortly. -
-
- Name: ${name} -Email: ${email} -Phone: ${phone || "n/a"} -Service: ${service || "n/a"} -Your message: -${message}
- Call us at (267) 309‑9000 or reply to this email. - |
| © Keystone Notary Group, LLC · Hellertown, PA |