joachimhummel d34902cd5f feat: echo submitted message back in confirmation email
Task #18 — Send a copy of the submitted message back to the contact in the confirmation email.

Changes made to artifacts/api-server/src/routes/contact.ts:

- Updated buildConfirmationEmail() signature from (name: string) to
  ({ name, subject, message }) so it can accept and render the original submission.

- Added a visually distinct "Ihre Nachricht" quoted block to the HTML template:
  - Light gray background (#f8fafc) matching the existing bgField colour
  - Subtle 3px left border (#e2e8f0) styled as a blockquote
  - Rounded right corners (border-radius: 0 6px 6px 0)
  - ALL-CAPS label "IHRE NACHRICHT" in the same style as field labels elsewhere
  - Optional subject line rendered in semi-bold if provided
  - Message body with white-space:pre-wrap to preserve line breaks

- All user-supplied values (subject, message) passed through the existing
  escapeHtml() helper — XSS-safe.

- Updated the plain-text fallback: adds a "—" delimited quoted section
  with optional "Betreff:" line before the message body.

- Updated the call site to pass { name, subject, message } to
  buildConfirmationEmail().

No new dependencies. Pre-existing TS error (SendContactMessageBody missing
from @workspace/api-zod) is unrelated to this task and unchanged.

Replit-Task-Id: 63279220-bb35-4721-bbd6-86182301a697
2026-05-15 17:14:35 +00:00
2026-05-15 16:11:01 +00:00
2026-05-13 03:54:14 +00:00
2026-05-13 03:54:14 +00:00
2026-05-13 03:54:14 +00:00
2026-05-13 03:54:14 +00:00
2026-05-13 03:54:14 +00:00
2026-05-13 03:54:14 +00:00
2026-05-13 03:54:14 +00:00
2026-05-13 03:54:14 +00:00
2026-05-13 03:54:14 +00:00

Joachim Hummel Portfolio

Personal portfolio website for Joachim Hummel — Senior IT-Consultant, DevOps Engineer, KI-Automation Experte.

Built with React + Vite (frontend) and Express 5 (API), running as a pnpm monorepo.


Prerequisites

  • Node.js 24+
  • pnpm 10+ — install via npm install -g pnpm

Installation

# 1. Clone the repository
git clone <repo-url>
cd <repo-folder>

# 2. Install all workspace dependencies
pnpm install

Environment Variables

Create a .env file in the project root (or export the variables in your shell):

# Session secret — any long random string (required)
SESSION_SECRET=your-very-long-random-secret-here

# Brevo (Sendinblue) API key — required for the contact form to send emails
BREVO_API_KEY=your-brevo-api-key

Brevo API key: Sign up for free at brevo.com, then generate an API key under SMTP & API → API Keys.


Running Locally

Start both services in separate terminal windows:

# Terminal 1 — API server (http://localhost:8080)
pnpm --filter @workspace/api-server run dev

# Terminal 2 — Frontend (http://localhost:23924)
pnpm --filter @workspace/joachim-portfolio run dev

Open http://localhost:23924 in your browser.


Project Structure

artifacts/
  api-server/          # Express 5 API — contact form, email via Brevo
  joachim-portfolio/   # React + Vite frontend (portfolio site)
lib/
  api-spec/            # OpenAPI spec + generated client hooks
  api-client-react/    # Generated React Query hooks (from Orval)
scripts/               # Utility scripts

Useful Commands

Command Description
pnpm install Install all dependencies
pnpm run typecheck Full TypeScript check across all packages
pnpm run build Typecheck + build all packages
pnpm --filter @workspace/api-spec run codegen Regenerate API hooks from OpenAPI spec

Production Build

# Build frontend static files
pnpm --filter @workspace/joachim-portfolio run build
# Output: artifacts/joachim-portfolio/dist/public

# Build API server
pnpm --filter @workspace/api-server run build
# Output: artifacts/api-server/dist/index.mjs

# Start API server in production
NODE_ENV=production PORT=8080 node --enable-source-maps artifacts/api-server/dist/index.mjs

Serve the frontend's dist/public folder via any static file server (Nginx, Caddy, etc.) and proxy /api/* requests to the API server.

Description
No description provided
Readme 2 MiB
Languages
TypeScript 96.4%
CSS 1.6%
HTML 1.3%
JavaScript 0.7%