A full-stack Quran reading experience built with React + Vite on the frontend and an Express proxy backend for secure OAuth2 access to Quran Foundation content APIs.
## Highlights
- Surah, Juz, and Hizb reading modes
- Translation and tafsir support
- Word-by-word endpoint integration
- Ayah audio playback with reciter selection
- Global mini player with:
- Repeat Ayah
- Surah Loop
- Transport, seek, speed, and volume
- Responsive UI with persistent user preferences
## Stack
- Frontend: React 18 + Vite 5
- Backend: Express + CORS + dotenv
- Auth/API: OAuth2 Client Credentials with Quran Foundation APIs
## Architecture
```text
Browser (Vite app) -> Local Express backend -> Quran Foundation API
The backend handles token creation/caching and keeps secrets out of the client.
cd DEENCORE
npm install
Create DEENCORE/server/.env (copy from DEENCORE/server/.env.example) and set:
QF_CLIENT_ID=your_client_id
QF_CLIENT_SECRET=your_client_secret
QF_AUTH_URL=https://oauth2.quran.foundation/
QF_API_BASE=https://apis.quran.foundation/
PORT=3001
cd DEENCORE
npm run server
Backend URL: http://localhost:3001
In a second terminal:
cd DEENCORE
npm run dev
Frontend URL: http://localhost:5173
From DEENCORE:
npm run dev -> Start Vite dev servernpm run server -> Start Express backendnpm start -> Alias for backendnpm run build -> Build frontendnpm run preview -> Preview built frontendGET /api/healthGET /api/chaptersGET /api/chapters/:chapterNumber/verses/:translationIdGET /api/juzs, GET /api/juzs/:juzNumber/verses/:translationIdGET /api/hizbs, GET /api/hizbs/:hizbNumber/verses/:translationIdGET /api/audio/chapter/:reciterId/:chapterNumberGET /api/audio/verse/:reciterId/:chapterNumberGET /api/recitationsGET /api/tafsirs, GET /api/tafsir/:tafsirId/by_chapter/:chapterNumberGET /api/searchquran-foundation-app/
|- READme.md
|- DEENCORE/
| |- package.json
| |- index.html
| |- vite.config.js
| |- server/
| | |- index.js
| | |- .env.example
| |- src/
| |- App.jsx
| |- App.css
| |- main.jsx
DEENCORE/server/.env exists.QF_CLIENT_ID and QF_CLIENT_SECRET are real values.3001.QF_AUTH_URL and QF_API_BASE values.DEENCORE:
npm install -D terserQF_CLIENT_SECRET in frontend code.DEENCORE/server/.env out of version control.