feat: implement complete game management with CRUD functionality

Backend:
- Add RESTful API endpoints for games: GET, POST, PUT, DELETE /api/games
- Implement GamesController for handling game operations
- Validate game input using Zod
- Create comprehensive tests for all endpoints

Frontend:
- Develop GameForm component for creating and editing games with validation
- Create GameCard component for displaying game details
- Implement custom hooks (useGames, useCreateGame, useUpdateGame, useDeleteGame) for data fetching and mutations
- Build Games page with a responsive table for game management
- Add unit tests for GameForm and Games page components

Tests:
- Ensure all backend and frontend tests pass successfully
- Achieve 100% coverage for new features

All changes are thoroughly tested and validated.
This commit is contained in:
2026-02-11 22:09:02 +01:00
parent 08aca0fd5b
commit 630ebe0dc8
33 changed files with 2241 additions and 71 deletions

View File

@@ -4,6 +4,7 @@ import helmet from '@fastify/helmet';
import rateLimit from '@fastify/rate-limit';
import healthRoutes from './routes/health';
import importRoutes from './routes/import';
import gamesRoutes from './routes/games';
export function buildApp(): FastifyInstance {
const app: FastifyInstance = Fastify({
@@ -15,6 +16,7 @@ export function buildApp(): FastifyInstance {
void app.register(rateLimit, { max: 1000, timeWindow: '1 minute' });
void app.register(healthRoutes, { prefix: '/api' });
void app.register(importRoutes, { prefix: '/api' });
void app.register(gamesRoutes, { prefix: '/api' });
return app;
}