A lightweight, interactive Bible reading application built with Astro, Alpine.js, and Tailwind CSS. This app allows users to read various Bible translations, navigate through books and chapters, and create personal highlights with notes.
- Multi-Translation Support: Access a wide range of Bible translations, grouped by language and sorted alphabetically.
- Navigation: Easy-to-use selectors for Translation, Book, and Chapter.
- Highlighting System:
- Select text to create highlights.
- Choose from custom highlight colors.
- Add personal notes to highlights.
- Highlights are persistent (saved to your browser's local storage).
- Highlight Management:
- View all highlights in a dedicated sidebar.
- Click a highlight to instantly navigate to that verse.
- Edit colors and notes or delete highlights.
- Responsive Design: Optimized for both desktop (pinned sidebar) and mobile (collapsible menu) experiences.
- State Persistence: Your last read location (Translation, Book, Chapter) is saved and restored automatically.
- Astro: The web framework for building content-driven websites.
- Alpine.js: For handling client-side state, interactivity, and the highlighting logic.
- Tailwind CSS: For utility-first styling (v4).
- TypeScript: For type safety across the application.
This project uses the HelloAo Bible API (bible.helloao.org) to fetch:
- Available translations (
/api/available_translations.json) - Books for a specific version (
/api/{versionId}/books.json) - Chapter content (
/api/{versionId}/{bookId}/{chapter}.json)
- Node.js installed on your machine.
npm(Node Package Manager).
-
Clone the repository:
git clone <repository-url> cd bible.penderis
-
Install dependencies:
npm install
Start the local development server:
npm run devVisit http://localhost:4321 in your browser.
To build the static site for deployment:
npm run buildThe output will be in the dist/ directory.
/
├── src/
│ ├── js/
│ │ └── app.ts # Core application logic (Alpine.js component)
│ ├── pages/
│ │ └── index.astro # Main application entry and markup
│ ├── styles/
│ │ └── global.css # Global styles (including Tailwind directives)
│ └── types/ # TypeScript interfaces for API and State
└── package.json
The application uses localStorage for data persistence:
bibleAppState: Stores the current view (Version, Book, Chapter).bibleAppHighlights: Stores an array of user highlights and notes.isDataProtected: A robust guard system inapp.tsprevents accidental highlight deletion during selection events.