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 backend reads all configuration from environment variables at startup. Set these in apps/api/.env.
Copy the template
cp apps/api/.env.example apps/api/.env
Then edit apps/api/.env and fill in your values.
Database
| Variable | Example | Description |
|---|
MONGO_URL | mongodb://localhost:27017/readrealm | Full MongoDB connection string. When running with Docker Compose, use mongodb://mongodb:27017/readrealm. |
Authentication
| Variable | Example | Description |
|---|
JWT_SECRET | your_jwt_secret_key_min_32_characters | Secret used to sign JWT tokens. |
JWT_SECRET must be at least 32 characters long. Shorter values will cause token signing to fail.
Email
ReadRealm sends verification and notification emails via Gmail SMTP.
| Variable | Example | Description |
|---|
MAIL_HOST | smtp.gmail.com | SMTP server hostname. |
MAIL_USER | your_email@gmail.com | Gmail address used as the sender. |
MAIL_PASS | your_app_specific_password | App-specific password generated from your Google Account (not your regular Gmail password). |
Azure Text-to-Speech
Powers the audio narration feature using Azure OpenAI TTS.
| Variable | Example | Description |
|---|
AZURE_API_TTS_KEY | your_azure_tts_key | API key for the Azure OpenAI TTS deployment. |
AZURE_API_TTS_ENDPOINT | https://your-region.openai.azure.com/ | Endpoint URL for the Azure OpenAI TTS deployment. |
AZURE_API_TTS_MODEL | tts | Deployment name for the TTS model (e.g. tts). |
Azure Real-time Speech
Powers two-way voice interaction using Azure OpenAI Realtime.
| Variable | Example | Description |
|---|
AZURE_API_REALTIME_KEY | your_azure_realtime_key | API key for the Azure OpenAI Realtime deployment. |
AZURE_API_REALTIME_ENDPOINT | https://your-region.openai.azure.com/ | Endpoint URL for the Azure OpenAI Realtime deployment. |
AZURE_API_REALTIME_MODEL | gpt-4o-realtime-preview | Deployment name for the realtime voice model. |
Google AI (Gemini)
Powers AI-generated summaries and book descriptions.
| Variable | Example | Description |
|---|
GEMINI_API_KEY | your_google_ai_api_key | API key for Google Generative AI (Gemini). Obtain from Google AI Studio. |
GEMINI_API_MODEL | gemini-pro | Gemini model variant to use. |
Server
| Variable | Default | Description |
|---|
NODE_ENV | development | Runtime environment. Set to production in deployed environments. |
PORT | 3000 | Port the NestJS API listens on. |
Client apps
The Android client, iOS client, and Flutter admin dashboard do not use .env files. Their API connection is configured at build time in source code. See the individual client setup pages for details: