Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/aliammari1/readrealm/llms.txt

Use this file to discover all available pages before exploring further.

ReadRealm uses AI to help you understand books before you read them and to surface patterns in what readers think. When you open a book’s detail page, an AI-generated summary is fetched automatically. Reader reviews are analyzed for sentiment so you can gauge the overall reaction at a glance.

Book summaries

A five-line summary generated by Google Gemini from the book’s full text.

Sentiment analysis

Each review is automatically classified as positive, negative, or neutral.

AI providers

Google Generative AI and HuggingFace work together behind the scenes.

Auto descriptions

Book detail pages include AI-generated descriptions when no author description exists.

Book summaries

You can request an AI-generated summary for any book by title. ReadRealm fetches the book’s full text from Project Gutenberg, then sends it to Google Gemini with the prompt:
“Summarize this book in 5 lines.”
The result is a concise, readable overview that gives you the core premise and themes without spoilers. Endpoint:
GET /book/summary/{title}
Example:
curl "http://localhost:3000/book/summary/Moby%20Dick"
Response: A plain-text string containing the five-line summary generated by Gemini. For example:
Moby-Dick follows Ishmael, a sailor who joins the whaling ship Pequod under the obsessed
Captain Ahab. Ahab is driven by revenge against the great white whale Moby Dick, who tore
off his leg on a previous voyage. The novel explores themes of obsession, fate, and humanity's
struggle against nature. Through rich descriptions of whaling life, Melville examines isolation,
friendship, and the limits of human ambition.
Summaries require the book to be available as plain text on Project Gutenberg. If the book cannot be found or has no text content, the API returns "Book not found" or "No text data provided".

Descriptions on book details

When you load a book’s detail page via GET /book/details/{id}, ReadRealm automatically calls the summary endpoint to populate the description field. This means the description you see is always generated fresh by Gemini — not just whatever the original catalog entry contained. If the AI summary call fails (e.g., network error or the book has no text), the system falls back to the description from the Open Library catalog entry.

Sentiment analysis

Every time you retrieve your own reviews via GET /book/user-reviews/{userId}, ReadRealm runs sentiment analysis on each review’s comment text using the sentiment library. The result is stored in the emotion field on the review object.
emotion valueMeaning
positiveThe comment has an overall positive tone
negativeThe comment has an overall negative tone
neutralThe comment is neither clearly positive nor negative
Example review with sentiment:
{
  "userId": "user_abc123",
  "bookId": 2701,
  "rating": 5,
  "comment": "An absolute masterpiece — every chapter drew me deeper in.",
  "emotion": "positive",
  "createdAt": "2026-03-27T09:00:00.000Z"
}
Sentiment analysis runs when reviews are fetched, not when they are submitted. The emotion field is computed on the fly from your comment text each time you request your review history.

AI providers

ReadRealm uses multiple AI providers depending on the feature:
ProviderFeatureModel
Google Generative AIBook summaries and descriptionsGemini (configurable via GEMINI_API_MODEL env var)
HuggingFaceAdditional AI capabilitiesConfigurable via HUGGINGFACE_API_KEY env var
Azure Cognitive ServicesText-to-speech, speech-to-textAzure OpenAI deployment
You need to configure your own API keys for each provider. See the environment setup guide for the full list of required variables.

What AI insights are available

InsightHow to accessWhen it appears
Book summary (5 lines)GET /book/summary/{title}On demand
Auto-generated descriptionGET /book/details/{id}Automatically on book detail page
Review sentiment (emotion)GET /book/user-reviews/{userId}With every review you have written