feat: ATM10-Statistikportal

Statistikportal für den All-the-Mods-10-Server (Minecraft 1.21.1, NeoForge 21.1):

- mod/: serverseitige NeoForge-Mod atmstats – Ereignisse, Live-Zähler, Servergesundheit,
  FTB-Dateien; Outbox auf der Festplatte, signierter gzip-Versand per HTTPS mit Backoff
- backend/: Fastify + PostgreSQL – idempotenter Ingest, Projektionen, Parser für SNBT,
  FTB Quests/Teams, world/stats, world/advancements und latest.log; Ranglisten, Snapshots,
  Retention, öffentliche API, SSE-Live-Updates, Admin mit argon2/CSRF, SFTP-Worker
- web/: Next.js-Dashboard – Übersicht, Ranglisten, Spielerprofile, ATM10, Server,
  Datenquellen, Verwaltung
- shared/: Protokoll v1 und API-Typen; tools/: Simulator, Log-Anonymisierer, RCON-Client
- deploy/: Docker Compose hinter Traefik, Backup; docs/: Architektur, Datenquellen, Betrieb

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
lucashahmannandClaude Opus 5.5 committed 2026-10-13 09:33:25 +02:00
1 parent 56d2078e6a
commit e66f89f49e
214 files changed
+27077

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
import { render, screen, within } from '@testing-library/react';
import { describe, expect, it } from 'vitest';
import { LeaderboardCard } from '@/components/LeaderboardCard';
const board = { id: 'deaths', title: 'Friedhof', description: 'Häufigste Tode', unit: 'count' as const };
const entries = Array.from({ length: 10 }, (_, i) => ({
rank: i + 1,
uuid: `00000000-0000-4000-8000-00000000000${i}`,
name: `Spieler${i}`,
value: 100 - i,
}));
describe('LeaderboardCard', () => {
it('renders 10 rows with names, values and a link to the full board', () => {
render(<LeaderboardCard board={board} entries={entries} />);
const rows = screen.getAllByRole('listitem');
expect(rows).toHaveLength(10);
expect(within(rows[0]!).getByText('Spieler0')).toBeInTheDocument();
expect(within(rows[0]!).getByText('100')).toBeInTheDocument();
expect(screen.getByRole('link', { name: /Friedhof/ })).toHaveAttribute('href', '/leaderboards/deaths');
expect(rows[0]!.querySelector('a')).toHaveAttribute('href', '/players/Spieler0');
});
it('renders an empty state', () => {
render(<LeaderboardCard board={board} entries={[]} />);
expect(screen.queryAllByRole('listitem')).toHaveLength(0);
expect(screen.getByText('Noch keine Daten')).toBeInTheDocument();
});
});