feat: add SPA, serve at /app/, update Dockerfile and README

- React + TanStack Router + shadcn/ui SPA under spa/
- serve spa/dist at /app/ with index.html fallback for client routing
- Dockerfile: node build stage for SPA, copy dist into runtime image
- README: document SPA, CORS_ORIGINS env var, architecture entry
- vite base set to /app/, manifest.json paths fixed
This commit is contained in:
2026-06-04 04:20:15 +02:00
parent 15dc0e526b
commit b9c0b10740
153 changed files with 24329 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
type RatingHistogramProps = {
histogram: number[]
}
export function RatingHistogram({ histogram }: RatingHistogramProps) {
const max = Math.max(...histogram, 1)
return (
<div>
<div className="flex items-end gap-1" style={{ height: 40 }}>
{histogram.map((count, i) => (
<div
key={i}
className="flex-1 rounded-t bg-amber-500/80"
style={{ height: `${(count / max) * 100}%`, minHeight: count > 0 ? 2 : 0 }}
/>
))}
</div>
<div className="mt-1 flex gap-1">
{[1, 2, 3, 4, 5].map((n) => (
<div key={n} className="flex-1 text-center text-[10px] text-muted-foreground/40">{n}</div>
))}
</div>
</div>
)
}