AI-powered reading companion that provides real-time plot summaries, character analysis, and relationship mapping to enhance your literary experience.
LitGuide is a React Native mobile application that transforms traditional book reading into an interactive, AI-enhanced experience. Built with Google's Gemini AI, it provides intelligent insights and analysis as you read, making complex literature more accessible and engaging.
- Paginated book display with smooth navigation
- Chapter-based navigation with quick jump functionality
- Text selection and highlighting capabilities
- Clean, distraction-free reading interface
- Plot Summaries: Real-time spoiler-free plot summaries based on your current reading position
- Chapter Summaries: Detailed chapter-by-chapter breakdowns
- Character Analysis: Individual character summaries and development tracking
- Relationship Mapping: Visual relationship graphs showing character connections
- Language Conversion: Convert selected text to modern, standard English
- Context-Aware Processing: AI analyzes text based on your current reading position
- Spoiler-Free Content: All AI responses are designed to avoid spoilers
- Native iOS and Android support via React Native
- Intuitive touch-based navigation
- Collapsible content sections for organized information display
- Responsive design optimized for mobile reading
- Navigation: React Navigation for seamless screen transitions
- UI Components: Custom modals, collapsible sections, and pagination
- State Management: React hooks for local state management
- File System: React Native FS for local book file handling
- AI Integration: Google Gemini AI for content analysis
- Database: PostgreSQL with Google Cloud SQL for chapter summaries
- API Endpoints: RESTful API for all AI-powered features
- Graph Visualization: Graphviz for relationship diagram generation
@google/generative-ai- Google Gemini AI integrationreact-native-pager-view- Smooth page navigation@ronradtke/react-native-markdown-display- Rich text rendering@hpcc-js/wasm/graphviz- Relationship graph generationpg- PostgreSQL database connectivity
- Node.js (v16 or higher)
- React Native development environment
- iOS Simulator or Android Emulator
- Google Cloud Platform account (for AI services)
-
Clone the repository
git clone <repository-url> cd InteractiveReader
-
Install dependencies
npm install cd ios && pod install && cd ..
-
Backend Setup
cd backend npm install cp .env.example .env # Configure your Google AI API key and database credentials
-
Run the application
npx expo run:ios # or npx expo run:android
POST /generatePlotSummary- Generate plot summary for current reading positionPOST /generateChapterSummary- Generate chapter-specific summaryPOST /generateCharacterList- Extract characters from current textPOST /getCharacterSummary- Get detailed character analysisPOST /getRelationshipGraph- Generate character relationship visualizationPOST /convertToEnglish- Convert selected text to modern English
InteractiveReader/
βββ App.js # Main application entry point
βββ AppNavigator.js # Navigation configuration
βββ ReadingScreen.js # Main reading interface
βββ AIScreen.js # AI analysis display
βββ ChapterModal.js # Chapter navigation modal
βββ ConvertedModal.js # Text conversion modal
βββ backend/ # Node.js backend server
β βββ app.js # Express server and API routes
β βββ const/ # Constants and sample data
β βββ book.txt # Source book file
βββ assets/ # Static assets and configuration
βββ chapters.json # Chapter line number mapping
βββ icon.png # App icon
Create a .env file in the backend directory:
API_KEY=your_google_ai_api_key
DB_USER=your_database_user
DB_PASS=your_database_password
DB_NAME=your_database_name
INSTANCE_CONNECTION_NAME=your_cloud_sql_instance
- Place your book text file in
backend/book.txt - Update
assets/chapters.jsonwith chapter line number mappings - Modify chapter detection logic in backend if needed
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Gemini AI for powerful language processing capabilities
- React Native community for excellent mobile development tools
- Graphviz for relationship visualization
- The open-source community for various dependencies
Built with β€οΈ for literature enthusiasts and AI technology