Skip to content

A Progressive Web Application (PWA) that calculates your distance from the Kaaba in Mecca. This application provides users with their real-time distance from Islam's holiest site.

Notifications You must be signed in to change notification settings

getrahhal/QiblaFinderPWA

Repository files navigation

Distance to Kaaba PWA

A Progressive Web Application (PWA) that calculates your distance from the Kaaba in Mecca. This application provides users with their real-time distance from Islam's holiest site.

Features

  • Calculate real-time distance to Kaaba
  • Works offline (PWA functionality)
  • Responsive design
  • HTTPS support with SSL certificates
  • Docker support for easy deployment

Prerequisites

  • Node.js (Latest LTS version recommended)
  • Docker and Docker Compose (optional, for containerized deployment)
  • SSL certificates (for HTTPS)

Installation

Standard Setup

  1. Clone the repository:
git clone [repository-url]
cd kaaba-distance-pwa
  1. Install dependencies and generate SSL certificates:
npm run setup
  1. Start the application:
npm start

For development with auto-reload:

npm run dev

Docker Setup

  1. Build the Docker image:
npm run docker:build
  1. Start the container:
npm run docker:start

Or run in detached mode:

npm run docker:start:detach
  1. To stop the container:
npm run docker:stop

Available Scripts

  • npm start - Start the application
  • npm run dev - Start with nodemon for development
  • npm run setup - Generate SSL certificates and install dependencies
  • npm run docker:build - Build Docker image
  • npm run docker:start - Start Docker container
  • npm run docker:start:detach - Start Docker container in detached mode
  • npm run docker:stop - Stop Docker container
  • npm run docker:logs - View Docker logs
  • npm run docker:clean - Clean up Docker resources

Technical Stack

  • Frontend: HTML5, CSS3, JavaScript
  • Backend: Node.js with Express
  • PWA Features: Service Workers, Manifest
  • Containerization: Docker
  • SSL: Self-signed certificates for development

Security

The application uses HTTPS with SSL certificates. This is crucial for accessing the device's geolocation features, as modern browsers (especially Safari on iOS devices) require a secure HTTPS connection to request location permissions. For development, self-signed certificates are provided to enable this functionality locally. For production deployment, replace the self-signed certificates with proper SSL certificates from a trusted Certificate Authority.

About

A Progressive Web Application (PWA) that calculates your distance from the Kaaba in Mecca. This application provides users with their real-time distance from Islam's holiest site.

Topics

Resources

Stars

Watchers

Forks