React/Vite application for reading and exploring the Tanakh. This application is built to provide a seamless experience for users to browse sections, books, chapters, and verses, with advanced features like search, bookmarking, and user authentication.
- Features
- Technologies Used
- Installation
- Usage
- Firebase Authentication Setup
- Accessibility
- Project Structure
- Scripts
- Tests
- Acknowledgements
-
📖 Browse sections, books, chapters, and verses.
-
🔍 Full-text search with highlights.
-
💬 Add and view comments for each verse.
-
📑 Bookmark and navigate to the last-read chapter.
-
📱 Responsive design for mobile and desktop.
-
🌐 Progressive Web App (PWA) support.
-
⚡ Built with modern React and Vite for fast performance.
-
🔐 User authentication with email/password, Google, and Facebook.
-
🗓️ Calendar page with three tabs:
- Gregorian calendar
- Jewish calendar
- Shabbat overview
-
🔁 Synchronized Gregorian and Jewish calendars
-
🎉 Displays Jewish holidays from Hebcal API
-
🕯️ Shabbat tab shows candle lighting and havdalah times for the selected month
-
💾 Optimized with smart caching (SWR) to reduce redundant requests
- React: Frontend library for building user interfaces.
- Vite: Fast build tool for modern web development.
- Firebase Authentication: Secure user authentication.
- Firestore: NoSQL database for storing comments and user data.
- TailwindCSS: Utility-first CSS framework for styling.
- Zustand: Lightweight state management.
- Radix UI: Accessible and customizable UI components.
- Zod: Schema validation for forms.
- Lucide React: Icon library.
- TypeScript: For type safety.
- Vite PWA Plugin: Adds PWA capabilities.
-
Clone the repository:
git clone https://github.com/etopritika/Tanakh.git cd Tanakh -
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open the application in your browser at
http://localhost:5173. -
Explore sections like Torah, Neviim, and Ketuvim.
-
Search for specific verses or chapters.
-
Bookmark chapters for easy navigation.
-
Register and sign in to save your bookmarks and personal preferences.
-
Add comments to verses.
-
Navigate to the Calendar page to explore:
- Jewish and Gregorian calendars in sync
- Holidays highlighted in both systems
- Shabbat times with smart caching logic for optimal performance
To enable authentication, you need to configure Firebase for your project.
-
Create a Firebase project in the Firebase Console.
-
Enable authentication providers (Email/Password, Google, Facebook, etc.) in the Authentication section of your Firebase project.
-
Add environment variables:
-
In the root directory of your project, create a
.envfile with the following variables:VITE_BASE_URL=your_base_url VITE_FIREBASE_API_KEY=your_firebase_api_key VITE_FIREBASE_AUTH_DOMAIN=your_firebase_auth_domain VITE_FIREBASE_PROJECT_ID=your_firebase_project_id VITE_FIREBASE_STORAGE_BUCKET=your_firebase_storage_bucket VITE_FIREBASE_MESSAGING_SENDER_ID=your_firebase_messaging_sender_id VITE_FIREBASE_APP_ID=your_firebase_app_id VITE_FIREBASE_MEASUREMENT_ID=your_firebase_measurement_id
-
-
Configure OAuth providers like Google and Facebook:
- For Google, enable the Google provider in Firebase and configure the consent screen in the Google Cloud Console.
- For Facebook, set up an app in Facebook Developers, configure the app to use OAuth, and add your app's App ID and App Secret to Firebase.
This application has been carefully enhanced to support full accessibility, providing an inclusive experience for all users, including those relying on screen readers, keyboard navigation, and assistive technologies.
-
✅ Modals use proper ARIA roles and focus traps:
role="dialog",aria-modal="true",aria-labelledby,aria-describedby.- Focus is trapped within the modal and returns upon close.
- Escape key and backdrop click close the modal reliably.
-
✅ Form accessibility:
- All input fields are properly labeled and described.
- Validation messages use
role="alert"and are linked to fields viaaria-describedby. aria-busyandaria-describedbyare applied where appropriate for real-time status and instructions.
-
✅ Loading indicators:
- Spinners are hidden from screen readers with
aria-hidden. - Submission states use
aria-busy, and visible status messages are optionally added.
- Spinners are hidden from screen readers with
-
✅ Interactive elements:
- All buttons and icons (including tooltips) use
aria-labelwhere necessary. - Comment action buttons are associated with their corresponding content via
aria-labelledby.
- All buttons and icons (including tooltips) use
-
✅ Keyboard support:
- Tab/Shift+Tab loops are managed in menus and modals for smooth navigation.
- Menus are fully focusable and close with Escape.
-
✅ External links:
- Screen readers are informed when a link opens in a new tab or leads to an external site.
-
✅ Visually hidden instructions:
- Context and guidance are provided via
sr-onlytext for screen readers.
- Context and guidance are provided via
This work adheres to WCAG 2.1 AA and WAI-ARIA best practices.
src/
├── components/ # Reusable React components
├── data/ # Static data for books and chapters
├── hooks/ # Custom React hooks
├── lib/ # Helper functions and utilities
├── pages/ # Application pages
├── store/ # State management (Zustand)
├── index.css # Global styles
├── App.tsx # Root component
└── main.tsx # Application entry point
npm run dev: Start the development server.npm run build: Build the application for production.npm run preview: Preview the production build.npm run lint: Run ESLint to check for code issues.npm run test: Run unit tests with Jest.
We use Jest and ts-jest for unit testing.
npm run testnpm run test -- <file-name>
# example:
npm run test -- translateAll tests related to calendar logic are located in:
src/components/Calendar/utils/calendar-utils/__tests__/
- Radix UI for accessible components.
- Lucide React for icons.
- Zustand for state management simplicity.
- Hebcal API for Jewish calendar and holiday data.
- WCAG / ARIA standards that guided accessibility improvements.