Skip to content

Latest commit

 

History

174 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Comic Reader

A full-stack comic reading platform with an Android mobile app, Spring Boot backend, and AI-powered OCR/TTS workers. Supports content ingestion via automated crawling, manual upload, and AI-assisted translation pipelines.

Architecture

┌─────────────────────────────────────────────────────────────┐
│                        Mobile (Android)                      │
│  Java 11 · MVVM · ViewBinding · Navigation Component         │
│  Retrofit2 · Glide · Room · AdMob · Firebase · LeakCanary    │
└─────────────────────────┬───────────────────────────────────┘
                          │ REST (JSON)
                          ▼
┌─────────────────────────────────────────────────────────────┐
│                    Backend (Spring Boot 3.3)                  │
│  Java 21 · Spring Security + JWT · Spring Data JPA           │
│  PostgreSQL · Flyway · Lombok · Google OAuth · FCM           │
└──────────┬──────────────────────────────────┬────────────────┘
           │                                  │
           ▼                                  ▼
┌─────────────────────┐        ┌──────────────────────────────┐
│  comic-translate-   │        │   piper-tts-worker           │
│  worker (Python)    │        │   (Python)                   │
│  FastAPI · ONNX     │        │   FastAPI · Piper TTS        │
│  RT-DETR · MangaOCR │        │   Multi-language voice       │
│  PPOCRv5            │        └──────────────────────────────┘
└─────────────────────┘

Repository Structure

Directory Description
mobile/ Android app (Java, XML layouts, Gradle)
backend/ Spring Boot REST API server
backend/worker/comic-translate-worker/ Python OCR worker for image text extraction
backend/worker/piper-tts-worker/ Python TTS worker for audio narration
docs/ Documentation and reports

Features

Reader Experience

  • Vertical-scroll chapter reader with pinch-to-zoom
  • Page translation (AI-powered OCR + inpainting pipeline)
  • Text-to-speech narration with multi-language voices
  • Reading history and progress syncing
  • Chapter comments and social sharing

Library & Discovery

  • Browse comics by category, search, and ranking
  • Personal library with followed comics and reading history
  • AI-powered comic discovery and recommendations
  • Scheduled content sync from OTruyen source

User System

  • Email/password and Google OAuth authentication
  • JWT-based session management with secure token storage
  • Role-based access (User, Creator, Admin)
  • Onboarding flow with interest selection

Monetization

  • Virtual wallet with coin-based transactions
  • Chapter purchase and premium chapter gating
  • VIP subscription tiers
  • AdMob integration (banner, rewarded, entry ads)
  • Ad-based free chapter access

Admin & Creator Tools

  • Admin dashboard with revenue analytics
  • Top-up package management
  • User management and content moderation
  • Creator studio for uploading original comics
  • Comment management and reporting system

AI Capabilities

  • AI-generated comic summaries
  • AI chat assistant for recommendations
  • AI-powered comic discovery
  • AI sticker generation (premium)
  • OCR pipeline for comic page translation
  • TTS pipeline for narrated chapter playback

Notification & Engagement

  • Push notifications via Firebase Cloud Messaging
  • Email notifications (password reset, etc.)
  • Notification preferences per user
  • Weekly scheduled new-content alerts

Tech Stack

Backend

  • Framework: Spring Boot 3.3.5, Java 21
  • Security: Spring Security, JWT (jjwt 0.12), Google OAuth
  • Database: PostgreSQL 16 with Flyway migrations
  • ORM: Spring Data JPA + Hibernate
  • Validation: Jakarta Validation (@Valid)
  • Storage: Local filesystem uploads (/app/uploads)
  • Email: Spring Mail
  • Firebase: Admin SDK for FCM push notifications
  • Async: @EnableAsync + @EnableScheduling for background jobs

Mobile

  • Language: Java 11
  • Architecture: MVVM with single-Activity Navigation Component (Safe Args)
  • UI: Material 3, XML layouts, ViewBinding, ConstraintLayout
  • Networking: Retrofit 2.11 + OkHttp 4.12 + Gson
  • Image Loading: Glide 4.16
  • Local Storage: Room 2.6.1
  • Ads: Google AdMob 24.4
  • Auth: Google Play Services Auth
  • Firebase: Analytics, Cloud Messaging
  • DI: Manual constructor injection via ViewModel factories
  • Tools: LeakCanary 2.14, WorkManager 2.9

Workers (Python)

  • OCR Worker: FastAPI, RT-DETR v2 ONNX (bubble detection), Manga OCR ONNX (Japanese), PPOCRv5 ONNX (other languages)
  • TTS Worker: FastAPI, Piper TTS (Vietnamese, English, Japanese, Korean voices)

DevOps

  • Containerization: Docker Compose with multi-profile support
  • Build: Maven (backend), Gradle with AGP 8.13.2 (mobile)

Quick Start

Backend (Docker)

cd backend
cp .env.example .env
docker compose up --build

Backend (Local)

cd backend
cp .env.example .env
# Ensure PostgreSQL is running with database 'comic_reader'
./mvnw spring-boot:run

Mobile

cd mobile
cp .env.example .env  # configure MOBILE_BASE_URL
./gradlew assembleDebug
# APK at mobile/app/build/outputs/apk/debug/

With AI Workers

cd backend
TRANSLATION_WORKER_ENABLED=true docker compose --profile ocr up --build
# or with TTS
TRANSLATION_WORKER_ENABLED=true TTS_WORKER_ENABLED=true docker compose --profile ocr --profile tts up --build

Default Accounts

Role Email Password
Admin admin@comicreader.dev admin123
User user@comicreader.dev user123

License

This project is developed for educational purposes as part of a university capstone.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages