A modern web-based reader for EPUB and PDF files built with Next.js and Firebase.
- 📖 Read PDF and EPUB files in your browser
- 🔐 Google Authentication with Firebase
- ☁️ Cloud storage for your books
- 📊 Automatic reading progress tracking
- 🎨 Modern, responsive UI with dark mode support
- 📤 Upload progress indicator
- Node.js 18+ installed
- A Firebase project (free tier works fine)
git clone <your-repo-url>
cd web-readernpm install- Go to Firebase Console
- Create a new project (or use an existing one)
- Enable Authentication > Google Sign-In
- Enable Firestore Database (start in test mode for development)
- Enable Storage (start in test mode for development)
- Go to Project Settings > General > Your apps > Web app
- Copy your Firebase configuration
cp .env.example .env.localEdit .env.local and add your Firebase credentials:
NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.firebasestorage.app
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_idIn Firebase Console, go to Storage > Rules and update them:
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /books/{userId}/{fileName} {
allow read: if true; // Public read access
allow write: if request.auth != null && request.auth.uid == userId;
}
}
}
In Firebase Console, go to Firestore Database > Rules:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /books/{bookId} {
allow read: if true;
allow write: if request.auth != null;
}
}
}
npm run devOpen http://localhost:3000 with your browser.
- Login: Click "Sign in with Google" on the login page
- Upload: Click "Upload Book" and select a PDF or EPUB file
- Read: Click on any book in your library to start reading
- Progress: Your reading position is automatically saved
- Framework: Next.js 16 (App Router)
- Authentication: Firebase Auth
- Database: Firestore
- Storage: Firebase Storage
- PDF Viewer: react-pdf
- EPUB Viewer: react-reader
- Styling: Tailwind CSS
- Icons: Lucide React
MIT
Contributions are welcome! Feel free to open an issue or submit a pull request.