Skip to content

cmwen/read-forge-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

171 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ReadForge πŸ“š

A local-first AI-powered book creation and reading app. Create, manage, and read LLM-generated books with full data ownership and privacy.

✨ Features

  • πŸ“– AI-Powered Content: Generate book outlines, titles, and chapters using your favorite LLM (ChatGPT, Claude, etc.)
  • 🎨 Customizable Writing: Set your preferred writing style, tone, vocabulary level, and favorite author for AI-generated content
  • 🌍 Multi-Language Support: Full internationalization with 12 languages (English, Spanish, Chinese, French, German, Portuguese, Japanese, Korean, Arabic, Hindi, Russian)
  • πŸ“± Local-First: All data stored locally on your device - complete privacy and ownership
  • 🎯 Material Design 3: Beautiful, accessible UI with light, dark, and sepia reading themes
  • πŸ“š Library Management: Organize your AI-generated books in a clean, intuitive library
  • πŸ“– Rich Reader: Adjustable font sizes, multiple themes, and comfortable reading experience
  • πŸ”„ Export/Import: Export books as JSON for backup or sharing
  • πŸš€ Production Ready: Optimized build system with Java 17, parallel builds, and CI/CD

πŸš€ Quick Start

Prerequisites

  • Flutter SDK 3.10.1+
  • Dart 3.10.1+
  • Java 17+ (for Android)
  • Android device or emulator

Verify: flutter doctor -v && java -version

Setup

# Clone the repository
git clone https://github.com/cmwen/read-forge-app.git
cd read-forge-app

# Get dependencies
flutter pub get

# Run the app
flutter run

🎯 How to Use

1. Create a Book

  • Tap the + button in your library
  • Fill in at least one field:
    • Book Title (Optional): Enter a title or leave empty for AI generation
    • Description (Optional): Describe what the book is about
    • Purpose/Learning Goal (Optional): What you want to learn from this book
  • If you don't provide a title, the app can generate one using AI based on your description or purpose
  • Your new book is created!

2. Generate Table of Contents

  • Open your book
  • Tap Generate TOC
  • Copy the prompt or share it with your AI assistant (ChatGPT, Claude, etc.)
  • Paste the AI's response back into ReadForge
  • Supports both JSON and plain text formats

3. Generate Chapter Content

  • Tap any chapter in your book
  • Tap Generate Content
  • Share the prompt with your AI assistant
  • Paste the generated content back
  • Start reading!

4. Customize Writing Preferences

  • Go to Settings from the library
  • Set your preferred:
    • Writing Style (Creative, Balanced, Precise)
    • Language
    • Tone (Casual, Neutral, Formal)
    • Vocabulary Level (Simple, Moderate, Advanced)
    • Favorite Author (for style inspiration)
  • These preferences are automatically included in all AI prompts!

5. Customize Reading Experience

  • While reading, tap the text settings icon
  • Adjust font size, theme (Light/Dark/Sepia), and font family
  • Your preferences are saved automatically

πŸ’‘ Tips for Best Results

Writing Better Prompts

  • Be specific about the genre and style you want
  • Provide context in your book description
  • Use the writing preferences to guide the AI's output
  • Include character descriptions or plot outlines in the book description

Supported LLM Response Formats

ReadForge accepts responses in multiple formats:

JSON Format (Recommended):

{
  "type": "toc",
  "bookTitle": "Your Book Title",
  "chapters": [
    {"number": 1, "title": "Chapter One", "summary": "Brief summary"},
    {"number": 2, "title": "Chapter Two", "summary": "Brief summary"}
  ]
}

Plain Text Format (Also Supported):

1. Chapter Title - Brief summary
2. Another Chapter - Its summary
3. Third Chapter - Summary here

For chapter content, any plain text response will work!

Fault-Tolerant Import

  • The app is designed to be forgiving with response formats
  • If parsing fails, you'll see a clear error message with details
  • Plain text content is always accepted for chapters
  • You can always try again if something goes wrong

πŸ”§ Building

# Debug APK
flutter build apk --debug

# Release APK
flutter build apk --release

# App Bundle (for Play Store)
flutter build appbundle --release

πŸ—οΈ Architecture

  • State Management: Riverpod for reactive state management
  • Database: Drift (SQLite) for local-first data storage
  • UI: Material Design 3 with custom theming
  • Structure: Feature-based architecture with clean separation of concerns

Project Structure

lib/
β”œβ”€β”€ core/              # Core services and domain models
β”‚   β”œβ”€β”€ services/      # LLM integration, storage
β”‚   β”œβ”€β”€ domain/        # Data models
β”‚   └── data/          # Database definitions
β”œβ”€β”€ features/          # Feature modules
β”‚   β”œβ”€β”€ library/       # Book library
β”‚   β”œβ”€β”€ book/          # Book details and TOC
β”‚   β”œβ”€β”€ reader/        # Reading experience
β”‚   └── settings/      # App settings
└── main.dart          # App entry point

πŸ” Privacy & Data

  • 100% Local: All data stored locally on your device using SQLite
  • No Cloud: No data sent to external servers
  • No Tracking: No analytics or tracking
  • Full Control: Export your books anytime as JSON
  • Offline First: Works completely offline after initial AI content generation

πŸ› Troubleshooting

Import Issues

  • "Empty input": Make sure you've copied the AI's response
  • "Clipboard placeholder": You've pasted the placeholder text, not the actual response
  • "Unable to parse": For TOC, use the numbered list format. For chapters, any plain text works!

Build Issues

  • Run flutter clean && flutter pub get to reset dependencies
  • Make sure you have Java 17+ installed
  • Check flutter doctor -v for any issues

πŸ“Š Recent Improvements

Latest Version

  • ✨ Enhanced Book Creation: Optional fields for title, description, and learning purpose
  • πŸ€– AI Title Generation: Let AI generate book titles based on your description or purpose
  • 🌍 Full Internationalization: Support for 12 languages including English, Spanish, Chinese (Simplified & Traditional), French, German, Portuguese, Japanese, Korean, Arabic, Hindi, and Russian
  • πŸ“Š Purpose Tracking: Track learning goals for each book
  • πŸ”§ Improved Database: Added purpose field and AI-generated title tracking

Version 0.1.0+1

  • ✨ User preferences now included in all AI prompts
  • πŸ”§ Fixed error detail dialog display issues
  • πŸ“– Dynamic version display from build configuration
  • πŸ›‘οΈ More fault-tolerant LLM response import
  • πŸ“ Improved error messages and user guidance
  • πŸ“š Updated README with comprehensive usage guide

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“„ License

MIT License - see LICENSE

πŸ”— Resources

πŸ“± Screenshots

Coming soon - screenshots of the library, reader, and settings screens

⭐ Star This Project

If you find ReadForge useful, please give it a star! It helps others discover the project.

License

MIT License - see LICENSE

About

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors