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.
- Calculate real-time distance to Kaaba
- Works offline (PWA functionality)
- Responsive design
- HTTPS support with SSL certificates
- Docker support for easy deployment
- Node.js (Latest LTS version recommended)
- Docker and Docker Compose (optional, for containerized deployment)
- SSL certificates (for HTTPS)
- Clone the repository:
git clone [repository-url]
cd kaaba-distance-pwa
- Install dependencies and generate SSL certificates:
npm run setup
- Start the application:
npm start
For development with auto-reload:
npm run dev
- Build the Docker image:
npm run docker:build
- Start the container:
npm run docker:start
Or run in detached mode:
npm run docker:start:detach
- To stop the container:
npm run docker:stop
npm start
- Start the applicationnpm run dev
- Start with nodemon for developmentnpm run setup
- Generate SSL certificates and install dependenciesnpm run docker:build
- Build Docker imagenpm run docker:start
- Start Docker containernpm run docker:start:detach
- Start Docker container in detached modenpm run docker:stop
- Stop Docker containernpm run docker:logs
- View Docker logsnpm run docker:clean
- Clean up Docker resources
- Frontend: HTML5, CSS3, JavaScript
- Backend: Node.js with Express
- PWA Features: Service Workers, Manifest
- Containerization: Docker
- SSL: Self-signed certificates for development
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.