chore: initial commit — monorepo ReadaBook (API NestJS, web PWA, Docker)

This commit is contained in:
Git Agent
2026-08-23 09:56:53 +02:00
commit 8f1140127f
79 changed files with 6456 additions and 0 deletions

View File

@ -0,0 +1,70 @@
import type { BookDto, JobDto, LibraryDto, ProgressDto, UserDto } from "@readabook/shared";
import type { ContinueItem } from "./types";
const now = new Date().toISOString();
export const mockUser: UserDto = {
id: 1,
email: "admin@readabook.local",
name: "Conservateur",
role: "admin",
createdAt: now
};
export const mockLibraries: LibraryDto[] = [
{ id: 1, name: "Reserve des EPUB", path: "/library/epub", enabled: true, createdAt: now, updatedAt: now },
{ id: 2, name: "Atlas PDF", path: "/library/pdf", enabled: true, createdAt: now, updatedAt: now }
];
export const mockBooks: BookDto[] = [
{
id: 1,
libraryId: 1,
title: "L'Herbier des machines",
author: "M. Valrose",
description: "Fragments, croquis et notes rassemblees autour d'automates introuvables.",
isbn: null,
language: "fr",
publisher: "Cabinet ReadaBook",
publishedDate: "1908",
format: "epub",
filePath: "/library/epub/herbier.epub",
coverPath: null,
fileSize: 4300000,
fileMtime: now,
createdAt: now,
updatedAt: now
},
{
id: 2,
libraryId: 2,
title: "Cartographie des songes",
author: "I. Nadir",
description: "Un atlas annote ou chaque page devient une vitrine de lecture.",
isbn: null,
language: "fr",
publisher: "ReadaBook",
publishedDate: "1921",
format: "pdf",
filePath: "/library/pdf/cartographie.pdf",
coverPath: null,
fileSize: 9100000,
fileMtime: now,
createdAt: now,
updatedAt: now
}
];
export const mockProgress: ProgressDto[] = [
{ bookId: 1, locator: "mock:chapter-3", percent: 42, updatedAt: now },
{ bookId: 2, locator: "mock:page-12", percent: 18, updatedAt: now }
];
export const mockContinue: ContinueItem[] = mockProgress.map((progress) => ({
progress,
book: mockBooks.find((book) => book.id === progress.bookId) ?? mockBooks[0]
}));
export const mockJobs: JobDto[] = [
{ id: 1, type: "scan-library", status: "succeeded", detail: "2 ouvrages indexes", error: null, createdAt: now, updatedAt: now }
];