How dsatriia/muslimboard works
1. Overall shape
Muslim Board is a multi-surface product with three main runtime pieces: a browser extension UI, a Go backend webservice, and a marketing website. The repo also contains a macOS Safari Web Extension app for App Store distribution. The main architectural split is between static client-side presentation and a server-side API that aggregates external data.
2. Browser extension as the primary product
The extension/ folder is the core application. It is a mostly static front end built from HTML, CSS, and JavaScript, with no obvious framework layer in the tree. The extension uses:
- extension/index.html and extension/assets/internal/scripts/app.js as the application shell and main behavior entrypoint
- constant.js, utility.js, and i18n.js for shared logic, helpers, and localization
- bundled third-party libraries for UI behavior and polish, including jQuery, Moment, SweetAlert2, Toast, Tooltipster, Draggable, Normalize, and Font Awesome
3. Extension data model
The extension’s content is driven by static JSON assets under extension/data/. These include:
- data-content-*.json for localized dashboard content
- data-location-id.json for location mapping
- data-background.json for background configuration
This suggests the extension renders a personalized dashboard using a mix of local data packs and runtime-provided data.
4. Localization boundary
Localization is a first-class concern. The repository supports multiple languages, and the extension includes language-specific content files plus an internal i18n script. The supported languages listed in the README are English, Bahasa Indonesia, Russian, Arabic, Traditional Chinese, Simplified Chinese, Hindi, and Bengali. The architecture likely separates UI chrome/translations from content data, so language changes do not require server changes.
5. Backend API as aggregation layer
The webservice/ directory is a Go service that acts as the integration and data-aggregation layer. It follows a layered structure:
- router/ for HTTP route wiring
- controller/ for request handlers
- usecase/ for business logic
- repositories/ for provider-specific integrations
- pkg/ for shared infrastructure concerns
This is the main boundary between the client and external APIs.
6. External data providers
The backend integrates multiple third-party sources via repositories:
- repositories/go-prayer for prayer-time calculations or API wrapping
- repositories/aladhan for prayer-time/location-related data
- repositories/openstreetmap for geocoding or location lookup
- repositories/unsplash for imagery/backgrounds
This indicates the backend is not just a CRUD API; it is a federation layer that combines geospatial, prayer time, and visual content services.
7. Operational concerns in the backend
The Go service includes infrastructure packages for:
- pkg/http for HTTP server concerns
- pkg/redis for caching or shared state
- pkg/logger for structured logging
- pkg/sentry for error reporting
This implies the backend is designed for runtime reliability and observability, and Redis likely sits in the request path for caching external lookups or computed results.
8. Data flow between client and backend
The likely request path is: extension UI → Go API → third-party providers/cache → response back to extension. The extension keeps presentation logic local, while the backend centralizes network calls, provider normalization, and any caching/error tracking. This reduces client complexity and lets the product support multiple browsers and locales with a shared service layer.
9. Safari/macOS packaging
The macos/ directory is a separate Xcode project for a Safari Web Extension. It contains:
- a native macOS app shell
- a Safari WebExtension handler
- extension manifest resources
This is not a separate product logic stack; it is a packaging and distribution wrapper around the same web-extension style code, used for App Store submission and Safari compatibility.
10. Marketing site
The website/ directory contains the public landing page assets. It appears to be a separate static site with its own CSS/JS bundles and image assets, including a slider library (slippry). It is architecturally distinct from the product runtime: its role is acquisition, documentation, and promotion rather than dashboard functionality.
11. Shared assets and resources
The resources/ folder holds reusable media and guide materials, while some assets are shared across extension and website surfaces. This suggests the repo treats branding and visual content as a common asset set, with each surface consuming what it needs rather than duplicating media pipelines.
12. Build/deployment surface
The repository includes packaging artifacts for browser stores and app distribution: extension/manifest.json plus per-browser manifests, GitHub Actions for code scanning, and store-specific documentation (WEBSTORE.md). The architecture therefore spans multiple deployment targets: Chrome/Edge/Firefox extension stores, Safari App Store, and a public website, all fed from the same source repository.
Main entry points: app.js App logic · index.html Extension shell · usecase.go Use cases · main.js Landing site
Components 15
Extension
Browser extension runtime and bundled client assets.
- Extension shell · Main browser-extension entrypoint and UI container.
extension/index.html - App logic · Primary extension behavior and UI orchestration.
extension/assets/internal/scripts/app.js - Core scripts · Shared constants, utilities, and localization logic.
extension/assets/internal/scripts/constant.js - Data packs · Localized content, location mapping, and background configuration.
extension/data/data-content-en.json - UI libraries · Bundled browser-side dependencies for interaction and presentation.
extension/assets/3rd-parties/jquery
Webservice
Go API that aggregates external data and serves clients.
- Router · HTTP route wiring for the backend service.
webservice/router/router.go - Controllers · Entry handlers that adapt HTTP requests into use cases.
webservice/controller/controller.go - Use cases · Core backend orchestration and domain rules.
webservice/usecase/usecase.go - Provider adapters · External data providers for prayer times, geocoding, and imagery.
webservice/repositories/aladhan/aladhan.go - Ops stack · Shared runtime services for HTTP, cache, logging, and error tracking.
webservice/pkg/http/http.go
macOS
Safari Web Extension packaging and native shell.
- Safari package · macOS Safari Web Extension app and manifest packaging.
macos/Muslim Board Extension/manifest.json - Native shell · Xcode app container and WebExtension host.
macos/Muslim Board/AppDelegate.swift
Website
Public marketing site and static assets.
- Landing site · Public marketing and informational website.
website/assets/ext/main.js - Site assets · Website CSS, JS, and slider assets.
website/assets/base/base.css
Shared
Repository-wide resources and branding assets.
- Brand assets · Reusable repository-wide media and guide materials.
resources/logo.psb
Connections 15
- Extension shell → App logic: boots · The extension shell loads the main client script.
- App logic → Core scripts: uses · UI logic depends on shared constants, utilities, and localization.
- App logic → Data packs: renders · Dashboard content and settings come from static data packs.
- App logic → UI libraries: depends on · Client behavior relies on bundled third-party libraries.
- App logic → Router: requests · The extension calls the backend API for aggregated data.
- Router → Controllers: dispatches to · Routes forward requests to HTTP handlers.
- Controllers → Use cases: delegates · Controllers pass application work into use cases.
- Use cases → Provider adapters: integrates · Use cases fetch and normalize data from external providers.
- Use cases → Ops stack: uses · Business logic relies on HTTP, cache, logging, and error-reporting infrastructure.
- Provider adapters → Ops stack: cached/observed by · Provider calls are supported by shared runtime infrastructure.
- Native shell → Safari package: hosts · The native macOS app contains the Safari Web Extension bundle.
- Safari package → Extension shell: packages · Safari distribution reuses the same web-extension surface.
- Landing site → Site assets: uses · The marketing site is built from its own static asset set.
- Landing site → Brand assets: consumes · Public-facing pages reuse shared branding and media assets.
- Extension shell → Brand assets: consumes · The extension can draw from shared repository assets.