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.

The ReadRealm API is a RESTful HTTP API. All request and response bodies use JSON. It is the single backend for all ReadRealm clients — Android, iOS, and the Flutter admin dashboard.

Base URL

http://localhost:3000
The server listens on port 3000 by default. You can change this with the PORT environment variable.

Request format

Set the Content-Type header to application/json for all requests that include a body.
curl --request POST \
  --url http://localhost:3000/auth/login \
  --header 'Content-Type: application/json' \
  --data '{"email": "user@example.com", "password": "secret123"}'

Authentication

Protected endpoints require a JSON Web Token (JWT) in the Authorization header using the Bearer scheme.
Authorization: Bearer <your_access_token>
You obtain a token by calling POST /auth/login. The token expires after 1 hour. See the Authentication guide for the full login and token refresh flow.
Requests to protected endpoints without a valid token return 401 Unauthorized.

Response format

All responses are JSON objects. Successful responses return the relevant data directly. Error responses include a message field describing what went wrong.
{
  "message": "Email already in use"
}

CORS

The API accepts requests from any origin (*). No additional CORS configuration is needed during local development.

Request body size limit

The API accepts JSON request bodies up to 100 MB. This accommodates large payloads such as book uploads.

Resource groups

Authentication

Register accounts, log in, verify email addresses, and manage passwords.

Books

Upload, search, retrieve, and manage books in your library.

Users

Retrieve and update user profiles.

Chat

Send and receive messages in per-book chat rooms.

Speech

Convert text to speech and transcribe voice input.

Build docs developers (and LLMs) love