feat: add pitch-deck service to core infrastructure

Migrated pitch-deck from breakpilot-pwa to breakpilot-core.
Container: bp-core-pitch-deck on port 3012.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Boenisch
2026-02-14 19:44:27 +01:00
parent 3739d2b8b9
commit f2a24d7341
68 changed files with 5911 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
'use client'
import { useEffect, useState, useRef } from 'react'
interface AnimatedCounterProps {
target: number
duration?: number
prefix?: string
suffix?: string
className?: string
decimals?: number
}
export default function AnimatedCounter({
target,
duration = 2000,
prefix = '',
suffix = '',
className = '',
decimals = 0,
}: AnimatedCounterProps) {
const [current, setCurrent] = useState(0)
const startTime = useRef<number | null>(null)
const frameRef = useRef<number>(0)
useEffect(() => {
startTime.current = null
function animate(timestamp: number) {
if (!startTime.current) startTime.current = timestamp
const elapsed = timestamp - startTime.current
const progress = Math.min(elapsed / duration, 1)
const eased = 1 - Math.pow(1 - progress, 3)
setCurrent(eased * target)
if (progress < 1) {
frameRef.current = requestAnimationFrame(animate)
}
}
frameRef.current = requestAnimationFrame(animate)
return () => cancelAnimationFrame(frameRef.current)
}, [target, duration])
const formatted = decimals > 0
? current.toFixed(decimals)
: Math.round(current).toLocaleString('de-DE')
return (
<span className={className}>
{prefix}{formatted}{suffix}
</span>
)
}