Initial commit: Visigine (Vite client + Express/SQLite backend)

Container-ready via docker/ compose (frontend nginx + backend Node). Compose adjusted for Coolify on the prod server: frontend uses expose:80 (no host binding — host 8080 is taken by the Coolify proxy; Traefik routes visigine.de), backend ALLOWED_ORIGINS=https://visigine.de. Secrets stay in server/.env (git-ignored); see server/.env.example.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-12 10:06:48 +02:00
commit e344f1b7e7
88 changed files with 11764 additions and 0 deletions

16
server/lib/parser.js Normal file
View File

@@ -0,0 +1,16 @@
// Extracts the parts of the HTML response that downstream checks need.
export function parseHtml(html) {
const safe = html || ''
const headMatch = safe.match(/<head[\s\S]*?<\/head>/i)
const headHtml = headMatch ? headMatch[0] : safe.slice(0, 4000)
const jsonLdBlocks = [
...safe.matchAll(/<script[^>]*type=["']application\/ld\+json["'][^>]*>([\s\S]*?)<\/script>/gi),
]
.map((m) => m[1].trim())
.filter(Boolean)
const jsonLdJoined = jsonLdBlocks.join('\n---\n')
return { headHtml, jsonLdBlocks, jsonLdJoined }
}