Skip to content

aliammari1/readrealm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

73 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š ReadRealm

Where Books Meet Intelligence

An intelligent, collaborative digital library platform that combines real-time conversations, AI-powered insights, and seamless cross-platform reading into one unified experience.

ReadRealm transforms how people discover, read, and discuss books. Whether you're on mobile, desktop, or webβ€”your library, conversations, and reading progress sync instantly. Powered by advanced AI and built on cutting-edge cloud infrastructure, ReadRealm empowers readers to go beyond the page.


✨ Why ReadRealm?

🎯 Problem ReadRealm Solution
πŸ“– Scattered reading across devices Android & iOS client apps + Flutter adminβ€”your library everywhere
πŸ€– Passive reading experience AI-powered insights, smart recommendations, real-time chat
πŸ’¬ Reading in isolation Engage with AI assistants & other readers instantly
🎀 Text-heavy interfaces Voice commands & audio narration with Azure Cognitive Services
πŸ”„ Sync headaches Automatic cross-platform sync in milliseconds

πŸ—οΈ Tech Stack & Architecture

Application Layers

Frontend (Client Applications):

  • πŸ“± Android Client: Native Kotlin + Jetpack Compose
  • 🍎 iOS Client: Native Swift
  • πŸ–₯️ Admin Dashboard: Flutter cross-platform (Web, Desktop, macOS)

Backend (Single Source of Truth):

  • 🟒 NestJS API: TypeScript, RESTful + WebSocket
  • πŸ—„οΈ MongoDB: Scalable data persistence
  • πŸ€– AI Services: Google AI, HuggingFace, Azure Cognitive Services

Backend Stack

  • Framework: NestJS 10 with TypeScript
  • Database: MongoDB with Mongoose ORM
  • Real-time: Socket.IO for instant chat & collaboration
  • API: RESTful architecture with OpenAPI specification
  • AI: Google Generative AI, HuggingFace, Azure Cognitive Services
  • Speech: Real-time audio processing with FFmpeg

πŸ›οΈ System Architecture

graph TB
    subgraph Clients["πŸ“± Client Apps"]
        Android["πŸ“± Android Client<br/>(Kotlin + Compose)"]
        iOS["🍎 iOS Client<br/>(Swift)"]
    end
    
    subgraph Admin["πŸ–₯️ Admin Dashboard"]
        Dashboard["πŸ“Š Flutter Admin<br/>(Web/Desktop)"]
    end
    
    subgraph Backend["βš™οΈ Backend Layer"]
        API["NestJS API<br/>(TypeScript)"]
        Auth["πŸ” Auth Service"]
        Chat["πŸ’¬ Socket.IO<br/>(Real-time)"]
    end
    
    subgraph Services["πŸ€– External Services"]
        AI["Google AI<br/>HuggingFace<br/>Azure Cognitive"]
        Database["πŸ—„οΈ MongoDB"]
    end
    
    Android -->|REST/WebSocket| API
    iOS -->|REST/WebSocket| API
    Dashboard -->|REST/WebSocket| API
    
    API --> Auth
    API --> Chat
    API --> Database
    API --> AI
    
    Chat -.->|Events| Android
    Chat -.->|Events| iOS
    Chat -.->|Events| Dashboard
Loading

πŸš€ Core Features

πŸ“š Intelligent Library Management

Organize thousands of books with AI-powered categorization, smart search, and personalized recommendations based on reading habits and preferences.

πŸ’¬ Real-time Collaborative Chat

Discuss books with AI assistants and other readers instantly. Socket.IO powers millisecond-latency conversations with automatic sync across all your devices.

🎀 Advanced Voice Integration

  • Speech-to-text for hands-free interaction
  • AI-powered text-to-speech using Azure Cognitive Services
  • Perfect for commuters, visually impaired users, and multitaskers

πŸ”„ True Cross-Platform Sync

Read a book on Android in the morning, continue on your iPad at lunch, finish on desktop at nightβ€”your progress, bookmarks, and notes follow you everywhere.

πŸ€– AI-Powered Intelligence

  • Content Generation: Auto-generated summaries and analysis
  • Smart Recommendations: Books tailored to your taste
  • Study Aids: Key points extraction, Q&A generation
  • Multi-provider AI: Google, HuggingFace, and Azure working together

πŸ“– Full EPUB Support

Professional e-book rendering with rich formatting, embedded fonts, images, and styling. No compromises on reading experience.

πŸ” Enterprise-Grade Security

  • JWT-based authentication
  • Email verification & 2FA ready
  • Secure password hashing
  • API key management for AI services

⚑ Quick Start

Prerequisites

Your development environment needs (select based on what you're developing):

For Backend (API):

βœ… Node.js 20+           
βœ… MongoDB 5+            (local or cloud instance)

For Android Client:

βœ… Android SDK 24+       
βœ… Gradle 8+             
βœ… Kotlin 1.9+           

For iOS Client:

βœ… Xcode 15+             (macOS only)
βœ… CocoaPods             (dependency manager)

For Admin Dashboard (Flutter):

βœ… Flutter SDK 3.20+     
βœ… Dart SDK 3.4+         

Optional:

βœ… Docker               (containerized deployment)
βœ… Git                  (version control)

Environment Setup

Before running the backend, configure environment variables:

# 1. Copy template to actual config
cp apps/api/.env.example apps/api/.env

# 2. Edit with your API keys
# Required variables:
#   - MONGODB_URL: MongoDB connection string
#   - JWT_SECRET: Authentication secret (min 32 chars)
#   - GOOGLE_AI_KEY: Google Generative AI key
#   - HUGGINGFACE_API_KEY: HuggingFace API key
#   - AZURE_*: Azure Cognitive Services keys
#   - MAIL_*: Email service configuration

nano apps/api/.env  # or open in your editor

Configuration Reference:

Installation

# 1. Clone repository
git clone https://github.com/aliammari1/readrealm.git
cd readrealm

# 2. Install backend dependencies
cd apps/api && npm ci && cd ../..

# 3. Install admin dashboard dependencies
cd apps/dashboard && flutter pub get && cd ../..

# 4. Configure backend environment (see Environment Setup above)
cp apps/api/.env.example apps/api/.env
# Edit apps/api/.env with your API keys

Run Applications

Layer App Command Purpose
Backend 🟒 API cd apps/api && npm run start:dev Core server on http://localhost:3000
Clients πŸ“± Android cd apps/android && ./gradlew installDebug Native Android reader app
Clients πŸ“± iOS Open apps/ios/Runner.xcworkspace in Xcode Native iOS reader app
Admin πŸ–₯️ Flutter Dashboard cd apps/dashboard && flutter run -d chrome Admin dashboard (Web/Desktop)

For Taskfile users (recommended):

task setup                # First-time setup (install all deps)
task api:dev             # Backend: Start API development server
task android:build       # Client: Build Android APK
task ios:build           # Client: Build iOS app
task dashboard:run       # Admin: Start Flutter dashboard
task test                # Backend: Run all tests

πŸ“‚ Project Structure

readrealm/
β”œβ”€β”€ apps/                          # Multi-tier Application Suite
β”‚   β”‚
β”‚   β”œβ”€β”€ api/                       # 🌍 BACKEND - Core API Server
β”‚   β”‚   └── Behind all client apps, serving Android, iOS, and Admin Dashboard
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   β”œβ”€β”€ auth/             # JWT authentication & guards
β”‚   β”‚   β”‚   β”œβ”€β”€ book/             # Book management, EPUB processing
β”‚   β”‚   β”‚   β”œβ”€β”€ chat/             # Socket.IO real-time chat
β”‚   β”‚   β”‚   β”œβ”€β”€ user/             # User profiles & management
β”‚   β”‚   β”‚   β”œβ”€β”€ verification/     # Email verification workflows
β”‚   β”‚   β”‚   β”œβ”€β”€ speech-realtime/  # Voice integration
β”‚   β”‚   β”‚   β”œβ”€β”€ guards/           # Auth guards & middleware
β”‚   β”‚   β”‚   β”œβ”€β”€ logger/           # Structured logging
β”‚   β”‚   β”‚   └── main.ts           # App entry point
β”‚   β”‚   β”œβ”€β”€ test/                 # E2E tests (Jest)
β”‚   β”‚   └── package.json
β”‚   β”‚
β”‚   β”œβ”€β”€ android/                   # πŸ“± CLIENT APP - Native Android
β”‚   β”‚   └── End-user reading application
β”‚   β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”‚   └── src/
β”‚   β”‚   β”‚       β”œβ”€β”€ androidTest/  # UI tests
β”‚   β”‚   β”‚       β”œβ”€β”€ main/
β”‚   β”‚   β”‚       β”‚   β”œβ”€β”€ kotlin/   # Kotlin + Compose source
β”‚   β”‚   β”‚       β”‚   └── res/      # Android resources
β”‚   β”‚   β”‚       └── test/         # Unit tests
β”‚   β”‚   β”œβ”€β”€ build.gradle.kts
β”‚   β”‚   β”œβ”€β”€ proguard-rules.pro    # Code obfuscation
β”‚   β”‚   └── gradle/
β”‚   β”‚
β”‚   β”œβ”€β”€ ios/                       # 🍎 CLIENT APP - Native iOS
β”‚   β”‚   └── End-user reading application
β”‚   β”‚   β”œβ”€β”€ Runner/               # Main app target
β”‚   β”‚   β”‚   └── Swift source files
β”‚   β”‚   └── RunnerTests/          # Unit tests
β”‚   β”‚
β”‚   └── dashboard/                 # πŸ–₯️ ADMIN DASHBOARD - Flutter
β”‚       └── Cross-platform admin interface (Web, Desktop, macOS)
β”‚       β”œβ”€β”€ lib/
β”‚       β”‚   β”œβ”€β”€ main.dart
β”‚       β”‚   β”œβ”€β”€ screens/          # Admin UI screens
β”‚       β”‚   β”œβ”€β”€ services/         # API integrations
β”‚       β”‚   β”œβ”€β”€ providers/        # State management
β”‚       β”‚   β”œβ”€β”€ models/           # Data models
β”‚       β”‚   β”œβ”€β”€ controllers/      # Business logic
β”‚       β”‚   └── constants.dart
β”‚       β”œβ”€β”€ android/              # Android build config
β”‚       β”œβ”€β”€ ios/                  # iOS build config
β”‚       β”œβ”€β”€ web/                  # Web build config
β”‚       β”œβ”€β”€ windows/              # Windows build config
β”‚       β”œβ”€β”€ macos/                # macOS build config
β”‚       └── pubspec.yaml
β”‚
β”œβ”€β”€ shared/                        # πŸ“¦ Shared Resources
β”‚   β”œβ”€β”€ api-spec/
β”‚   β”‚   └── openapi.yaml          # REST API specification (all apps use this)
β”‚   β”œβ”€β”€ config/                   # Shared configuration
β”‚   └── docs/                     # System documentation
β”‚
β”œβ”€β”€ scripts/                       # πŸ› οΈ Automation Scripts
β”œβ”€β”€ docker-compose.yaml            # Docker Compose configuration
β”œβ”€β”€ Taskfile.yml                   # Task automation
β”œβ”€β”€ README.md                      # This file
└── .gitignore

Application Roles

App Type Purpose Tech Users
API Backend Serves all clients, manages data & AI NestJS, MongoDB All clients
Android Client Native mobile reading app Kotlin + Jetpack Compose End users
iOS Client Native mobile reading app Swift End users
Dashboard Admin Management, analytics, moderation Flutter Administrators

Backend Module Responsibilities

Module Purpose Tech
auth User authentication & authorization JWT, bcrypt
book Book library & EPUB parsing Mongoose, pdf-lib
chat Real-time conversations Socket.IO, NestJS Gateways
user Profile management & preferences MongoDB, Mongoose
verification Email verification & OTP NodeMailer, Crypto
speech-realtime Voice processing FFmpeg, Azure Cognitive

πŸ“š Documentation

Document Purpose
Quick Start Guide 30-second setup to get running
API Docs REST API specification (OpenAPI/Swagger)
Configuration Reference All environment variables explained
System Design Architecture, patterns, and design decisions
Setup Guide Detailed environment configuration
Contributing Guide Code contribution guidelines & architecture

🀝 Contributing

We love contributions! To get started:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Submit a Pull Request

Development Guidelines

  • Follow the Code Style Guide
  • Write tests for new features
  • Update documentation as needed
  • Run linting & tests before submitting PR: task test && task lint

πŸ“„ License

ReadRealm is open-source software licensed under the UNLICENSED license. See LICENSE for details.


πŸ’¬ Get Involved


Made with ❀️ by the ReadRealm team

About

An intelligent, collaborative digital library platform with AI-powered insights, real-time chat, and cross-platform reading

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors