elpatron 180a5b88b8 feat: Add inspiration photo attachment to admin booking notifications
- Create sendEmailWithInspirationPhoto() function to handle photo attachments
- Add renderAdminBookingNotificationHTML() template for admin notifications
- Extract photo extension and content from base64 data URLs
- Generate unique filenames with customer name and timestamp
- Send separate admin notification email with photo attachment
- Include comprehensive booking details in admin email
- Add visual indicators for photo availability in email template
- Support both HTML and text versions of admin notifications
- Handle cases where no photo is uploaded gracefully
- Import treatments KV to get treatment names for admin emails

Features:
- Inspiration photos automatically attached to admin notifications
- Structured admin email with all booking details
- Photo filename includes customer name and timestamp
- Fallback handling for missing photos
- German localization for admin notifications
- Visual photo availability indicators (/)

Changes:
- email.ts: Add sendEmailWithInspirationPhoto() function
- email-templates.ts: Add renderAdminBookingNotificationHTML() template
- bookings.ts: Send admin notifications with photo attachments
2025-09-30 12:13:16 +02:00
2025-09-29 19:50:10 +02:00
2025-09-30 11:13:53 +02:00
2025-09-30 11:13:53 +02:00
2025-09-29 17:56:30 +02:00

Stargirlnails Kiel - Nail Salon Booking System

Ein vollständiges Buchungssystem für Nagelstudios mit Admin-Panel, Kalender und E-Mail-Benachrichtigungen.

Dependencies

Setup

1. Umgebungsvariablen konfigurieren

Kopiere die .env.example Datei zu .env und konfiguriere deine Umgebungsvariablen:

cp .env.example .env

2. Admin-Passwort Hash generieren

Das Admin-Passwort wird als Base64-Hash in der .env Datei gespeichert. Hier sind verschiedene Methoden, um einen Hash zu generieren:

PowerShell (Windows)

# Einfache Methode mit Base64-Encoding
$password = "dein_sicheres_passwort"
$bytes = [System.Text.Encoding]::UTF8.GetBytes($password)
$hash = [System.Convert]::ToBase64String($bytes)
Write-Host "Password Hash: $hash"

# Alternative mit PowerShell 7+ (kürzer)
$password = "dein_sicheres_passwort"
[Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($password))

Node.js (falls verfügbar)

// In der Node.js Konsole oder als separates Script
const password = "dein_sicheres_passwort";
const hash = Buffer.from(password).toString('base64');
console.log("Password Hash:", hash);

Online-Tools (nur für Entwicklung)

3. .env Datei konfigurieren

Bearbeite deine .env Datei und setze die generierten Werte:

# Admin Account Configuration
ADMIN_USERNAME=owner
ADMIN_PASSWORD_HASH=ZGVpbl9zaWNoZXJlc19wYXNzd29ydA==  # Dein generierter Hash

# Email Configuration
RESEND_API_KEY=your_resend_api_key_here
EMAIL_FROM=noreply@yourdomain.com
ADMIN_EMAIL=admin@yourdomain.com

4. Anwendung starten

# Dependencies installieren
pnpm install

# Entwicklungsserver starten
pnpm dev

Features

  • 📅 Terminbuchung: Kunden können online Termine buchen
  • 💅 Behandlungsverwaltung: Admin kann Behandlungen hinzufügen/bearbeiten
  • 📆 Kalender-Ansicht: Übersichtliche Darstellung aller Termine
  • Verfügbarkeits-Slots: Flexible Slot-Verwaltung mit behandlungsspezifischen Dauern
  • 📧 E-Mail-Benachrichtigungen: Automatische Benachrichtigungen bei Buchungen
  • 🔐 Admin-Panel: Geschützter Bereich für Inhaber

Admin-Zugang

Nach dem Setup kannst du dich mit den in der .env konfigurierten Admin-Credentials anmelden:

  • Benutzername: Wert aus ADMIN_USERNAME
  • Passwort: Das ursprüngliche Passwort (nicht der Hash)

Sicherheit

⚠️ Wichtige Hinweise:

  • Ändere das Standard-Passwort vor dem Produktionseinsatz
  • Die aktuelle Passwort-Hashing-Methode (Base64) ist nur für Entwicklung geeignet
  • Für Produktion sollte bcrypt oder ein ähnliches sicheres Hashing-Verfahren verwendet werden
  • Speichere niemals echte Passwörter in der .env Datei, nur die Hashes
Description
No description provided
Readme 2.6 MiB
Languages
TypeScript 72.7%
JavaScript 25.7%
Shell 1%
Dockerfile 0.3%
HTML 0.1%
Other 0.1%