Logo Lanfrica

Yaseen-Davids/prayer-times

Record type:

software
Creator:
Yas
Host:
A web application for looking up daily and monthly Islamic prayer times across South African cities # South Africa Prayer Times A web application for looking up daily and monthly Islamic prayer (Salah) times across South African cities. Prayer times are scraped from masjids.co.za rather than computed from astronomical formulas. - **Live site:** salaahtimes.vercel.app - **API:** prayer-times-api-six.vercel.app ## Repository Layout This is a two-project monorepo. Each project is self-contained and deploys independently to Vercel. | Project | Stack | Description | |---------|-------|-------------| | `api/` | Python, FastAPI | Scrapes prayer times and serves them as a REST API | | `ui/` | React, TypeScript, Vite | Public-facing web app that consumes the API | ## Architecture ``` ┌─────────────────────┐ HTTPS ┌──────────────────────────────┐ │ ui (React/Vite) │ ────────────────────▶│ api (FastAPI on Vercel) │ │ salaahtimes. │ VITE_API_URL │ prayer-times-api-six. │ │ vercel.app │ │ vercel.app │ └─────────────────────┘ └──────────────┬───────────────┘ │ scrape ▼ ┌──────────────────────────────┐ │ masjids.co.za │ └──────────────────────────────┘ ``` ## Supported Cities Benoni, Bergville, Bloemfontein, Cape Town (default), Colesberg, Durban, East London, Johannesburg, Kimberley, King William's Town, Pietermaritzburg, Port Elizabeth, Pretoria. ## Local Development Run each project from its own directory. To develop the full stack locally, start the API first, then point the UI at it. ### 1. Start the API ```bash cd api python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate pip install -r requirements.txt uvicorn main:app --reload # 127.0.0.1 ``` ### 2. Start the UI ```bash cd ui npm install echo "VITE_API_URL=127.0.0.1" > .env # point at the local API npm run dev # localhost ``` If you skip creating `.env`, the UI falls back to the produ …