783f4d226d43002696223c54a929c36f84d2e90d
Settings are validated on read, not only on write: several go straight onto foliate's renderer as custom-element attributes, where a bad value wedges the layout silently rather than throwing. Unknown keys are stripped and missing ones filled from the defaults, so settings added later do not invalidate what a reader already has stored. The stylesheet is built as foliate's [before, after] pair. The paginator prepends the first to the section's <head> and appends the second, so the book's own CSS overrides the first and loses to the second. Typography goes in the first — a book that styles its own headings still gets to, and font size lands on <html> without !important so rem/em headings scale rather than being flattened. Colour goes in the second, because most EPUBs set a body background and would otherwise leave the page white against a dark UI. Font choices are reused from the app theme's FONT_STACKS rather than duplicated, so the reader cannot drift from the rest of the UI. Rename the ambient declaration to foliate-js.d.ts: as foliate.d.ts beside foliate.ts, TypeScript takes it for that file's emitted declaration, drops it from the program, and every $foliate import fails with TS2307.
Chitai - eBook Library Management
eBook library management application.
- Backend built with Python and Litestar
- Frontend built with Svelte 5 and SvelteKit
Key Features
- Libraries: Organize your eBooks into customizable libraries.
- Book Upload: Easily upload eBook files in common formats, with automatic metadata extraction.
- Personalized Bookshelves: Create and manage custom bookshelves (lists) within your libraries to categorize your eBooks.
- Built-in Readers: Integrated readers for EPUB and PDF files.
- Progress Tracking: Monitor your reading progress within each book.
- Search Functionality: Quickly find books based on title.
Getting Started
Prerequisites
- Docker
- Docker Compose
- (Optional) A text editor for modifying the
.envfile.
Installation (Production Deployment)
- Clone the repository:
git clone <repository_url>(Replace<repository_url>with the actual URL) - Navigate to the project root:
cd chitai - Build the Docker images:
docker compose build - Copy the example environment file and configure:
cp .env.prod-example .env - Run the Docker containers in detached mode:
docker compose up -d - Access the frontend at:
http://localhost:3000/
Development
NixOS Development Environment
To utilize the NixOS development environment:
- Navigate to the project root in your terminal:
cd chitai - Enter the Nix shell:
nix-shell
Docker development containers are planned for a future release.
Languages
Python
52.7%
Svelte
33%
TypeScript
12.5%
Shell
0.5%
CSS
0.4%
Other
0.9%