Skip to content

benaltair/point

Repository files navigation

Baha'i Qiblih Locator

A progressive web app (PWA) using modern web APIs and a bit of math to point to the Qiblih of the Baha'i Faith in Bahji. This is a quick personal project to fulfil a need since other apps have been working less reliably. Issues and PRs are welcome.

The app is built using Svelte Kit, a modern application framework powered by Svelte. The code was forked from this article by @gigantz.

Developing

Once you've cloned the repo installed dependencies with npm install (or pnpm install), start a development server:

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

Options --https and --host are already enabled by default in package.json since this app leverages secure context mobile-only browser APIs. As such, you'll likely need to open the locally hosted dev server on your phone to test the app.

With Svelte, VSCode offers the most complete developer experience, but you can use any IDE.

Building

Before creating a production version of your app, install an adapter for your target environment. Then:

npm run build

You can preview the built app with npm run preview. This should not be used to serve your app in production.

Deploying

This app is currently configured to use the Netlify Adapter but can be easily configured to another platform by choosing a different adapter and adjusting svelte.config.js as directed.