Compare commits
11 Commits
fa71e00f69
...
v2.3.22-rc
| Author | SHA1 | Date | |
|---|---|---|---|
| 94627ba20e | |||
| a782fdfe53 | |||
| f17a8c8c36 | |||
| adbb2419b7 | |||
| 5809291741 | |||
| e263e7f25c | |||
| 1fee592ee7 | |||
| ff73aa7c4e | |||
| 26f6ddc098 | |||
| db48e03cb9 | |||
| 53941cdf01 |
@@ -394,42 +394,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
pnpm store prune
|
pnpm store prune
|
||||||
pnpm install --no-frozen-lockfile
|
pnpm install --no-frozen-lockfile
|
||||||
- name: 📦 Cache APT Packages
|
- name: Setup Chrome
|
||||||
uses: actions/cache@v4
|
id: setup-chrome
|
||||||
|
uses: browser-actions/setup-chrome@v1
|
||||||
with:
|
with:
|
||||||
path: /var/cache/apt/archives
|
install-dependencies: true
|
||||||
key: apt-cache-${{ runner.os }}-${{ runner.arch }}-chromium
|
|
||||||
|
|
||||||
- name: 💾 Cache Chromium
|
|
||||||
id: cache-chromium
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: /usr/bin/chromium
|
|
||||||
key: ${{ runner.os }}-chromium-native-${{ hashFiles('package.json') }}
|
|
||||||
|
|
||||||
- name: 🔍 Install Chromium (Native & ARM64)
|
|
||||||
if: steps.cache-chromium.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
|
||||||
rm -f /etc/apt/apt.conf.d/docker-clean
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y gnupg wget ca-certificates
|
|
||||||
OS_ID=$(. /etc/os-release && echo $ID)
|
|
||||||
CODENAME=$(. /etc/os-release && echo $VERSION_CODENAME)
|
|
||||||
if [ "$OS_ID" = "debian" ]; then
|
|
||||||
apt-get install -y chromium
|
|
||||||
else
|
|
||||||
mkdir -p /etc/apt/keyrings
|
|
||||||
KEY_ID="82BB6851C64F6880"
|
|
||||||
wget -qO- "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x$KEY_ID" | gpg --dearmor > /etc/apt/keyrings/xtradeb.gpg
|
|
||||||
echo "deb [signed-by=/etc/apt/keyrings/xtradeb.gpg] http://ppa.launchpad.net/xtradeb/apps/ubuntu $CODENAME main" > /etc/apt/sources.list.d/xtradeb-ppa.list
|
|
||||||
printf "Package: *\nPin: release o=LP-PPA-xtradeb-apps\nPin-Priority: 1001\n" > /etc/apt/preferences.d/xtradeb
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y --allow-downgrades chromium
|
|
||||||
fi
|
|
||||||
[ -f /usr/bin/chromium ] && ln -sf /usr/bin/chromium /usr/bin/google-chrome
|
|
||||||
[ -f /usr/bin/chromium ] && ln -sf /usr/bin/chromium /usr/bin/chromium-browser
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ── Minimalist Smoke Test ──────────────────────────────────────────
|
# ── Minimalist Smoke Test ──────────────────────────────────────────
|
||||||
- name: 🌐 Smoke Test (Essential Flow)
|
- name: 🌐 Smoke Test (Essential Flow)
|
||||||
@@ -437,7 +406,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
NEXT_PUBLIC_BASE_URL: ${{ needs.prepare.outputs.next_public_url }}
|
NEXT_PUBLIC_BASE_URL: ${{ needs.prepare.outputs.next_public_url }}
|
||||||
GATEKEEPER_PASSWORD: ${{ secrets.GATEKEEPER_PASSWORD || 'klz2026' }}
|
GATEKEEPER_PASSWORD: ${{ secrets.GATEKEEPER_PASSWORD || 'klz2026' }}
|
||||||
PUPPETEER_EXECUTABLE_PATH: /usr/bin/chromium
|
PUPPETEER_EXECUTABLE_PATH: ${{ steps.setup-chrome.outputs.chrome-path }}
|
||||||
run: npx tsx scripts/smoke.ts
|
run: npx tsx scripts/smoke.ts
|
||||||
|
|
||||||
# ──────────────────────────────────────────────────────────────────────────────
|
# ──────────────────────────────────────────────────────────────────────────────
|
||||||
|
|||||||
5
.gitignore
vendored
@@ -2,10 +2,7 @@ node_modules
|
|||||||
.next
|
.next
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.pnpm-store
|
.pnpm-store
|
||||||
public/uploads
|
# lighthouse CI
|
||||||
public/media
|
|
||||||
|
|
||||||
# Lighthouse CI
|
|
||||||
.lighthouseci/
|
.lighthouseci/
|
||||||
lighthouserc.cjs
|
lighthouserc.cjs
|
||||||
.lighthouserc.json
|
.lighthouserc.json
|
||||||
|
|||||||
@@ -45,6 +45,28 @@ export async function sendContactFormAction(formData: FormData) {
|
|||||||
email,
|
email,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 1.5. Simple Fail-Safe Backup to Disk
|
||||||
|
// To ensure leads are never lost if email fails or Gotify is down, we append them to a local JSON Lines file.
|
||||||
|
try {
|
||||||
|
const fs = await import('fs');
|
||||||
|
const path = await import('path');
|
||||||
|
const backupDir = path.join(process.cwd(), '.data');
|
||||||
|
if (!fs.existsSync(backupDir)) fs.mkdirSync(backupDir, { recursive: true });
|
||||||
|
|
||||||
|
const backupFile = path.join(backupDir, 'leads-backup.jsonl');
|
||||||
|
const leadData = {
|
||||||
|
timestamp: new Date().toISOString(),
|
||||||
|
name,
|
||||||
|
email,
|
||||||
|
productName,
|
||||||
|
message,
|
||||||
|
};
|
||||||
|
fs.appendFileSync(backupFile, JSON.stringify(leadData) + '\\n');
|
||||||
|
logger.info('Successfully saved lead to local backup file', { backupFile });
|
||||||
|
} catch (backupError) {
|
||||||
|
logger.error('Failed to write to local leads backup', { error: String(backupError) });
|
||||||
|
}
|
||||||
|
|
||||||
// 2. Send Emails
|
// 2. Send Emails
|
||||||
logger.info('Sending branded emails', { email, productName });
|
logger.info('Sending branded emails', { email, productName });
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
POSTGRES_URI: postgres://${PAYLOAD_DB_USER:-payload}:${PAYLOAD_DB_PASSWORD:-payload}@klz-db:5432/${PAYLOAD_DB_NAME:-payload}
|
POSTGRES_URI: postgres://${PAYLOAD_DB_USER:-payload}:${PAYLOAD_DB_PASSWORD:-payload}@klz-db:5432/${PAYLOAD_DB_NAME:-payload}
|
||||||
PAYLOAD_SECRET: ${PAYLOAD_SECRET:-fallback-secret-for-production-needs-change}
|
PAYLOAD_SECRET: ${PAYLOAD_SECRET:-fallback-secret-for-production-needs-change}
|
||||||
volumes:
|
|
||||||
- klz_media_data:/app/public/media
|
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
# HTTP ⇒ HTTPS redirect
|
# HTTP ⇒ HTTPS redirect
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ export default async function middleware(request: NextRequest) {
|
|||||||
pathname.startsWith('/errors') ||
|
pathname.startsWith('/errors') ||
|
||||||
pathname.startsWith('/health') ||
|
pathname.startsWith('/health') ||
|
||||||
pathname.startsWith('/uploads') ||
|
pathname.startsWith('/uploads') ||
|
||||||
|
pathname.startsWith('/media') ||
|
||||||
|
pathname.startsWith('/_next/image') ||
|
||||||
pathname.includes('/api/og') ||
|
pathname.includes('/api/og') ||
|
||||||
pathname.includes('opengraph-image') ||
|
pathname.includes('opengraph-image') ||
|
||||||
pathname.endsWith('sitemap.xml') ||
|
pathname.endsWith('sitemap.xml') ||
|
||||||
@@ -61,7 +63,7 @@ export default async function middleware(request: NextRequest) {
|
|||||||
if (['GET', 'HEAD'].includes(request.method)) {
|
if (['GET', 'HEAD'].includes(request.method)) {
|
||||||
// Clone headers to ensure all Next.js internal headers (like router state) are preserved
|
// Clone headers to ensure all Next.js internal headers (like router state) are preserved
|
||||||
const clonedHeaders = new Headers(request.headers);
|
const clonedHeaders = new Headers(request.headers);
|
||||||
|
|
||||||
effectiveRequest = new NextRequest(urlObj, {
|
effectiveRequest = new NextRequest(urlObj, {
|
||||||
headers: clonedHeaders,
|
headers: clonedHeaders,
|
||||||
method: request.method,
|
method: request.method,
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
"prepare": "husky",
|
"prepare": "husky",
|
||||||
"preinstall": "npx only-allow pnpm"
|
"preinstall": "npx only-allow pnpm"
|
||||||
},
|
},
|
||||||
"version": "2.3.22-rc.7",
|
"version": "2.3.22-rc.14",
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"onlyBuiltDependencies": [
|
"onlyBuiltDependencies": [
|
||||||
"@parcel/watcher",
|
"@parcel/watcher",
|
||||||
|
|||||||
BIN
public/media/1-1.webp
Normal file
|
After Width: | Height: | Size: 73 KiB |
BIN
public/media/1-2.webp
Normal file
|
After Width: | Height: | Size: 73 KiB |
BIN
public/media/1-3.webp
Normal file
|
After Width: | Height: | Size: 73 KiB |
BIN
public/media/1-4-1024x576.webp
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
public/media/1-4-600x338.webp
Normal file
|
After Width: | Height: | Size: 8.9 KiB |
BIN
public/media/1-4-768x432.webp
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
public/media/1-4.webp
Normal file
|
After Width: | Height: | Size: 61 KiB |
BIN
public/media/1-5-1024x576.webp
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
public/media/1-5-600x338.webp
Normal file
|
After Width: | Height: | Size: 8.9 KiB |
BIN
public/media/1-5-768x432.webp
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
public/media/1-5.webp
Normal file
|
After Width: | Height: | Size: 61 KiB |
BIN
public/media/1.webp
Normal file
|
After Width: | Height: | Size: 73 KiB |
BIN
public/media/1234adws21312-scaled-1024x768.jpg
Normal file
|
After Width: | Height: | Size: 144 KiB |
BIN
public/media/1234adws21312-scaled-600x450.jpg
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
public/media/1234adws21312-scaled-768x576.jpg
Normal file
|
After Width: | Height: | Size: 90 KiB |
BIN
public/media/1234adws21312-scaled.jpg
Normal file
|
After Width: | Height: | Size: 668 KiB |
BIN
public/media/1694273920124-copy-1.webp
Normal file
|
After Width: | Height: | Size: 212 KiB |
BIN
public/media/1694273920124-copy-2-1.webp
Normal file
|
After Width: | Height: | Size: 149 KiB |
BIN
public/media/1694273920124-copy-2-2.webp
Normal file
|
After Width: | Height: | Size: 149 KiB |
BIN
public/media/1694273920124-copy-2-3.webp
Normal file
|
After Width: | Height: | Size: 149 KiB |
BIN
public/media/1694273920124-copy-2.webp
Normal file
|
After Width: | Height: | Size: 149 KiB |
BIN
public/media/1694273920124-copy-3.webp
Normal file
|
After Width: | Height: | Size: 212 KiB |
BIN
public/media/1694273920124-copy.webp
Normal file
|
After Width: | Height: | Size: 212 KiB |
BIN
public/media/1759325528650-1.webp
Normal file
|
After Width: | Height: | Size: 316 KiB |
BIN
public/media/1759325528650-2.webp
Normal file
|
After Width: | Height: | Size: 316 KiB |
BIN
public/media/1759325528650-3.webp
Normal file
|
After Width: | Height: | Size: 316 KiB |
BIN
public/media/1759325528650-4-1024x769.webp
Normal file
|
After Width: | Height: | Size: 93 KiB |
BIN
public/media/1759325528650-4-600x450.webp
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
public/media/1759325528650-4-768x577.webp
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
public/media/1759325528650-4.webp
Normal file
|
After Width: | Height: | Size: 278 KiB |
BIN
public/media/1759325528650-5-1024x769.webp
Normal file
|
After Width: | Height: | Size: 93 KiB |
BIN
public/media/1759325528650-5-600x450.webp
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
public/media/1759325528650-5-768x577.webp
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
public/media/1759325528650-5.webp
Normal file
|
After Width: | Height: | Size: 278 KiB |
BIN
public/media/1759325528650.webp
Normal file
|
After Width: | Height: | Size: 316 KiB |
BIN
public/media/3-1.webp
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
public/media/3-2.webp
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
public/media/3-3.webp
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
public/media/3.webp
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
public/media/5-1.webp
Normal file
|
After Width: | Height: | Size: 90 KiB |
BIN
public/media/5-2.webp
Normal file
|
After Width: | Height: | Size: 90 KiB |
BIN
public/media/5-3.webp
Normal file
|
After Width: | Height: | Size: 90 KiB |
BIN
public/media/5-4-1024x576.webp
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
public/media/5-4-600x338.webp
Normal file
|
After Width: | Height: | Size: 9.0 KiB |
BIN
public/media/5-4-768x432.webp
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
public/media/5-4.webp
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
public/media/5-5-1024x576.webp
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
public/media/5-5-600x338.webp
Normal file
|
After Width: | Height: | Size: 9.0 KiB |
BIN
public/media/5-5-768x432.webp
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
public/media/5-5.webp
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
public/media/5.webp
Normal file
|
After Width: | Height: | Size: 90 KiB |
BIN
public/media/AGB KLZ 3-2026.pdf
Normal file
BIN
public/media/AGB-KLZ-1-2026.pdf
Normal file
BIN
public/media/AVB-KLZ-4-2026.pdf
Normal file
BIN
public/media/DSC07387-Large-600x400-1.webp
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
public/media/DSC07387-Large-600x400-2.webp
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
public/media/DSC07387-Large-600x400-3.webp
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
public/media/DSC07387-Large-600x400.webp
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
public/media/DSC07433-Large-600x400-1.webp
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
public/media/DSC07433-Large-600x400-2.webp
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
public/media/DSC07433-Large-600x400-3.webp
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
public/media/DSC07433-Large-600x400.webp
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
public/media/DSC07460-Large-600x400-1.webp
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
public/media/DSC07460-Large-600x400-2.webp
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
public/media/DSC07460-Large-600x400-3.webp
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
public/media/DSC07460-Large-600x400.webp
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
public/media/DSC07469-Large-600x400-1.webp
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
public/media/DSC07469-Large-600x400-2.webp
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
public/media/DSC07469-Large-600x400-3.webp
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
public/media/DSC07469-Large-600x400.webp
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
public/media/DSC07539-Large-600x400-1.webp
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
public/media/DSC07539-Large-600x400-2.webp
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
public/media/DSC07539-Large-600x400-3.webp
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
public/media/DSC07539-Large-600x400.webp
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
public/media/DSC07655-Large-1.webp
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
public/media/DSC07655-Large-2.webp
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
public/media/DSC07655-Large-3.webp
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
public/media/DSC07655-Large.webp
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
public/media/DSC07768-Large-1.webp
Normal file
|
After Width: | Height: | Size: 73 KiB |
BIN
public/media/DSC07768-Large-2.webp
Normal file
|
After Width: | Height: | Size: 73 KiB |
BIN
public/media/DSC07768-Large-3.webp
Normal file
|
After Width: | Height: | Size: 73 KiB |
BIN
public/media/DSC07768-Large.webp
Normal file
|
After Width: | Height: | Size: 73 KiB |
BIN
public/media/DSC07963-Large-1.webp
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
public/media/DSC07963-Large-2.webp
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
public/media/DSC07963-Large-3.webp
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
public/media/DSC07963-Large.webp
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
public/media/DSC08036-Large-1.webp
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
public/media/DSC08036-Large-2.webp
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
public/media/DSC08036-Large-3.webp
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
public/media/DSC08036-Large.webp
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
public/media/H1Z2Z2-K-scaled-1.webp
Normal file
|
After Width: | Height: | Size: 49 KiB |
BIN
public/media/H1Z2Z2-K-scaled-2.webp
Normal file
|
After Width: | Height: | Size: 49 KiB |
BIN
public/media/H1Z2Z2-K-scaled-3.webp
Normal file
|
After Width: | Height: | Size: 49 KiB |
BIN
public/media/H1Z2Z2-K-scaled-4-1024x213.webp
Normal file
|
After Width: | Height: | Size: 8.4 KiB |