From 529cf33b244cbd7c704cb4b5ded99858c94d7614 Mon Sep 17 00:00:00 2001 From: Binary Alley Date: Sun, 11 Oct 2026 10:44:31 +0300 Subject: [PATCH] Adds application manual. --- README.md | 4 + docs/INSTALL.md | 38 ----- docs/USAGE.md | 1 - docs/manual/index.md | 83 ++++++++++ docs/manual/installation/index.md | 198 ++++++++++++++++++++++++ docs/manual/managing-libraries/index.md | 167 ++++++++++++++++++++ docs/manual/plugins/index.md | 90 +++++++++++ docs/manual/themes/index.md | 116 ++++++++++++++ docs/manual/using-lumina/index.md | 85 ++++++++++ src/Lumina.sln | 38 ++++- 10 files changed, 779 insertions(+), 41 deletions(-) delete mode 100644 docs/INSTALL.md delete mode 100644 docs/USAGE.md create mode 100644 docs/manual/index.md create mode 100644 docs/manual/installation/index.md create mode 100644 docs/manual/managing-libraries/index.md create mode 100644 docs/manual/plugins/index.md create mode 100644 docs/manual/themes/index.md create mode 100644 docs/manual/using-lumina/index.md diff --git a/README.md b/README.md index f7754981..c7d8a563 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,12 @@ Stay tuned as we build something amazing together. Lumina is about to light up y P.S. This README is just a spark. Watch it grow into a supernova! ✨ +> **Warning: pre-alpha, not production ready.** Lumina is under heavy development, and breaking changes happen all the time. Configuration, APIs, data formats and behavior can change between versions without a migration path or a guaranteed way back. Do not use Lumina in production. Back up before you update. + ## Documentation +The user facing manual, covering installing, using and administering Lumina, can be found at [docs/manual](./docs/manual/index.md). Start there if you want to run Lumina rather than read how it is built. + For those with technical curiosities, here are some goodies to browse through: - This application was written following Clean Architecture and Domain Driven Design. Although you've probably seen it countless times before, here is the diagram of how the structure looks like. - A tree-like schematic of the Lumina's Server Domain layer can be seen [here](./docs/technical/domain/Domain.md). diff --git a/docs/INSTALL.md b/docs/INSTALL.md deleted file mode 100644 index 78e869ac..00000000 --- a/docs/INSTALL.md +++ /dev/null @@ -1,38 +0,0 @@ -## General Setup -In the `appsettings.json` file from the **API server** app, make sure there is an entry looking like this: -```json -"CorsSettings": { - "AllowedOrigins": [ - "http://localhost:5012" - ] -} -``` -where the `AllowedOrigins` section includes the address set in the `Kestrel` section of the `appsettings.json` filefrom the **Web Client** app: -```json -"Kestrel": { - "Endpoints": { - "Http": { - "Url": "http://localhost:5012" - } - } -} -``` -The above values are the defaults of Lumina, but you can change them to whatever host and port you desire, as long as they are both the same, in both files. Failing to do so will result in SignalR not being able to make a connection between the client app and the server API. - -## Reverse Proxy Setup -### Rate Limiting Headers -The application uses IP-based rate limiting on some endpoints. When deploying behind a reverse proxy, you must forward the -original client IP, otherwise the "per IP" rate limiting will become global, per any request aimed at those endpoints, regardless of origin: - -```text -# Nginx -proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - -# Apache -RemoteIPHeader X-Forwarded-For - -# Caddy -reverse_proxy { - header_up X-Forwarded-For {remote_host} -} -``` diff --git a/docs/USAGE.md b/docs/USAGE.md deleted file mode 100644 index 8d1c8b69..00000000 --- a/docs/USAGE.md +++ /dev/null @@ -1 +0,0 @@ - diff --git a/docs/manual/index.md b/docs/manual/index.md new file mode 100644 index 00000000..c19b691a --- /dev/null +++ b/docs/manual/index.md @@ -0,0 +1,83 @@ +# Lumina Manual + +## Contents + +**Getting started** + +1. **Introduction** +2. [Installation](installation/index.md) + +**Using Lumina** + +3. [Using Lumina](using-lumina/index.md) + +**Administration** + +4. [Managing Libraries](managing-libraries/index.md) +5. [Plugins](plugins/index.md) +6. [Themes](themes/index.md) + +Your files have waited long enough. Lumina is a media server that gives a whole collection one place to live, whether that collection is books, music, or the many other kinds of media that quietly pile up on a hard drive. It runs on your own hardware, answers to you and no one else, and never asks for a subscription before it will show you the files you already own. + +> **Pre-alpha, not production ready.** Lumina is under heavy development, and breaking changes happen all the time. Configuration, APIs, data formats and behavior can shift between versions, and nothing guarantees backward compatibility or a way back to an earlier version. Use Lumina to explore and to shape it, not to run a service you depend on. + +## What Lumina is + +Under the hood, Lumina is two applications that talk to each other: + +- The **API server** is the part that knows things. It keeps track of your libraries, metadata, users and settings, and hands them out as a JSON REST API. It is also where the heavy lifting happens, like scanning folders and running background jobs. +- The **web client** is the part you look at. It talks to the API for you and paints the interface from the templates of whichever theme is switched on. + +The two run separately and speak to each other over the network, so they can sit on the same machine or on machines on opposite sides of the planet. The Docker Compose stack brings them up together with a single command when that suits you. When you are ready to flip the lights on, the [installation guide](installation/index.md) walks through it. + +## What Lumina can do today + +Lumina is growing, and this is what works right now: + +- **Media libraries that scan themselves.** Point Lumina at a folder or a drive, tell it what kind of media lives there, and it gets to work discovering and indexing what it finds. Scans run in the background, report their progress as they go, and can be started, cancelled or resumed. +- **Written content.** Add a written content library and Lumina scans it, cataloguing the books and e-books it contains and dressing them up with metadata for browsing in the client. Open one and it renders in the browser through a reader plugin; the EPUB and PDF readers are bundled and can be enabled per library. +- **Music.** Add a music library and Lumina indexes the artists, albums and tracks it contains, reading metadata from the tags inside the audio files. If you want more, enable a metadata provider and Lumina fills in the gaps from online sources, and artwork can come from your folders or from remote sources. +- **Metadata and artwork from plugins.** Plugins do the knowing. They supply the metadata and the artwork of a library, and you decide, library by library, which ones are switched on and which one wins when several of them recognize the same item. +- **A file system browser.** Reach the drives, folders and files of the server machine from anywhere you can open the client, as if you were sitting right in front of it. Poke around, walk a path to its root or to its parent, and let Lumina generate thumbnails for what it finds. +- **Accounts, roles, permissions and policies.** Create accounts, sign in with a password and optional two factor authentication, and hand out access through roles, fine grained permissions and policies that decide who may reach which library or content. Administrators manage all of it from the administration area. +- **Theming.** The client is a themed shell, and a theme is a portable ZIP of HTML templates and assets that anyone can create. A theme can restyle the entire application and rearrange its navigation without a single line of code from the core, because some of us still find flat interfaces sterile and boring. +- **Plugins.** Upload an assembly or an archive, restart the server, and Lumina picks it up. Anyone can write a plugin to extend what Lumina understands, and a plugin can expose its own settings, which show up in the client. +- **Scheduled jobs.** Recurring work like library scans is driven by a scheduler with a live dashboard in the client. Watch the jobs run on a real time graph, read their history, and start, stop, fire or remove them on demand. +- **A local interface in many languages.** The client ships in ten languages and greets each visitor in theirs. +- **Observability.** Lumina logs and traces extensively, and everything it records lives on your machine. Nothing is sent anywhere: no analytics, no usage reporting, no telemetry, no exception reports, nothing leaves your server unless you deliberately wire it to a collector you run yourself. + +Video libraries, podcasts and photos are sketched out in the design and on the way, but they are not part of what works today. + +## How Lumina is put together + +Lumina is written in C# on .NET 10 and keeps its data in SQLite, so the whole thing stays small enough to run happily on modest hardware. The codebase follows Clean Architecture and Domain Driven Design, and it is built from the ground up to be extended by themes and plugins. If you want the deep version of that story, the architecture documents and the domain model in the repository go all the way down. + +## Security + +You are handing Lumina the keys to your files, so it is built to deserve that trust: + +- **Locked down by default.** The API authenticates every request, and only endpoints explicitly marked as public can be reached without signing in. Accounts, roles, fine grained permissions and policies decide who may reach which library or content, and sensitive endpoints are rate limited per client IP. +- **Secrets stay secret.** A production deployment must supply its own signing and encryption keys, and the server refuses to start without them. +- **Themes and plugins are treated as untrusted.** Theme packs are validated, their template and asset paths are normalized and confined to the pack, and their archive size, expanded size and entry count are capped. A plugin archive has its directory components stripped, so it cannot write outside the plugin directory, but it has no size or entry limit. Templates render through a small engine that cannot execute code, and a broken theme falls back to the built-in rendering. Themes can still ship their own JavaScript, so only install code from sources you trust. +- **Nothing phones home.** Lumina itself makes no outbound connections on its own. It reaches the internet only when your configuration tells it to, for example when you enable a metadata provider. Part of what it fetches on your behalf is guarded: artwork downloads reject literal loopback, private, link local and carrier grade NAT addresses, and follow redirects only to public HTTPS hosts. That guard is not a hard boundary, though. It does not resolve host names, so a name that points at an internal address can still get through, and the metadata calls a provider makes go out through the provider's own client, without that guard at all. Some providers add a check of their own: the MusicBrainz provider refuses a base address that is not public unless you turn on its `Allow LAN/Private Base URL` setting, which exists for pointing it at a self hosted instance. Enabling a web provider is trusting it to make requests from your server. Everything the client loads, from stylesheets and scripts to images, fonts and icons, is served from your own server, so using the client pings no third party that could note where you are or what you are looking at. One exception ships switched on, and it is worth knowing about: a book can carry its own styles, and those styles can make the browser load resources from outside servers, which those servers could observe. Lumina keeps a book's styles by default because it looks better, so a book from an untrusted source can leak your location this way. The `Preserve book styles` setting (see [Managing Libraries](managing-libraries/index.md)) turns it off, stripping the styles and closing that door, at the cost of the book's original look. +- **It is tested, a lot.** Do not take any of this on faith. The project is covered by more than 10,000 tests, including a dedicated security suite, because Lumina puts stability and security ahead of moving fast. + +## Documentation, diagrams and comments + +Lumina takes being readable seriously. Every type and member is documented, and the repository carries far more than this manual: the domain model and the language it speaks, the C4 architecture diagrams, an architecture decision log that records not only what was chosen but why, and a reference for every API endpoint, complete with ready to run request files. + +The aim is that anyone, including someone early in their career, can open the code and follow a thread from an endpoint down through its handler into the domain without having to reverse engineer it. The project is also strict with itself: its naming, formatting, layering, testing and documentation conventions are enforced rather than suggested, and a contribution is expected to respect them. That discipline is exactly what keeps the codebase consistent as it grows. + +If you feel like helping out, there is no permission to ask for: read the [contributing guide](../CONTRIBUTING.md), pick a branch, and send a pull request. + +## Where the project is + +Lumina is young and moves quickly. It is pre-alpha software: some rooms are furnished, others still have the plans taped to the wall, and both the code and this documentation change often. When a page here disagrees with the application, trust the application. + +## Credits + +Lumina stands on the shoulders of others. The visual style is inspired by [Enlightenment](https://www.enlightenment.org/), most icons come from the [Lyra Icon Theme](https://github.com/yeyushengfan258/Lyra-icon-theme/tree/master/src), and several interface icons were adapted from [svgrepo](https://www.svgrepo.com/). Full attribution is kept in the [README](../../README.md). + +## License + +Lumina is licensed under the GPLv3.0. See the [LICENSE](../../LICENSE.md) file for the full text. diff --git a/docs/manual/installation/index.md b/docs/manual/installation/index.md new file mode 100644 index 00000000..dc41f332 --- /dev/null +++ b/docs/manual/installation/index.md @@ -0,0 +1,198 @@ +# Installation + +## Contents + +**Getting started** + +1. [Introduction](../index.md) +2. **Installation** + +**Using Lumina** + +3. [Using Lumina](../using-lumina/index.md) + +**Administration** + +4. [Managing Libraries](../managing-libraries/index.md) +5. [Plugins](../plugins/index.md) +6. [Themes](../themes/index.md) + +Lumina ships as two applications that talk to each other over the network: the **API server** and the **web client**. You can run both on one machine or split them across many. + +> **Not production ready yet.** Lumina is pre-alpha software. Updates are one way and can lose Lumina's data, so read [Updating](#updating) before you install or upgrade. + +There are **two ways to install Lumina**. Pick one: + +- **[Option A: run with Docker Compose](#option-a-run-with-docker-compose)**, the recommended route, where a single command brings up the whole system. +- **[Option B: build and run manually](#option-b-build-and-run-manually)**, if you would rather run the applications directly, without containers. + +Everything from Configuration onward applies to whichever route you chose. + +## Before you start + +- **Docker**, if you want the container route, or the **.NET 10 SDK** if you want to build and run from source. +- By default the **web client listens on port `5012`** and the **API on port `5214`**. You can change either, as long as the two agree on where the API is (see [Configuration](#configuration)). +- For anything reachable beyond your own machine, put a **reverse proxy** in front to terminate TLS and forward to the web client. +- Lumina needs **no external database server**. It keeps its data in a local SQLite file that is created automatically. + +## Option A: run with Docker Compose + +The `src` directory ships a `docker-compose.yml` that brings up the whole system. From that directory: + +```bash +docker compose up +``` + +Add `--build` after changing the code, so the images are rebuilt: + +```bash +docker compose up --build +``` + +This starts the following services: + +| Service | Purpose | Address or endpoint | +| --- | --- | --- | +| `lumina-web` | Web client | http://localhost:5012 | +| `lumina-api` | API server | http://localhost:5214 | +| `otel-collector` | Receives OpenTelemetry data | OTLP at `localhost:4317` (gRPC) and `localhost:4318` (HTTP) | +| `jaeger` | Trace search | http://localhost:16686 | +| `prometheus` | Metrics | http://localhost:9090 | +| `grafana` | Dashboards | http://localhost:3000 (bound to `127.0.0.1`) | + +Inside the stack, the web client is pointed at the API with the `ServerConfiguration__BaseAddress=http://lumina-api` environment variable, and the API and web client ship their telemetry to the collector. + +The observability stack is meant for local development. Grafana signs in with `admin` and a password defaulting to `lumina-admin`, which you must override for any real deployment: + +```bash +GRAFANA_ADMIN_PASSWORD=change-me docker compose up +``` + +### Production secrets + +The development configuration embeds throwaway keys so the container route works out of the box. A real deployment must supply its own, or the API refuses to start: + +- `JwtSettings__SecretKey`: the signing key for authentication tokens. +- `EncryptionSettings__SecretKey`: a base64 encryption key, used by both the API and the web client. + +Set them as environment variables on the `lumina-api` and `lumina-web` services in your own compose file or orchestration. + +## Option B: build and run manually + +With the .NET 10 SDK installed, build the solution from the `src` directory: + +```bash +dotnet build Lumina.sln +``` + +Run the API and the web client. In development, their addresses come from each project's `launchSettings.json` (`http://localhost:5214` and `http://localhost:5012`). When you run a published build directly on a host, set the addresses yourself, either with `ASPNETCORE_URLS` or with `ASPNETCORE_HTTP_PORTS`: + +```bash +ASPNETCORE_HTTP_PORTS=5012 dotnet Lumina.Presentation.Web.dll +``` + +The API creates its SQLite database (`Lumina.db`) next to its own binary and applies any pending migrations at startup, so the first launch sets up the schema on its own. + +## Configuration + +Each application reads its own `appsettings.json` and an optional environment specific `appsettings.development.json`, and environment variables override both. The API also loads the `appsettings.shared.json` file (and its development variant), which holds the server side settings that are not specific to a single layer, such as the media, plugins and theme options. + +All settings are validated when the application starts. A missing or malformed value stops the process immediately with a clear error. In environment variables, sections are flattened with a double underscore, so `JwtSettings:SecretKey` becomes `JwtSettings__SecretKey`. + +The settings that matter most when installing: + +| Setting | Where | Meaning | +| --- | --- | --- | +| `ServerConfiguration:BaseAddress`, `ServerConfiguration:Port`, `ServerConfiguration:ApiVersion` | Web client | Where the web client finds the API. Must match the API's listening address. | +| `CorsSettings:AllowedOrigins` | API server | The origins allowed to call the API from a browser. Must include the web client's public address. | +| `JwtSettings:SecretKey`, `JwtSettings:ExpiryMinutes`, `JwtSettings:Issuer`, `JwtSettings:Audience` | API server | Authentication token signing and lifetime. | +| `EncryptionSettings:SecretKey` | API server and web client | Base64 encryption key. | +| `MediaSettings:RootDirectory` | API server | Root folder for media, `media` by default, served by the API at the `/media` route. | +| `MediaSettings:LibrariesDirectory`, `MediaSettings:BooksDirectory`, `MediaSettings:MusicDirectory` | API server | Subfolders under the media root for the library types. | +| `PluginsSettings:Directory` | API server | Folder holding installed plugin assemblies, `plugins` by default. | +| `ThemeEngine:StoragePath`, `ThemeEngine:BundledThemesPath`, `ThemeEngine:DefaultThemeId` | API server | Where installed and bundled themes live, and which theme is activated by default. | +| `ThemeEngine:MaxArchiveBytes`, `MaxExpandedBytes`, `MaxSingleFileBytes`, `MaxEntries` | API server | Limits enforced on uploaded theme packs. | +| `Telemetry:Enabled`, `Telemetry:Otlp:Endpoint`, `Telemetry:TraceSampleRatio`, `Telemetry:ConsoleExporterEnabled` | API server and web client | Telemetry behavior. The OTLP endpoint also falls back to the `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable. Again, while telemetry is enabled as a feature, nothing is sent anywhere. | + +The `LOG_PATH` environment variable selects where the rolling log files are written. + +### Keeping the two applications in step + +The web client and the API must agree on two addresses, and getting them wrong is the usual cause of a client that loads but never updates live: + +- The web client's `ServerConfiguration:BaseAddress` and `ServerConfiguration:Port` must resolve to the API's listening address. +- The API's `CorsSettings:AllowedOrigins` must include the web client's public address. + +The shipped defaults (`http://localhost:5012` for the client, `http://localhost:5214` for the API) already line up. If you change the host or the port of either, change the matching value in the other file too. + +## Running behind a reverse proxy + +A reverse proxy in front of the web client should forward the standard `X-Forwarded-For`, `X-Forwarded-Proto` and `X-Forwarded-Host` headers, because the client uses them to reconstruct the original request. If you host Lumina under a subpath, forward `X-Forwarded-Prefix` as well; the client honors it as its path base. + +```nginx +# Nginx +proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +proxy_set_header X-Forwarded-Proto $scheme; +proxy_set_header X-Forwarded-Host $host; +# only when hosting under a subpath, for example /lumina +proxy_set_header X-Forwarded-Prefix /lumina; +``` + +```apache +# Apache (httpd) +ProxyPreserveHost On +RequestHeader set X-Forwarded-For "%{REMOTE_ADDR}s" +RequestHeader set X-Forwarded-Proto "https" +RequestHeader set X-Forwarded-Host "%{Host}i" +# only when hosting under a subpath, for example /lumina +RequestHeader set X-Forwarded-Prefix "/lumina" +``` + +```text +# Caddy +reverse_proxy localhost:5012 { + header_up X-Forwarded-For {remote_host} + header_up X-Forwarded-Proto {scheme} + header_up X-Forwarded-Host {host} + # only when hosting under a subpath, for example /lumina + header_up X-Forwarded-Prefix /lumina +} +``` + +SignalR relies on WebSockets, so the proxy must allow the WebSocket upgrade. A single instance needs nothing more; if you run several instances behind a load balancer, route a given client to the same instance so its SignalR connection stays on one node. + +### Rate limiting headers + +The authentication endpoints (login, registration and password recovery) are rate limited to 10 attempts per 15 minutes per client IP address. The API reads the client IP from `X-Forwarded-For` first and falls back to the direct connection address. If a reverse proxy does not forward the original client IP, every request looks like it comes from the proxy, and the limit becomes global instead of per visitor. Forward the header as shown above so the limit stays meaningful. + +The header is trusted as it arrives, with no list of known proxies, so a client that can reach the API directly can set it and sidestep the limit. Keep the API reachable only through your proxy, so that only the proxy can set it. + +## Health checks + +Both applications expose liveness and readiness probes that container orchestrators and load balancers can call: + +| Application | Endpoint | What it reports | +| --- | --- | --- | +| API server | `/health/live` | The process is running. | +| API server | `/health/ready` | The process is running and the database is reachable. | +| Web client | `/health/live` | The process is running. | +| Web client | `/health/ready` | The process is running and the API is reachable. | + +## First run + +Open the web client in a browser. When no account exists yet, Lumina detects that the application has not been set up and sends you to create the administrator account. Fill in the form, and you are signed in and ready to create your first library. + +## Updating + +Updating Lumina is not a step to take lightly. The API applies any pending database migrations at startup, and those migrations can change the schema and the way Lumina's own data is stored. That work is one way: there is no downgrade path and no built in rollback, so once an update has run you cannot simply reinstall the previous version and expect everything to be where you left it. + +Bugs happen, and an update is a place they can bite. A migration can transform Lumina's data incorrectly, fail partway through, or leave your instance in a state that only reveals itself after it is too late to walk back. When that happens, data loss is possible, and the only thing standing between you and it is a backup you made yourself. Your original media files are only ever read, so they are not what is at stake here; what an update can affect is the data Lumina keeps for itself. + +That is why **backing up before every update is mandatory, not optional**. Before you update: + +1. Stop the API, so nothing is writing to the database. +2. Copy the SQLite database file (`Lumina.db`, next to the API binary). +3. Copy your installed plugins and themes. +4. Only then pull the new images, or rebuild, and restart. + +Lumina is free and open source software, provided as is, without warranty of any kind. The project cannot recover data that was lost to an update, and assumes no responsibility for the outcome if you update without a backup. Treat the backup as part of the update, not as advice. diff --git a/docs/manual/managing-libraries/index.md b/docs/manual/managing-libraries/index.md new file mode 100644 index 00000000..bbd1e238 --- /dev/null +++ b/docs/manual/managing-libraries/index.md @@ -0,0 +1,167 @@ +# Managing Libraries + +## Contents + +**Getting started** + +1. [Introduction](../index.md) +2. [Installation](../installation/index.md) + +**Using Lumina** + +3. [Using Lumina](../using-lumina/index.md) + +**Administration** + +4. **Managing Libraries** +5. [Plugins](../plugins/index.md) +6. [Themes](../themes/index.md) + +A media library is how you tell Lumina where a part of your collection lives and what kind of media it holds. Lumina does not wander your disk on its own: you create a library, point it at one or more folders, and only then does it read those folders and build a catalogue of what is inside them. This page covers everything you can do with a library: creating it, teaching it how to read your folders, scanning it, editing it, and removing it. + +## What a library is + +A library is a name, a media type, and one or more content locations. It belongs to the user who created it, but administrators, and anyone holding the permission to create libraries, can manage any library, including the ones they did not create. + +The library keeps a catalogue of the items it indexed, together with their metadata and artwork. Your actual files stay exactly where they are and are only read, except for the one opt-in setting that writes metadata back (see below). + +## Supported library types and file formats + +Lumina can scan two kinds of libraries today: + +- **Book** libraries, for books and e-books. During discovery Lumina recognizes these file extensions: `.pdf`, `.epub`, `.mobi`, `.azw`, `.azw3`, `.cbz`, `.cbr`, `.djvu`, `.fb2`, `.lit`, `.prc`, `.txt`, `.doc`, `.docx` and `.rtf`. Of those, the ones a user can open and read in the browser depend on the enabled reader plugins. The EPUB and PDF readers are bundled with Lumina, but readers are disabled by default, so a freshly created book library cannot open any book until you enable one for it. The rest are still indexed and listed in the catalogue, but cannot be opened for reading until a reader for their format is enabled. +- **Music** libraries, for artists, albums and tracks. During discovery Lumina recognizes these file extensions: `.mp3`, `.flac`, `.m4a`, `.aac`, `.ogg`, `.opus`, `.wav`, `.wma`, `.aiff`, `.aif`, `.ape`, `.wv`, `.dsf`, `.dff` and `.mka`. + +The other types in Lumina's model, such as movies, TV shows, comics, manga, photos, podcasts and audiobooks, are designed but not implemented yet. There is no scanner for them, so they cannot be scanned. + +A scan includes hidden files and folders. + +## Creating a library + +Open the Libraries management page, choose to add a library, and fill in the form. Every field is described below, with the value it takes when you do not change it. + +| Field | Default | What it does | +| --- | --- | --- | +| Title | none | The name of the library, for example `Books` or `Music`. Required, up to 255 characters. | +| Type | none | The media type. Choose `Book` or `Music` today. Required. | +| Content locations | none | The folders that make up the library. Required, and you can add more than one. Pick them with the built-in file system browser, which reaches folders on the server from any browser. Each path can be up to 260 characters. | +| Cover image | none | Optional. A picture that represents the library. Must be a real image file; it is copied into Lumina's own storage and renamed, so moving or deleting the original later does not affect it. | +| Enabled | on | Whether the library is active. A disabled library is never shown and never touched. | +| Locked | off | Whether the library is frozen. A locked library is still shown, but is never changed or updated, scans included. | +| Download metadata from the web | on | Whether Lumina may look up the metadata of the items online. This only has an effect when a metadata provider is enabled for the library (see [Plugins](../plugins/index.md)). | +| Save metadata in media directories | off | Whether the metadata Lumina fetches is also written next to your media files, so other tools can read it. This is the one option that writes into your media folders. | +| Skip unchanged directories during scan | off | An opt-in speedup that skips folders whose own last-modified time has not changed since the last scan. Editing the contents of an existing file in place, without adding, removing or renaming anything in that folder, leaves the folder's time untouched, so that edit can be missed while it is on. | +| Path template | the type's ideal structure | Tells Lumina how your folders are arranged on disk. Unless you customize it, it holds the default template of the library type, which is exactly the structure Lumina expects. Optional, and explained in full below. | + +A library that is disabled or locked is never scanned, so those two settings double as a pause switch, and `Locked` also freezes edits. + +## Path templates + +To make sense of your files, Lumina needs to know how they are arranged. A path template describes that arrangement as an ordered list of parts, and Lumina uses it to pull values such as an author and a title, or an artist, a release and a track number, straight out of the folder and file names. + +A template is optional. Unless you customize it, Lumina uses the default template of the library type, which describes the structure it expects. You only need to touch it when your folders do not follow that structure. + +### The parts a template is made of + +| Part kind | Applies to | Captures | +| --- | --- | --- | +| Literal | both | Fixed text that appears on disk, for example ` - ` or `Disk `. | +| Separator | both | The path separator between two folders. It renders as `\` on Windows and `/` elsewhere, and you never type it yourself. | +| Author | books | The name of the author. | +| Title | books | The title of the book. | +| Series | books | The name of the series the book belongs to. | +| SeriesNumber | books | The number of the book within its series. | +| BookId | books | The identifier Calibre assigns to a book on disk. | +| Artist | music | The name of the artist the release belongs to. | +| ReleaseType | music | The type of the release, such as Album, Single or Compilation. | +| ReleaseYear | music | The year the release was published. | +| ReleaseName | music | The title of the release. | +| TrackNumber | music | The number of the track on its disc. | +| TrackName | music | The title of the track. | +| DiscNumber | music | The number of the disc the track belongs to. | +| Extension | both | The file name extension, without the leading dot. | + +The values a typed part captures follow their type: a `Year` captures exactly four digits, an `Integer` captures one or more digits, and a text value captures anything that is not a path separator. A part also carries a representation, which is the mask that says how the value sits in the name. A plain `{0}` marks where the value goes, and numeric parts can fix a digit width, for example `{0:00}` for exactly two digits. When you add a part, its representation is pre-filled with the type's default, so `TrackNumber` starts as `{0:00}` and `ReleaseYear` starts as `{0}`. + +Parts can also be optional. An optional part may be missing from a path without breaking the match, which is how a template copes with something like a disc folder that only some releases have. Optional parts that sit next to each other are treated as one block: the whole run is either present or absent, never half of it. + +### The defaults + +The default template for a book library describes the Calibre layout, an author folder holding a `Title (id)` folder with a `Title - Author.ext` file inside: + +```text +{Author}/{Title} ({BookId})/{Title} - {Author}.{Extension} +``` + +The default template for a music library describes an artist folder, then a release type folder, then a `Year - Release` folder, with an optional `Disk NN` folder, and numbered tracks named after their title: + +```text +{Artist}/{ReleaseType}/{ReleaseYear} - {ReleaseName}/[Disk {DiscNumber}/]{TrackNumber} - {TrackName}.{Extension} +``` + +The bracketed part is the optional run, present only for multi disc releases. + +### Matching rules + +A file's path is read relative to the content location it was found under, and only counts as a match when the whole relative path fits the template. When it does, Lumina reads the values it needs; when it does not, the item is still indexed, Lumina simply cannot read those values from the path. For books, an unmatched item falls back to a title derived from its file name. For music, the values embedded in the file's tags take priority over the ones read from the path anyway, so the path template mostly fills in what the tags are missing. + +A template is checked before it is saved. A literal part must not be empty, a typed part must contain exactly one value placeholder, and every part kind must be one the library type actually supports. An empty template is always valid and means the type's default. + +### Changing the template later + +The template is read on every scan, so changing it changes how your folders are interpreted from the next scan onward. If you change it after items have already been catalogued, run a scan and check the results, because the titles and numbers Lumina derives from paths can change, and an item whose path no longer matches will be catalogued with fallback values instead. + +## Scanning a library + +Creating a library only records where the media lives. To actually read it, you scan it. You can scan a single library, or all of them at once, from the Libraries page. + +Lumina is designed to be efficient and performant. The first scan of a library reads and indexes everything it finds, so it is the slowest one. Every scan after that compares what is on disk against the previous scan and only processes what is new or changed, so it is normally much faster. How long any scan takes also depends on what is enabled for the library: metadata and artwork providers that fetch data from the web add network time on top of reading the files, and they do it only for the items that need it. + +Scans run on the server in the background, so once one starts you can close the browser and come back later. + +While a scan is running, its progress is shown live: how far along it is overall, how many items it has processed, and the operation it is currently on. A scan is queued before it starts, then runs, and ends up finished, cancelled or failed. You can cancel a running scan at any time, for one library or for all of them. + +A disabled or locked library is refused a scan. Scans can also be driven by the scheduler, so libraries refresh themselves on a timetable without you lifting a finger. + +## Editing a library + +Editing a library reopens the same form, and changes take effect on the next scan. Beyond the fields above, two things change the wider picture: + +- Changing the **type** of an existing library also reconciles the metadata, artwork and reader provider settings of that library, so they match the plugins that support the new type. +- Changing the **content locations** takes effect on the next scan. Items found under a location you removed are dropped from the catalogue, along with the metadata and artwork Lumina had stored for them, and items under a location you added are picked up. + +## Deleting a library + +Deleting a library removes it from Lumina: its configuration, its scan history, the items in its catalogue, their metadata and the artwork Lumina stored for them, and its provider settings. The cover image Lumina copied into its own storage is removed as well. Your original files are left untouched. + +Deletion is not reversible from Lumina. If you want the library back afterwards, you recreate it and scan again. Because of that, and because this is pre-alpha software, treat deletion as final and make sure of what you are deleting. + +## Where your files live + +Content locations are folders on the machine that runs the API server, and the file system browser is how you reach them from wherever you happen to be. Folders under the media root that Lumina manages itself (its database, the cover images it copies, the artwork and thumbnails it generates, and the plugin and theme storage) live in Lumina's own storage rather than in your media folders, so your folders stay yours. + +## Settings that affect your libraries + +These are per user settings, each user changes their own from the settings page in the client, and they shape how libraries are browsed and how their items are read. + +| Setting | Default | What it does | +| --- | --- | --- | +| Enable pagination | on | Whether lists of library items are split into pages. | +| Items per page | 48 | How many items a page holds when pagination is on. | +| Ignore "The" prefix for the alpha picker | off | Whether titles that begin with "The" are filed under the following word in the alphabetical picker, so that "The Hobbit" sorts under H rather than under T. | +| Aggregate metadata when missing | off | Whether a metadata field that a provider could not fill is completed from the other enabled metadata providers of that item, instead of staying empty. | +| Aggregate artwork when missing | off | The same idea for artwork: when the preferred provider has nothing, try the others. | +| Render PDFs as images | off | Whether PDFs are shown as page images, which keeps their original layout but makes their text non selectable and non searchable. Off uses the text layer instead. | +| Preserve book styles | on | Whether a book keeps its own fonts, colors and alignment when it is rendered. A book's styles can load resources from external servers, which those servers could observe; turning this off strips the styles and removes that possibility, at the cost of the book's original look. | + +## Things to watch out for + +- **`Save metadata in media directories` writes into your media folders.** It is off by default; turn it on only if you want metadata files to accompany your media. +- **`Skip unchanged directories during scan` can miss in-place edits.** It trusts each folder's own last-modified time, so editing the contents of an existing file without adding, removing or renaming anything in its folder leaves the folder unchanged and it gets skipped. Adding, removing or renaming a file does change the folder, and is still seen. +- **`Locked` blocks everything.** A locked library is not scanned and not updated, including by the scheduler. +- **`Disabled` hides the library.** A disabled library is neither shown on the dashboard nor touched. +- **Deleting a library removes Lumina's catalogue for it.** The files remain, but the metadata, artwork and history Lumina held for that library do not. +- **Removing a folder from a library, or deleting a file, removes its catalogued items on the next scan.** The catalogue tracks what is on disk, so what disappears from disk also disappears from Lumina, along with the metadata and artwork Lumina stored for it. +- **Changing the path template can change how items are read.** Re-scan and check the results after a change. +- **Only Book and Music libraries scan today.** Other types cannot be created into a working library yet. +- **Not every book format is readable.** Recognized formats are indexed, but only those with an enabled reader plugin can be opened in the browser. diff --git a/docs/manual/plugins/index.md b/docs/manual/plugins/index.md new file mode 100644 index 00000000..f355216a --- /dev/null +++ b/docs/manual/plugins/index.md @@ -0,0 +1,90 @@ +# Plugins + +## Contents + +**Getting started** + +1. [Introduction](../index.md) +2. [Installation](../installation/index.md) + +**Using Lumina** + +3. [Using Lumina](../using-lumina/index.md) + +**Administration** + +4. [Managing Libraries](../managing-libraries/index.md) +5. **Plugins** +6. [Themes](../themes/index.md) + +Plugins are how Lumina learns to understand more than its core knows. They supply the metadata and the artwork of your library items, and they open book formats for reading. They are separate units you install, enable, rank and configure, so the core stays lean and the knowing arrives in pieces that you control. + +## What a plugin can do + +A plugin can provide one or more of three capabilities: + +- **Metadata providers** fill in the metadata of a library item, either from the web or from files on disk. Each provider declares which library types it works with and whether it needs to reach the internet. +- **Artwork providers** supply the covers and other images of a library item. +- **Book readers** open a book format and turn it into something the browser can render, with the original layout, styling and structure. + +Lumina ships with these plugins: + +| Plugin | Provides | For | Needs web | What it does | +| --- | --- | --- | --- | --- | +| MusicBrainz Metadata | metadata | Music | yes | Retrieves artist, album and track metadata from [MusicBrainz](https://musicbrainz.org/). | +| ID3 Metadata | metadata | Music | no | Populates artist, album and track metadata from the tags embedded in the audio files. | +| Local Music Artwork | artwork | Music | no | Reads artist and album artwork from the images stored in the folders of a music library. | +| Cover Art Archive | artwork | Music | yes | Retrieves the cover, back, booklet, medium and other artwork of music albums from [Cover Art Archive](https://coverartarchive.org/). | +| Calibre Metadata | metadata, artwork | Book | no | Reads book metadata and covers from the OPF files of a Calibre library. | +| Open Library Metadata | metadata | Book | yes | Retrieves book and edition metadata from [Open Library](https://openlibrary.org/). | +| EPUB Reader | book reader | Book | no | Opens EPUB format books. | +| PDF Reader | book reader | Book | no | Opens PDF format books. | + +The `Needs web` column is worth pausing on: the providers marked `yes` reach out to the internet when a library scan runs, and that can leak out your location and the content of your libraries via inference. They also add increased time to scans, obviously. + +## Installing a plugin + +Plugins are managed from the administration area, on the Plugins page, which only administrators can open. To install one, upload either a single `.dll` assembly or a `.zip` archive that holds the assembly together with any dependencies it needs. + +The uploaded files are placed in the plugin storage directory, `plugins` by default, and are picked up at the **next startup of the API**. In other words, after installing a plugin, restart the API server for it to take effect. Installing is a supervised operation: the archive is unpacked into a flat set of assemblies inside the plugin directory, and any directory component in the upload is stripped, so a crafted archive cannot write outside that directory. + +Once installed and restarted, the plugin appears on the Plugins page with its name, author, version and description. + +## Load status + +Each plugin is listed with one of two states: + +- **Loaded**, meaning Lumina found and initialized it. +- **Failed to load**, meaning the assembly was found but could not be initialized, in which case the page also shows the error. A plugin that fails to load contributes nothing. + +Lumina reconciles the list at every startup. A plugin that is no longer present in the storage directory is forgotten, together with the per library settings that referenced it. + +## Uninstalling a plugin + +There is no uninstall button. To remove a plugin, delete its assembly (and any files that came with it) from the plugin storage directory and restart the API. The plugin then disappears from the list, and the settings that enabled it for your libraries are cleaned up. + +## Enabling, ranking and configuring + +Plugins themselves are installed once, but they are turned on per library. Open a library to edit it and you will find a section for metadata providers and one for artwork providers. A book library has one more, for its book readers: + +- **Metadata providers.** Each is switched on or off, and ordered. The providers are tried in that order, the first one that produces a result is used, and, when you enable the `Aggregate metadata when missing` setting, the fields it left empty are filled from the providers that come after it. +- **Artwork providers.** The same idea for images: switched on or off, and ordered, so you decide which source wins when more than one has something. +- **Book readers (book libraries only).** These are the plugins that can open a book. Each is switched on or off, and a book can be opened for reading only through an enabled reader whose format matches it, so an EPUB needs the EPUB reader, a PDF the PDF reader, and so on. + +A plugin that supports a library type but is not wanted for a particular library can simply be left off there, without affecting your other libraries. + +## Plugin settings + +A plugin can declare its own settings, which Lumina renders on the Plugins page next to it. Each setting is one of four kinds: a text field, a number, a true/false switch, or a choice from a fixed list. Values you save are stored by Lumina and handed to the plugin on the next run. + +The shipped plugins use these settings for practical things, such as the base address of a service, a contact email for a polite API client, lookup limits, and the minimum interval between requests. These settings are global to the plugin, not per library. + +## Writing your own plugin + +Anyone can write a plugin, and it is the intended way to teach Lumina about a new source or a new format. A plugin is a .NET assembly targeting the same framework as the server, referencing the `Lumina.Plugins.Contracts` project. To be a plugin it implements `IPlugin`, which describes it and lists its settings, and `IPluginServiceRegistrator`, which wires its services up. To contribute a capability it also implements one or more of `IMetadataProvider`, `IArtworkProvider` and `IBookReader`. Package the built assembly, and any dependencies, into a ZIP and install it like any other plugin. + +## Security + +Treat plugins with more caution than themes. A theme is HTML, CSS and JavaScript, but a plugin is a .NET assembly that Lumina loads into the API process itself. It runs with the full trust of the server: it can read and write files, open network connections and do anything else the API is allowed to do. There is no sandbox around a plugin once it is loaded. + +That means a plugin from an untrusted source effectively owns your server. Only install plugins you trust, and if you cannot vouch for the code, read it first. The bundled plugins are written and reviewed by the project and are safe to use. diff --git a/docs/manual/themes/index.md b/docs/manual/themes/index.md new file mode 100644 index 00000000..8b0e5c78 --- /dev/null +++ b/docs/manual/themes/index.md @@ -0,0 +1,116 @@ +# Themes + +## Contents + +**Getting started** + +1. [Introduction](../index.md) +2. [Installation](../installation/index.md) + +**Using Lumina** + +3. [Using Lumina](../using-lumina/index.md) + +**Administration** + +4. [Managing Libraries](../managing-libraries/index.md) +5. [Plugins](../plugins/index.md) +6. **Themes** + +The web client is a themed shell. Every page it shows is drawn from the templates of the active theme, so a theme decides how Lumina looks, how it is laid out, and how its navigation is arranged. A theme is a portable ZIP archive of HTML templates and static assets, and swapping one in can change the entire feel of the application without a change to its code, because some of us still find flat interfaces sterile and boring. :) + +A theme changes how Lumina looks and how its pages are structured. It cannot add features: it shapes what is already there. + +## What a theme is + +A theme pack is a ZIP archive that holds three things, and nothing else: + +- a `theme.json` manifest at the root, describing the theme; +- a `templates/` directory with the HTML the client renders; +- an `assets/` directory with everything static, such as stylesheets, images, fonts and scripts. + +The API server stores installed themes and serves their templates and assets. The web client fetches those pieces and renders them with a small, non-executable template engine, so a theme can interpolate values, repeat over collections and test conditions, but cannot run arbitrary code in the templates themselves. + +## Bundled themes + +Lumina ships with two themes, both installed automatically at startup: + +- **`lumina-default`**, the theme Lumina falls back to when no other theme is selected. +- **`editorial-paper`**, a clean, readable theme that is also the reference to start from when you write your own. + +A bundled theme that goes missing or becomes corrupted is restored automatically from its shipped archive the next time the server starts, unless you deliberately deleted it. This means a bundled theme always comes back on its own. + +## Selecting the current theme + +Administrators choose the active theme from the administration Themes page. The page lists every installed theme with a preview thumbnail taken from the theme's own manifest, and marks where each one came from, whether it is bundled with Lumina or installed by a user. Selecting a theme makes it the one every page is rendered with. + +## Installing a theme + +To install a theme, upload its ZIP archive from the Themes page. The archive is checked before anything is stored: the manifest must be present and valid, the pack may only contain the manifest, templates and assets, and it has to stay within the size limits below. An invalid pack is rejected whole, leaving nothing behind. + +Installing a theme whose id already exists replaces the files of that theme. A freshly installed theme is not active until you select it, so you can install first and switch later. + +## Managing installed themes + +Beyond selecting and installing, the Themes page lets an administrator download any theme back out as a ZIP, delete a theme, and restore a bundled one. Deleting follows a few rules that keep Lumina from ever ending up themeless: + +- Only administrators can delete a theme. +- The last remaining bundled theme cannot be deleted. +- When the active theme is deleted, another available theme is activated automatically, preferring the configured default. +- Bundled themes are deleted softly: their files are removed but their shipped archive is kept, so they can be restored. Themes you installed yourself are removed entirely, because Lumina does not keep a copy of them. + +## Theme data caching + +Each user has a setting, `Enable theme caching`, on by default, that controls whether the theme data served to them is cached. Turning it off makes the client fetch theme templates and assets fresh every time, which is useful while you are developing a theme; leaving it on is faster for everyday use. + +## Creating a theme + +Anyone can write a theme, and it is the intended way to change Lumina's look. A theme is a directory with `theme.json` at its root, a `templates/` directory and an `assets/` directory, compressed into a ZIP with the manifest at the root of the archive, not nested in an extra folder. The bundled `editorial-paper` theme follows exactly this shape and is the best starting point. + +### The manifest + +The manifest is a small JSON object: + +| Field | Required | Rule | +| --- | --- | --- | +| `schemaVersion` | yes | Must be `1`. | +| `id` | yes | Lowercase kebab-case, up to 64 characters, used to reference the theme, for example `my-dark-theme`. | +| `name` | yes | Display name, up to 80 characters. | +| `description` | yes | What the theme is, up to 300 characters. | +| `author` | yes | Who made it, up to 80 characters. | +| `version` | yes | A semantic version, for example `1.0.0`. | +| `preview` | no | Path to a preview image under `assets/`, shown as the theme thumbnail. | +| `templates` | no | An optional map from template key to a file under `templates/`. | + +### Templates + +Templates use a small, Mustache-style syntax: `{{name}}` prints a value, escaped; `{{{name}}}` or `{{&name}}` prints it raw; `{{#name}}...{{/name}}` repeats or shows a section; `{{^name}}...{{/name}}` shows a section when a value is absent. A theme provides a layout that wraps every page, a navigation menu, an optional 404 page, page templates for the pages it wants to restyle, and optionally templates for the file system browser component. + +A page is matched to a template by a key that mirrors the page's path, so the books page looks for `templates/library/written-content-library/book-library/books/index.html`, or a template at a parent scope when the exact one is missing. When a theme has no template for a page, the application renders that page itself with its own built-in view, so a theme never has to cover everything. + +The engine enforces hard limits so a single theme cannot exhaust the server: at most 32 levels of section nesting, expressions no longer than 120 characters, and at most 4 MB of rendered output per page. + +### Assets + +Everything under `assets/` is served to the browser. A stylesheet referenced from the layout, the images it uses, fonts and scripts all live there. A theme can also ship an optional `assets/file-icons.json` that maps file extensions to icon files for the file system browser. Because scripts are allowed, a theme carries its own behavior too, and it is on you to ship the JavaScript its chrome needs. + +### Limits + +A theme pack must fit inside these limits, or it is rejected on install: + +| Limit | Value | +| --- | --- | +| Archive size | 8 MB | +| Total expanded size | 24 MB | +| Single file size | 6 MB | +| Number of entries | 250 | + +The full template and component reference, including the exact fields each page and component exposes, lives in the [theming guide](../../technical/theming/Theming.md) for authors who need the details. + +## Security + +A theme is treated as untrusted input, but it is not powerless: + +- Values printed with `{{name}}` are HTML-escaped, so a theme cannot inject markup through a model value, and the template engine cannot execute code. +- Paths are normalized and confined, so a theme cannot reach outside its own pack, and an oversized or over-populated archive is refused. +- A theme can, however, contain JavaScript, and that JavaScript runs in the browser of every user who views it. A malicious theme is a real risk. Only install themes from sources you trust, or read their code first. The themes bundled with Lumina are written and reviewed by the project and are safe to use. diff --git a/docs/manual/using-lumina/index.md b/docs/manual/using-lumina/index.md new file mode 100644 index 00000000..60a693a3 --- /dev/null +++ b/docs/manual/using-lumina/index.md @@ -0,0 +1,85 @@ +# Using Lumina + +## Contents + +**Getting started** + +1. [Introduction](../index.md) +2. [Installation](../installation/index.md) + +**Using Lumina** + +3. **Using Lumina** + +**Administration** + +4. [Managing Libraries](../managing-libraries/index.md) +5. [Plugins](../plugins/index.md) +6. [Themes](../themes/index.md) + +This is the guide to actually using Lumina from the web client, once a server is running and at least one library exists. It covers signing in, finding your way around, browsing and reading what you have, editing an item, and the settings that shape the experience. + +## Getting around + +The header menu rearranges itself depending on who you are. Everyone sees a site entry that leads home, an account section, a library section once signed in, a language picker, a tools section, and a help section. Administrators also get an administrator section for roles, permissions, plugins, themes and scheduled jobs. + +The home page is your catalogue: a grid of the libraries you are allowed to see, each shown as a card with its cover when it has one. Selecting a card opens that library's browsing page. Some library types do not have a browsing page yet, and their cards appear as plain panels rather than links. + +## Your account + +Accounts are local to your Lumina server. From the account section you can: + +- **Register** a new account, when registration is available on the server. +- **Log in** with your username and password. If your account uses two factor authentication, you are also asked for the current one time code from your authenticator app. +- **Recover a password** when you have forgotten it, using your username and, when two factor authentication is on, a one time code. +- **Change your password** while signed in, by giving the current one and the new one twice. +- **Open your profile** to see your account details. +- **Log out** to end the session. + +What each account can do is decided by its role and permissions, which administrators manage. + +## Browsing your books + +Opening a book library shows a page with the library title, a search box, a sort toggle, a count of items, a grid of book cards, an alphabetical picker down the side, and pagination at the bottom. + +- **Search** filters the books by name; press Enter or use the search button. +- **Sort** toggles between ascending and descending order. +- **The alpha picker** jumps to titles starting with a chosen character. It offers All, then the number and symbol keys, then A to Z. You can also press a letter key to filter, and press Escape to clear the filter. +- **Pagination** splits the list into pages when you have it enabled, with previous and next buttons and a page indicator. When it is off, the whole list is shown and the count is the total. + +Each book is a card with its cover and title. Clicking a card opens the book in the reader; a book can only be opened when a reader for its format is enabled for the library. Right-clicking a card, or using its actions button, opens a menu with **Read** and **View details**. + +## Reading a book + +The reader opens the book in the browser and gives you a small toolbar and the book itself: + +- **Back to library** returns to the browsing page you came from. +- **Table of contents** toggles a panel of the book's sections; selecting one jumps to it. +- **Previous** and **Next** move between sections, and the position indicator shows where you are. +- **A-** and **A+** change the text size, within a comfortable range. + +A book opens only through an enabled reader for its format. The EPUB and PDF readers are bundled and can be enabled for a library. A scanned PDF has no text to extract, so it can only be shown as page images, which is what the `Render PDFs as images` setting turns on. + +## Browsing your music + +Opening a music library shows a page with the library title, a search box, an item count, a grid of artist cards, and pagination. Search filters the artists by name. Each artist is a card; selecting it opens the artist's page, and the card's actions menu offers **View details** and **Delete**. + +The artist page is also where you edit the artist. It holds the artist's general information, areas, aliases, contributors and ratings, and it lists the artist's albums as cards, each leading to its own album page. The album page holds the album's information and its tracks, and the track page holds the track's details. Deleting an artist, album or track removes it from Lumina's catalogue; your files are not touched. + +## Editing what is catalogued + +Both book and music pages double as editors for the items that were scanned in. A book's details page groups its fields into general and release information, language and original language, genres, tags, identifiers, ISBNs, contributors and ratings, and lets you replace its cover. An artist's page groups its fields into general information, areas, aliases, contributors and ratings. Album and track pages follow the same shape for their own fields. Saving sends the changes back to the server, and a confirmation or an error is shown in the corner of the screen. + +Changes you make here live in Lumina's catalogue. + +## The file system browser + +Wherever Lumina needs a folder or a file from the server, it opens the file system browser: a modal that lists the drives, a tree of folders, a pane of the items in the current folder, and an address bar you can walk with. It offers icon view modes, generates thumbnails for images, and can show or hide hidden files. You will meet it when you pick the content locations of a library, and anywhere else the interface asks you to point at a path on the server. + +## Settings and language + +The tools section holds your settings and the language picker. + +Your **settings** decide how lists and books behave for you. Enable pagination and the number of items per page control how browsing is split. The alpha picker option decides whether titles beginning with "The" are filed under the next word. Theme caching decides whether the theme is fetched fresh each time. Rendering PDFs as images and preserving book styles shape how books are shown, and the metadata and artwork aggregation options decide whether missing fields are completed from your other providers. The ones that touch libraries are described in more detail in [Managing Libraries](../managing-libraries/index.md). + +The **language** picker switches the interface between the languages Lumina ships with, and remembers your choice. diff --git a/src/Lumina.sln b/src/Lumina.sln index 5d14a1d5..23593842 100644 --- a/src/Lumina.sln +++ b/src/Lumina.sln @@ -31,11 +31,39 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{19C1EE2F-0F4C-4BF6-B677-E0EC37AB3C72}" ProjectSection(SolutionItems) = preProject ..\docs\CONTRIBUTING.md = ..\docs\CONTRIBUTING.md - ..\docs\INSTALL.md = ..\docs\INSTALL.md ..\LICENSE.md = ..\LICENSE.md ..\README.md = ..\README.md ..\docs\SOURCES.md = ..\docs\SOURCES.md - ..\docs\USAGE.md = ..\docs\USAGE.md + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "manual", "manual", "{7E9ED516-A6A6-452F-855A-FE1B0BA42703}" + ProjectSection(SolutionItems) = preProject + ..\docs\manual\index.md = ..\docs\manual\index.md + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "installation", "installation", "{A0C7314A-3D91-46A4-8E14-303E179F96E8}" + ProjectSection(SolutionItems) = preProject + ..\docs\manual\installation\index.md = ..\docs\manual\installation\index.md + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "using-lumina", "using-lumina", "{E5599FF5-B16B-4BA5-A0C4-BEBCA087F972}" + ProjectSection(SolutionItems) = preProject + ..\docs\manual\using-lumina\index.md = ..\docs\manual\using-lumina\index.md + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "managing-libraries", "managing-libraries", "{9515979E-F28E-4062-8C3D-7CB3E38102D6}" + ProjectSection(SolutionItems) = preProject + ..\docs\manual\managing-libraries\index.md = ..\docs\manual\managing-libraries\index.md + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "plugins", "plugins", "{60E7E49C-BAC5-415C-A998-9182B9A17131}" + ProjectSection(SolutionItems) = preProject + ..\docs\manual\plugins\index.md = ..\docs\manual\plugins\index.md + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "themes", "themes", "{55FEC474-E130-4808-A0BB-1BF6C97ECA2D}" + ProjectSection(SolutionItems) = preProject + ..\docs\manual\themes\index.md = ..\docs\manual\themes\index.md EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "technical", "technical", "{64570222-A5AC-49EE-BEBC-25D61B989A20}" @@ -1332,6 +1360,12 @@ Global {3BB42EB9-A0A3-4E3F-9053-785F429714AE} = {53B1231B-37F5-44BA-80D5-DBA979775F5C} {4D5E4789-8437-4F3B-883E-28BBF8A4848F} = {53B1231B-37F5-44BA-80D5-DBA979775F5C} {53B1231B-37F5-44BA-80D5-DBA979775F5C} = {16E590D3-DD9F-4B45-BF19-C6E317A57D11} + {7E9ED516-A6A6-452F-855A-FE1B0BA42703} = {19C1EE2F-0F4C-4BF6-B677-E0EC37AB3C72} + {A0C7314A-3D91-46A4-8E14-303E179F96E8} = {7E9ED516-A6A6-452F-855A-FE1B0BA42703} + {E5599FF5-B16B-4BA5-A0C4-BEBCA087F972} = {7E9ED516-A6A6-452F-855A-FE1B0BA42703} + {9515979E-F28E-4062-8C3D-7CB3E38102D6} = {7E9ED516-A6A6-452F-855A-FE1B0BA42703} + {60E7E49C-BAC5-415C-A998-9182B9A17131} = {7E9ED516-A6A6-452F-855A-FE1B0BA42703} + {55FEC474-E130-4808-A0BB-1BF6C97ECA2D} = {7E9ED516-A6A6-452F-855A-FE1B0BA42703} {64570222-A5AC-49EE-BEBC-25D61B989A20} = {19C1EE2F-0F4C-4BF6-B677-E0EC37AB3C72} {D78A725D-C3AE-420B-ABA8-255A000D7324} = {64570222-A5AC-49EE-BEBC-25D61B989A20} {459EF701-AB73-40ED-81E6-144D3587C667} = {D78A725D-C3AE-420B-ABA8-255A000D7324}