Royal Lens is your AI-powered companion for exploring Royal Road novels with intelligent summaries, review analysis, chapter previews, and comparisons.
Search by novel ID or URL, or browse Latest, Popular, Best Rated, and New Releases with a modern, privacy-friendly interface.
- Search by ID/URL: Enter a numeric ID (e.g.,
21220) or a Royal Road URL. - Browse feeds: Latest, Popular, Best Rated, and New Releases.
- AI Novel Summary: Get quick novel summaries from metadata and comments
- AI Review Analysis: See recent reader sentiment and highlights
- First 3 Chapters Preview: Read spoiler-light excerpts with AI analysis
- AI Author Analysis: View author overviews from public stats
- Compare Two Novels: Compare side-by-side stats and AI insights
- Favorites: Save novels to build your own feed
- Read the app's Terms & Ethics: https://rlens.vercel.app/about/terms
- Royal Lens is an independent project and is not affiliated with Royal Road.
- Framework: Next.js 15 (App Router)
- UI: React 19, Tailwind CSS v4
- Data:
@fsoc/royalroadl-api - AI: Google Gemini 2.0 Flash (via REST API)
- Analytics: Umami (privacy-friendly)
- Deployment: Vercel
- Node.js 20+ recommended
- Google AI Studio API key for Gemini
Create a .env.local file in the project root:
# Required for AI features (analyze novel/author/chapters)
GEMINI_KEY=your_google_gemini_api_keyWithout GEMINI_KEY, general browsing works, but AI summaries will return an error/placeholder.
# Install deps
npm install
# Start dev server
npm run dev
# Type-check and build for production
npm run build
# Start production server (after build)
npm start
# Lint
npm run lint-
Install dependencies:
npm install -
Set environment:
- Add
GEMINI_KEYin.env.local
- Start dev server:
npm run devand open http://localhost:3000
src/
├── app/ # Next.js App Router
│ ├── about/ # About pages with sidebar navigation
│ │ ├── general/ # Main about content
│ │ ├── terms/ # Terms & Ethics
│ │ ├── privacy/ # Privacy policy
│ │ ├── mascot/ # Mascot (Lumen)
│ │ └── contribution/ # Contribution guidelines
│ ├── api/ # API routes
│ │ ├── analyze-* # AI analysis endpoints
│ │ ├── chapters/ # Chapter preview endpoint
│ │ ├── compare/ # Novel comparison endpoint
│ │ └── royalroad/ # Main Royal Road data endpoint
│ ├── updates/ # Release notes page
│ └── globals.css # Global styles
├── components/ # Reusable React components
│ ├── AnalysisModal.tsx # AI summaries and analyses
│ ├── FictionCard.tsx # Novel display card
│ ├── CompareModal.tsx # Compare two novels
│ ├── Sidebar.tsx # Main navigation
│ └── ...
├── data/ # Static data
│ └── releases.ts # Release notes data
└── lib/ # Utilities
└── lru.ts # LRU cache implementation
POST /api/royalroad— Fetch novels by filter or single ID/URLPOST /api/full-fiction— Get detailed novel informationPOST /api/chapters— Retrieve first 1-3 chapter previewsPOST /api/analyze-chapters— AI analysis of chapters (requiresGEMINI_KEY)POST /api/analyze-novel— AI novel summary (requiresGEMINI_KEY)POST /api/analyze-author— AI author analysis (requiresGEMINI_KEY)POST /api/analyze-reviews— AI review sentiment analysis (requiresGEMINI_KEY)POST /api/reviews— Fetch recent reviewsPOST /api/compare— Compare two novels with AI insights
All routes use @fsoc/royalroadl-api for Royal Road data. AI features require Google Gemini API key.
- Search by fiction ID (e.g.,
21220) or full URL - Browse Latest, Popular, Best Rated, and New Releases
- Pagination support for all feed views
- Novel Summaries: High-level overviews using metadata and community feedback
- Review Sentiment: Analyzes recent reader reviews with sentiment scoring
- Chapter Previews: First 3 chapters with optional AI analysis
- Author Profiles: AI-generated author analysis based on public stats
- Side-by-side novel comparisons with AI insights
- Favorites system for personal reading lists
- No personal data collection
- Privacy-friendly analytics via Umami
- Client-side favorites storage
Royal Lens is an independent project and is not affiliated with Royal Road. It links back to original Royal Road pages and shows only brief excerpts and metadata to help readers discover content.
- Uses only public pages; no login‑required content is accessed.
- Fetches are rate‑limited and cached to minimize requests.
- If any author or RR staff has concerns, please open an issue and we will adjust or remove content promptly.
Contributions are welcome! Please check the contribution guidelines for more information.
- Royal Road data powered by royalroad-api
- Built by nonvar
This project is open source under the MIT License — see LICENSE.

