PersonaReads is a Chrome extension that provides personalized book recommendations based on your reading persona, tone, and themes — not just algorithms. It analyzes books you're interested in and suggests similar books with explanations of how they relate to your selection.
PersonaReads enhances your book discovery experience by:
- Analyzing books you're viewing in your browser
- Creating and evolving your reading persona based on your interests
- Providing personalized book recommendations with meaningful connections
- Offering detailed book information including descriptions and tags
The project consists of two main components:
The frontend is a Chrome extension built with Angular that uses the Chrome Side Panel API to display the user interface. It includes:
- Background Service Worker: Manages the extension state, detects book pages, and communicates with the backend
- Side Panel Angular App: Provides the user interface for authentication, book analysis, and recommendations
- Content Scripts: Extract book information from web pages
- Offscreen Document: Handles Firebase communication and DOM scraping
The backend is built with Firebase Cloud Functions and uses TypeScript. It includes:
- Cloud Functions: Process book analysis requests and generate recommendations
- Firestore Database: Stores user data, personas, and reading progression
- Firebase Authentication: Manages user authentication
The application integrates with:
- Qloo API: Provides book search and recommendation functionality
- Google AI (Gemini): Enhances recommendations and generates personalized insights
-
Frontend:
- Angular
- TypeScript
- Chrome Extension APIs
- Material Design components
-
Backend:
- Firebase (Functions, Firestore, Auth)
- TypeScript
- Genkit (for AI integration)
-
Build Tools:
- Webpack
- npm
- Node.js and npm
- Firebase CLI
- Google Chrome browser
- API keys for:
- Google AI (Gemini)
- Qloo API
- Firebase project
-
Navigate to the backend directory:
cd backend -
Install dependencies:
cd functions npm install -
Configure Firebase:
- Create a Firebase project at Firebase Console
- Update
.firebasercwith your project ID - Set up Firebase secrets for API keys:
firebase functions:secrets:set GOOGLE_GENAI_API_KEY firebase functions:secrets:set QLOO_API_KEY
-
Deploy Firebase functions:
firebase deploy --only functions
-
Navigate to the extension directory:
cd extension -
Install dependencies:
npm install cd src/sidepanel/app npm install -
Configure Firebase:
- Update
src/firebase.jswith your Firebase project configuration
- Update
-
Build the extension:
cd ../../../.. # Return to project root ./build.shAlternatively, you can run the build steps manually:
cd extension/src/sidepanel/app npm run build-prod cd ../../.. npm run release -
Load the extension in Chrome:
- Open Chrome and navigate to
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked" and select the
extension/distdirectory
- Open Chrome and navigate to
- Install the extension in Chrome
- Create an account or log in
- Navigate to a book page (e.g., on Amazon, Goodreads)
- Open the side panel by clicking the extension icon
- Click "Scan" to analyze the current book
- View personalized recommendations and book details
- Explore your reading persona in the persona section
PersonaReads/
├── backend/ # Firebase backend
│ ├── functions/ # Cloud Functions
│ │ ├── src/ # TypeScript source code
│ │ │ ├── index.ts # Main entry point
│ │ │ ├── types.ts # Type definitions
│ │ │ └── utilities/ # Helper functions
│ │ │ ├── api.ts # External API integration
│ │ │ ├── database.ts # Firestore operations
│ │ │ └── prompts.ts # AI prompts
│ ├── .firebaserc # Firebase project configuration
│ └── firebase.json # Firebase service configuration
│
├── extension/ # Chrome extension
│ ├── src/ # Source code
│ │ ├── background.js # Background service worker
│ │ ├── manifest.json # Extension manifest
│ │ ├── content/ # Content scripts
│ │ ├── images/ # Extension icons
│ │ ├── offscreen/ # Offscreen document
│ │ ├── sidepanel/ # Side panel Angular app
│ │ └── utilities/ # Helper functions
│ ├── dist/ # Built extension
│ └── webpack.config.js # Webpack configuration
│
└── build.sh # Build script