Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
536 commits
Select commit Hold shift + click to select a range
c05fe1e
update redirection logic
osamasayed Sep 4, 2025
8ba3650
Update QR integration
osamasayed Sep 9, 2025
96f8ed7
update redirection logic
osamasayed Sep 4, 2025
d26fb2a
Update QR integration
osamasayed Sep 9, 2025
0950f37
Dockerfile: update (#2491)
vwh Sep 10, 2025
7ca7ab3
Dockerfile: update (#2491)
vwh Sep 10, 2025
b78f866
Update QR integration (#2490)
osamasayed Sep 10, 2025
a440ae5
Update developers page (#2494)
osamasayed Sep 14, 2025
ed03e13
Update developers page (#2494)
osamasayed Sep 14, 2025
8b2812d
Hide the Next.js error on the test page load Fixed the tests related …
zonetecde Sep 19, 2025
e6e51ed
Add Codex changes, improve selectors, and add verse/translation tests
zonetecde Sep 20, 2025
25c782e
Add tests for surah display, scrolling, footnotes, bookmarks, and sur…
zonetecde Sep 20, 2025
f8134a9
Use mock values across all tests and add translation tests
zonetecde Sep 21, 2025
748de40
Add search feature tests
zonetecde Sep 21, 2025
9e2949c
QF-3350 (#2497)
osamasayed Sep 22, 2025
9859a6b
Add navigation drawer and search page tests
zonetecde Sep 22, 2025
0b3e5dc
Merge branch 'master' into testing
rrrokhtar Sep 22, 2025
0f00b67
Add Navigate Quran drawer tests
zonetecde Sep 23, 2025
47e22cd
Add Navigate Quran drawer tests
zonetecde Sep 23, 2025
e83987d
Updated gh action playwright file
zonetecde Sep 23, 2025
42d5d0d
disabled Playwright gh action time limit
zonetecde Sep 23, 2025
4f5b74c
Restore old proxy file
zonetecde Sep 24, 2025
00a4608
Updated AGENTS.md to include Playwright test command
zonetecde Sep 24, 2025
4329a81
Refactor beforeEach: instantiate a HomePage and reuse it across all t…
zonetecde Sep 25, 2025
4906548
Start full refactor of test structure for better organization
zonetecde Sep 26, 2025
f0cb3eb
Add new tests covering the entire footer and navigation drawer
zonetecde Sep 26, 2025
0b30ddd
test
osamasayed Jul 2, 2025
d6c5d3b
test
osamasayed Sep 27, 2025
384bd95
test
osamasayed Sep 27, 2025
a99a991
Complete refactor of all remaining tests: organize into folders and a…
zonetecde Sep 27, 2025
247048b
Apply osamasayed's suggestion: use data-testid instead of aria-label …
zonetecde Sep 27, 2025
f2eb2cd
Send failing Playwright tests to Discord webhook; temporarily disable…
zonetecde Sep 27, 2025
afbd9fa
Add new Playwright tests for drawers behavior and languages
zonetecde Sep 27, 2025
3642ab7
Improve Discord reporter: create threads for each test run and added …
zonetecde Sep 28, 2025
306dc33
Fixed some bugs with the Discord Reporter script.
zonetecde Sep 28, 2025
b59d4ad
[QF-3309]: SSO Login and logout support for QR (#2495)
mohsinayoob Sep 28, 2025
06d9a95
Update reporter: keep only messages with failures, delete others; add…
zonetecde Sep 28, 2025
53e931a
Fix a sentence
zonetecde Sep 28, 2025
cad509d
Add comprehensive homepage tests:
zonetecde Sep 29, 2025
4a35415
Correction of the test concerning “Ayah of the Day” which would fail …
zonetecde Sep 30, 2025
9a0ee47
QF-3435: Fix ayah reference formatting for RTL locales (#2504)
yousefdergham Sep 30, 2025
a2a9c35
All tests related to the homepage have been added.
zonetecde Sep 30, 2025
1e7d987
Added some new tests for the homepage and for learning plans.
zonetecde Sep 30, 2025
aefd504
Add Playwright tests for path routing and search page
zonetecde Sep 30, 2025
5d76a2a
Add Playwright tests for word by word view, visual indicators, and mu…
zonetecde Sep 30, 2025
d30a7ff
Add Playwright tests for word-by-word feature and font/mushaf settings
zonetecde Oct 1, 2025
062c88a
Applied coderabbit suggestions
zonetecde Oct 1, 2025
92a3d4c
Fixed some tests and removed a useless div.
zonetecde Oct 1, 2025
92b2abd
Add Playwright tests for Quran listening feature
zonetecde Oct 1, 2025
f616b3b
Add Playwright tests for Quran listening in Mushaf mode
zonetecde Oct 1, 2025
5636d79
Revert back requiring auth for profile page
osamasayed Oct 2, 2025
57de1b8
Fixed an issue that caused existing tests to crash. Added a test for …
zonetecde Oct 2, 2025
7019996
course.{MainDetails,LessonView}: add shouldUseMilkdown check (#2507)
mustafa0x Oct 3, 2025
a954210
Added a limit for Discord API calls to avoid being rate-limited.
zonetecde Oct 4, 2025
7aef242
Merge branch 'testing' of https://github.com/zonetecde/quran.com-fron…
zonetecde Oct 4, 2025
75e28da
Qf 3439 (#2505)
yousefdergham Oct 5, 2025
e33514b
QF-3465: i18n(learn): add full stop to 'duration-daily' across all lo…
yousefdergham Oct 5, 2025
8ceac06
Fix linting issue (#2509)
osamasayed Oct 5, 2025
8810f00
Add initial authentication tests
zonetecde Oct 5, 2025
18a0def
Fix a test
zonetecde Oct 5, 2025
8cba10b
Add authentication setup for logged-in test sessions
zonetecde Oct 5, 2025
b9bf6cd
Update localization strings and improve Learning Plan Banner styles (…
yousefdergham Oct 6, 2025
aaa1aa2
Added tests to verify that routing is working properly.
zonetecde Oct 6, 2025
282dae3
Update localization strings and improve Learning Plan Banner styles (…
yousefdergham Oct 6, 2025
80b5eb8
agents.md: minor fix (#2499)
mustafa0x Oct 7, 2025
45bf66e
Update AGENTS.md
zonetecde Oct 7, 2025
30712e5
Fix room's url (#2516)
osamasayed Oct 7, 2025
02394e7
Implementation of all suggestions from coderabbit and osamasayed
zonetecde Oct 7, 2025
2b0d3d5
Updated .env.example
zonetecde Oct 7, 2025
b7bd4f2
Merge branch 'playwright-tests' of https://github.com/zonetecde/quran…
zonetecde Oct 7, 2025
028730b
Fix: Small spelling fix in footer of qdc (QF-3173) (#2514)
zonetecde Oct 7, 2025
897729e
Merge branch 'master' into testing
osamasayed Oct 7, 2025
3dede19
Staging prod sync (#2518)
osamasayed Oct 8, 2025
6760cb3
Merge branch 'master' into testing
osamasayed Oct 8, 2025
f41ad50
Merge branch 'pre-live'
osamasayed Oct 8, 2025
8d36e6e
Merge branch 'master' into testing
osamasayed Oct 8, 2025
26f5f3a
QF-3501 - Fix "Tafsirs" button triggering Surah selection (#2522)
zonetecde Oct 9, 2025
4e80e68
QF-3354 ref: AuthorInfo component with image error handling and updat…
rrrokhtar Oct 9, 2025
e1f2ed9
QF-3354 ref: AuthorInfo component with image error handling and updat…
rrrokhtar Oct 9, 2025
efca425
Fix: Quran in a Year auto scrolling (#2523)
zonetecde Oct 9, 2025
461e806
Merge branch 'testing' into playwright-tests
osamasayed Oct 9, 2025
fe69074
Refactor Playwright tests and fix Surah Al-Mulk & listening issues
zonetecde Oct 10, 2025
3808dae
added test: repeat modal has persistent values
zonetecde Oct 10, 2025
d865fa4
QF-3501 - Fix "Tafsirs" button triggering Surah selection (#2522)
zonetecde Oct 9, 2025
eba7b4c
Fix: Quran in a Year auto scrolling (#2523)
zonetecde Oct 9, 2025
e9c597c
Merge branch 'production'
osamasayed Oct 10, 2025
a318e61
Merge branch 'master' into testing
osamasayed Oct 10, 2025
1952b36
QF-2651 : Text does not wrap on saved notes (#2527)
zonetecde Oct 12, 2025
320b38d
Merge branch 'pre-live'
osamasayed Oct 12, 2025
5c7676b
Merge branch 'master' into testing
osamasayed Oct 12, 2025
5718198
Fix room's url (#2516)
osamasayed Oct 7, 2025
38d6832
Merge branch 'pre-live'
osamasayed Oct 12, 2025
1f40fef
Merge branch 'master' into testing
osamasayed Oct 12, 2025
4ba552a
Merge branch 'pre-live'
osamasayed Oct 12, 2025
b941828
Merge branch 'master' into testing
osamasayed Oct 12, 2025
1aaadf9
Merge branch 'pre-live'
osamasayed Oct 12, 2025
c633aa1
Merge branch 'master' into testing
osamasayed Oct 12, 2025
b2c4e78
added playwright tests for QF-1129
zonetecde Oct 13, 2025
f8c687a
Modification of listening tests to use Al Fatiha (which has longer ve…
zonetecde Oct 13, 2025
705bdb2
modification of reading tests so that they pass every time.
zonetecde Oct 14, 2025
216af88
Qf 3200 explore topics section scrollable horizontally (#2528)
yousefdergham Oct 15, 2025
e9feb0a
added playwright test for QF-2998
zonetecde Oct 15, 2025
4db1fa9
fixed qf number in skipped test
zonetecde Oct 15, 2025
670d2a0
QF-2096 - Fix reciter menu too large (#2525)
zonetecde Oct 15, 2025
ede1dc4
QF-2998 - Fixed line height of Answer text (#2532)
zonetecde Oct 16, 2025
f126c78
Qf 3200 explore topics section scrollable horizontally (#2528)
yousefdergham Oct 15, 2025
a4dd067
- Fixed listening tests: made the audio restart from the beginning be…
zonetecde Oct 16, 2025
f79f4c4
removed unused mock data
zonetecde Oct 16, 2025
ac3a044
Added dotenv in playwright config file
zonetecde Oct 16, 2025
a6c9b0f
Fixed listening tests and banner tests
zonetecde Oct 16, 2025
0cf53cb
Fixed listening tests and banner tests
zonetecde Oct 16, 2025
a585619
Fixed mobile and ios playstore/appstore tests
zonetecde Oct 17, 2025
f232489
Adding right padding to the title text of a modal to prevent the titl…
zonetecde Oct 17, 2025
ce8bb6f
Revert "Adding right padding to the title text of a modal to prevent …
zonetecde Oct 17, 2025
410708a
* Fixed some tests that occasionally failed on mobile
zonetecde Oct 17, 2025
a0884a4
Added test.slow() on some tests
zonetecde Oct 19, 2025
b0d6800
additional security for audio tests
zonetecde Oct 19, 2025
3859b33
feat: add API response waits to improve test reliability
zonetecde Oct 19, 2025
2bb51b8
improved basmala-visibility tests by waiting for api response
zonetecde Oct 19, 2025
bf539f7
wait for audio to load and added timeouts for the highliting test
zonetecde Oct 19, 2025
e1e8c16
Merge branch 'pre-live'
osamasayed Oct 20, 2025
85e63ad
Merge branch 'master' into testing
osamasayed Oct 20, 2025
15a9f01
Revert "wait for audio to load and added timeouts for the highliting …
zonetecde Oct 20, 2025
cad51ed
[QF-2683] Streak card in homepage should be clickable (#2539)
afifvdin Oct 21, 2025
16b27a8
Refactor highlighting test
zonetecde Oct 21, 2025
c0a5844
[QF-2683] Streak card in homepage should be clickable (#2539)
afifvdin Oct 21, 2025
029e8c5
Enhance ExploreTopicsSection styling for better layout and scrolling …
yousefdergham Oct 21, 2025
78d8006
QF-3062 - Show 'Verses about the Sunnah' link only in production envi…
zonetecde Oct 21, 2025
bf6edca
Added test for QF-2082
zonetecde Oct 21, 2025
0400f80
mark the test as skiped until PR is merged
zonetecde Oct 21, 2025
15c1d83
Merge branch 'pre-live'
osamasayed Oct 22, 2025
b48dc23
Merge branch 'master' into testing
osamasayed Oct 22, 2025
3a198d2
QF-3548 ch: update ayah reflection URL to use verifiedOnly filter ins…
rrrokhtar Oct 24, 2025
316a232
added tests for QF-2639 (persistent repeat modal values)
zonetecde Oct 24, 2025
53f54b3
added tests for QF-2639 (persistent repeat modal values)
zonetecde Oct 24, 2025
9bcc931
fix: logging to see the cookies with proxy
mohsinayoob Oct 26, 2025
1823cfb
fix: update AppEnv enum to change PRE_LIVE to PRELIVE for consistency…
rrrokhtar Oct 26, 2025
d7f8942
added playwright test for QF-3600
zonetecde Oct 26, 2025
cd880e0
Added test for QF-2769
zonetecde Oct 26, 2025
51ec051
marked QF-2769 test as skipped for now
zonetecde Oct 26, 2025
bbc6dfd
QDC->QR integration (#2555)
osamasayed Oct 27, 2025
7d9a0a9
fixed discord reporter issue
zonetecde Oct 29, 2025
5b2dc62
Added @smoke tag to numerous tests
zonetecde Oct 29, 2025
755f0be
removed create acc smoke test
zonetecde Oct 29, 2025
04377f6
fixed a test
zonetecde Oct 29, 2025
84a6859
Added multiple Playwright tests for the Tafsir feature
zonetecde Oct 30, 2025
b0c2f6b
QF-3520: Open learning plans for guest users (#2547)
yousefdergham Oct 30, 2025
58a4850
removed .only from a test
zonetecde Oct 30, 2025
ff15f2a
only create the discord message if a test fails
zonetecde Oct 30, 2025
10b1d30
only run dev server and load env var if is localhost
zonetecde Oct 31, 2025
e87e384
[QF-3123] Update the reflections and lessons popup design (#2557)
afifvdin Oct 31, 2025
c48a956
QF-3656 - Update verse link regex and tests for triple-digit referenc…
zonetecde Oct 31, 2025
a3513e0
Merge branch 'production' into pre-live
osamasayed Nov 2, 2025
4697719
Merge branch 'master' into testing
osamasayed Nov 2, 2025
4b8fe30
Merge branch 'production' into pre-live
osamasayed Nov 2, 2025
b1cfbd6
Merge branch 'master' into testing
osamasayed Nov 2, 2025
83785f7
Fixed typo on about us page
zonetecde Nov 4, 2025
15650e7
Revert "Fixed typo on about us page"
zonetecde Nov 4, 2025
507a225
QF-2751: Show the settings/preferences icon on the surah header (#2554)
yousefdergham Nov 5, 2025
e4bbe68
QF-3590: Update PopularButton and ChapterCard styles for improved res…
yousefdergham Nov 6, 2025
2c4eb01
[QF-3542] Daily ayah pushed down o be above the community section and…
afifvdin Nov 6, 2025
c7887b1
[QF-3550] Open create goal screen for the guest user before redirecti…
afifvdin Nov 6, 2025
4f94cb3
make language picker load correct defaults
Nov 8, 2025
e77d051
route QuranReflect API through proxy and align tests/types
Nov 8, 2025
7816f5f
Make sure the reflections API call uses the language returned by get …
Nov 8, 2025
4661ea6
moved quranreflect-related locale to the quranreflect locale file
Nov 8, 2025
337918f
Complete application of the logic when the user signs up or logs in.
Nov 9, 2025
722bffb
Applied coderabbit suggestions
zonetecde Nov 10, 2025
2dbbb20
QF 3724 (#2580)
AhmedCodeGuy Nov 10, 2025
044b3f8
Add shared Sanity helpers for courses/product updates and refactor pa…
zonetecde Nov 11, 2025
d5952f3
applied user settings from the server after login, and fixed the redi…
zonetecde Nov 11, 2025
13f4e5b
Implemented logic for the 'Reset settings'
zonetecde Nov 11, 2025
53d051a
Fixed the site behavior when a user changes the language without modi…
zonetecde Nov 11, 2025
6e6ffed
fixed playwright tests
zonetecde Nov 11, 2025
c2cbfc9
add the 'languages' parameter to the request to retrieve courses base…
Nov 12, 2025
d269009
fixed some problem with the LP api call
Nov 13, 2025
c671908
add language group to saved's group upon sign up
Nov 13, 2025
9f302f6
fix lessons languages + ayahreflection refactor
Nov 13, 2025
99caae6
fix ayah reflection language request not having the right languages
Nov 15, 2025
64f35d0
Fetch learning plans server-side (align with Quran Reflect SSR pattern)
Nov 15, 2025
04ef26c
feat: add localization integration tests
Nov 15, 2025
ac8533e
QF-2606 - Fix media range timestamp normalization and add coverage (#…
zonetecde Nov 15, 2025
f15e6e6
fixed all lint issues and fixed the rub/N and page/N pages not workin…
Nov 15, 2025
6b0de11
Fix audio test case
osamasayed Nov 15, 2025
e50fb77
skipped a test
Nov 16, 2025
96764a8
Merge branch 'playwright-tests' of https://github.com/zonetecde/quran…
Nov 16, 2025
1151535
Added numerous Playwright tests covering the entire website (#2512)
zonetecde Nov 17, 2025
43f2fbb
Revert "Added numerous Playwright tests covering the entire website" …
mustafa0x Nov 17, 2025
75af293
Merge remote-tracking branch 'origin/testing' into playwright-tests
zonetecde Nov 17, 2025
e72ed42
fixed all playwright tests that were failing bc of the merge
zonetecde Nov 17, 2025
e6c9de4
fixing 4 flaky Playwright tests
zonetecde Nov 17, 2025
b1cd818
Merge branch 'testing' into SSR
zonetecde Nov 18, 2025
9a4d120
fixed hizb page and /S/V page
zonetecde Nov 19, 2025
db93ed6
fixed all playwright tests that were failing because of the merge
Nov 19, 2025
42d99b4
fixed the Spanish onboarding modal that was causing the website to crash
Nov 19, 2025
728766e
- applied Coderabbit suggestions
zonetecde Nov 20, 2025
ab214fd
Add a "userHasCustomized" preference group, and use it on the fronten…
Nov 21, 2025
5eef269
userHasCustomized -> userHasCustomised
zonetecde Nov 22, 2025
e33e257
QF-2082 - Hide the navigation drawer when not on Quran reading pages.…
zonetecde Nov 25, 2025
aef2804
feat(notifications): Filter notification preferences by QDC tag (#2596)
AhmedCodeGuy Nov 26, 2025
ee7db94
[QF-3972] Add banner for (The Rescuer: Powerful lessons in Surah Al-M…
yousefdergham Nov 26, 2025
6c6e508
Update prompts (#2599)
osamasayed Nov 28, 2025
955bab8
Sync locales
osamasayed Nov 30, 2025
580f6e6
QF-3690 - Fixed typo on about us page (#2573)
zonetecde Nov 30, 2025
c3e053b
Fix onboarding modal (Spanish & Kiswahili) (#2591)
zonetecde Nov 30, 2025
8f948a6
[QF-3112] remove 3rd bullet from access-anywhere section (#2571)
al-imam Nov 30, 2025
acd6656
Prod release (#2613)
osamasayed Dec 2, 2025
8e43f77
Fix: QF-3500 Include query parameters when sharing search query (#2519)
zonetecde Dec 2, 2025
cd14e41
QF-2696 - Adding right padding to the title text of a modal (#2536)
zonetecde Dec 3, 2025
b0e4fae
Made Collection's verses expanded by default (#2615)
zonetecde Dec 3, 2025
ee8ddfb
QF-4026 - Change the LP view on the homepage (#2616)
zonetecde Dec 4, 2025
3390dd6
Updated LP Card size on mobile (#2621)
zonetecde Dec 4, 2025
5dda7bb
updated LP cards size on mobile
zonetecde Dec 4, 2025
b2a5a4a
QF-4028 - Change order of the sections on QDC homepage for guest user…
zonetecde Dec 6, 2025
a644547
Merge branch 'testing' into SSR
zonetecde Dec 6, 2025
6829ec1
fixed a lint issue
zonetecde Dec 6, 2025
a07197d
QF-318 - Fixed SSR build issues + applied a fix for a regression that…
zonetecde Dec 6, 2025
e1b5d8d
Course.{LessonView,MainDetails}: add p + p margins (#2623)
mustafa0x Dec 6, 2025
725cef9
QF-922 - Localization Fix (#2627)
zonetecde Dec 7, 2025
a0275ce
[QF-2775] - Show the data source provider of the translation on the t…
yousefdergham Dec 7, 2025
0541e9c
[QF-3553] Update QDC banner for Goals (#2570)
afifvdin Dec 7, 2025
0a75203
[QF-3593] Update the burger menu (#2556)
afifvdin Dec 8, 2025
e77adf2
[QF-3156] Add "Ask Question" Button to Quranic Calendar Hero (#2581)
al-imam Dec 8, 2025
f03ca83
Fix: Page number tracking in Reading and Translation modes (#2587)
AhmedCodeGuy Dec 8, 2025
bc5c625
Add font rendering docs (#2640)
osamasayed Dec 8, 2025
12b5d75
Revert "Fix: Page number tracking in Reading and Translation modes (#…
AhmedCodeGuy Dec 8, 2025
b2466a1
Fix: Page number tracking in Reading and Translation modes (#2641)
AhmedCodeGuy Dec 9, 2025
bdcfbca
Revert "Fix: Page number tracking in Reading and Translation modes (#…
AhmedCodeGuy Dec 9, 2025
e46e81d
Fix: Page number tracking in Reading and Translation modes (#2648)
AhmedCodeGuy Dec 9, 2025
f8e02bd
[QF-2770] Add CheckboxChip component and update WordByWordSection to …
yousefdergham Dec 10, 2025
85656c0
Add Apps Portal page and CTA on Developers page (#2638)
basit3407 Dec 11, 2025
93804f9
Add MTF banner
osamasayed Dec 11, 2025
530676b
Update developers page
osamasayed Dec 11, 2025
ea633c8
Added mobile apps for qdc to Quran App Portal (#2654)
basit3407 Dec 11, 2025
3b48296
fix: revert bookmark icon and add another variant (#2642)
afifvdin Dec 11, 2025
6d0593a
Remove Quran Meet
osamasayed Dec 11, 2025
4d0acf5
fix: show yellow lightbulb icon for clarification questions (#2659)
AhmedCodeGuy Dec 16, 2025
fdf9754
[QF-3991] Redesign Auth UI (#2647)
al-imam Dec 16, 2025
f9f01fd
Remove MTF banner (#2672)
osamasayed Dec 17, 2025
a93870e
[QF-4003] Surah Info New UI (#2649)
al-imam Dec 17, 2025
cae5785
[QF-3675-hooks] add useUpdatePassword hook (#2651)
afifvdin Dec 18, 2025
7654184
[QF-3675] Edit User Profile - Change Password (#2652)
afifvdin Dec 18, 2025
8941f38
refactor(bookmarks): Comprehensive bookmarks system overhaul (#2639)
AhmedCodeGuy Dec 18, 2025
c0a6e11
[QF-3666-hooks] add hooks and function related to updating user profi…
afifvdin Dec 18, 2025
aa7ded6
Fix ChapterHeader centering in Safari and Firefox (#2657)
AhmedCodeGuy Dec 18, 2025
6391270
fix: RTL display issues in TranslationView and ReadingView (#2658)
AhmedCodeGuy Dec 18, 2025
60f0fd0
[QF-3520]: Open learning plans (#2637)
yousefdergham Dec 18, 2025
bd0fd80
sentry: don't send hydration errors (#2655)
mustafa0x Dec 18, 2025
de35ed3
Open Apps Portal in new tab from Developers page (#2682)
basit3407 Dec 19, 2025
270ccab
Fix inconsistent styling
osamasayed Dec 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
32 changes: 32 additions & 0 deletions .cursor/prompts/review.prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Review my code changes against the Quran.com frontend project guidelines.

## Context

- Next.js (Pages Router), TypeScript strict mode, SCSS modules
- next-translate for i18n, useSWR for data fetching, Radix UI components

## Check For

**TypeScript**: No `any` types, explicit return types on exports, interfaces for objects, enums for repeated values

**React**: Functional components only, Props interface, proper memoization, no unnecessary useEffect, skeleton loaders for async data

**Code Quality**: Functions <30 lines, DRY code, proper error handling with fallbacks, no unused code, comments explain "why"

**API/Data**: useSWR for fetching, error states handled, API response fallbacks, optimistic updates

**Localization**: All text uses `t('key')` from next-translate, no hardcoded strings, RTL-safe CSS (logical properties like margin-inline-start)

**Accessibility**: Semantic HTML, ARIA attributes, keyboard navigation

**Security**: No hardcoded secrets, env vars for config, input validation

**Testing**: Tests for new functionality, edge cases, error scenarios

## Output Format

1. **🚨 Critical** - Must fix before PR
2. **💡 Suggestions** - Improvements to consider
3. **✅ Good** - What's done well

Include file paths and line numbers.
5 changes: 5 additions & 0 deletions .cursor/rules/bug-handling-with-todo-comments.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
description: Specifies the usage of TODO comments to outline problems or bugs encountered in existing code, regardless of file type.
globs: **/*.*
---
- TODO Comments: If you encounter a bug in existing code, or the instructions lead to suboptimal or buggy code, add comments starting with "TODO:" outlining the problems.
56 changes: 56 additions & 0 deletions .cursor/rules/clean-code.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
description: Guidelines for writing clean, maintainable, and human-readable code. Apply these rules when writing or reviewing code to ensure consistency and quality.
globs:
alwaysApply: false
---
# Clean Code Guidelines

## Constants Over Magic Numbers
- Replace hard-coded values with named constants
- Use descriptive constant names that explain the value's purpose
- Keep constants at the top of the file or in a dedicated constants file

## Meaningful Names
- Variables, functions, and classes should reveal their purpose
- Names should explain why something exists and how it's used
- Avoid abbreviations unless they're universally understood

## Smart Comments
- Don't comment on what the code does - make the code self-documenting
- Use comments to explain why something is done a certain way
- Document APIs, complex algorithms, and non-obvious side effects

## Single Responsibility
- Each function should do exactly one thing
- Functions should be small and focused
- If a function needs a comment to explain what it does, it should be split

## DRY (Don't Repeat Yourself)
- Extract repeated code into reusable functions
- Share common logic through proper abstraction
- Maintain single sources of truth

## Clean Structure
- Keep related code together
- Organize code in a logical hierarchy
- Use consistent file and folder naming conventions

## Encapsulation
- Hide implementation details
- Expose clear interfaces
- Move nested conditionals into well-named functions

## Code Quality Maintenance
- Refactor continuously
- Fix technical debt early
- Leave code cleaner than you found it

## Testing
- Write tests before fixing bugs
- Keep tests readable and maintainable
- Test edge cases and error conditions

## Version Control
- Write clear commit messages
- Make small, focused commits
- Use meaningful branch names
45 changes: 45 additions & 0 deletions .cursor/rules/codequality.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
description: Code Quality Guidelines
globs:
alwaysApply: false
---
# Code Quality Guidelines

## Verify Information
Always verify information before presenting it. Do not make assumptions or speculate without clear evidence.

## File-by-File Changes
Make changes file by file and give me a chance to spot mistakes.

## No Apologies
Never use apologies.

## No Understanding Feedback
Avoid giving feedback about understanding in comments or documentation.

## No Whitespace Suggestions
Don't suggest whitespace changes.

## No Inventions
Don't invent changes other than what's explicitly requested.

## No Unnecessary Confirmations
Don't ask for confirmation of information already provided in the context.

## Preserve Existing Code
Don't remove unrelated code or functionalities. Pay attention to preserving existing structures.

## Single Chunk Edits
Provide all edits in a single chunk instead of multiple-step instructions or explanations for the same file.

## No Implementation Checks
Don't ask the user to verify implementations that are visible in the provided context.

## No Unnecessary Updates
Don't suggest updates or changes to files when there are no actual modifications needed.

## Provide Real File Links
Always provide links to the real files, not x.md.

## No Current Implementation
Don't show or discuss the current implementation unless specifically requested.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
description: Applies coding guidelines related to using early returns and conditional classes in all files.
globs: **/*.*
---
- Utilize Early Returns: Use early returns to avoid nested conditions and improve readability.
- Conditional Classes: Prefer conditional classes over ternary operators for class attributes.
8 changes: 8 additions & 0 deletions .cursor/rules/comment-usage.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
description: This rule dictates how comments should be used within the codebase to enhance understanding and avoid clutter.
globs: **/*.*
---
- Use comments sparingly, and when you do, make them meaningful.
- Don't comment on obvious things. Excessive or unclear comments can clutter the codebase and become outdated.
- Use comments to convey the "why" behind specific actions or explain unusual behavior and potential pitfalls.
- Provide meaningful information about the function's behavior and explain unusual behavior and potential pitfalls.
7 changes: 7 additions & 0 deletions .cursor/rules/follow-up-questions.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

---
description: When you have questions or need clarification, I'll ask follow-up questions to ensure I understand your requirements before providing a solution. This helps me deliver more accurate and useful code that meets your specific needs.
globs:
alwaysApply: true
---
Do not make any changes, until you have 95% confidence that you know what to build ask me follow up questions until you have that confidence.
7 changes: 7 additions & 0 deletions .cursor/rules/function-length-and-responsibility.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
description: This rule enforces the single responsibility principle, ensuring functions are short and focused.
globs: **/*.*
---
- Write short functions that only do one thing.
- Follow the single responsibility principle (SRP), which means that a function should have one purpose and perform it effectively.
- If a function becomes too long or complex, consider breaking it into smaller, more manageable functions.
5 changes: 5 additions & 0 deletions .cursor/rules/function-ordering-conventions.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
description: Defines the function ordering conventions, where functions that compose other functions appear earlier in the file, regardless of the file type.
globs: **/*.*
---
- Order functions with those that are composing other functions appearing earlier in the file. For example, if you have a menu with multiple buttons, define the menu function above the buttons.
6 changes: 6 additions & 0 deletions .cursor/rules/general-code-commenting.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
description: Ensures helpful comments are added to the code and that old, relevant comments are preserved.
globs: **/*.*
---
- Always add helpful comments to the code explaining what you are doing.
- Never delete old comments, unless they are no longer relevant because the code has been rewritten or deleted.
7 changes: 7 additions & 0 deletions .cursor/rules/general-coding-principles.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
description: Applies general coding principles like simplicity, readability, performance, maintainability, testability, and reusability to all files.
globs: **/*.*
---
- Focus on simplicity, readability, performance, maintainability, testability, and reusability.
- Remember less code is better.
- Lines of code = Debt.
7 changes: 7 additions & 0 deletions .cursor/rules/minimal-code-changes-rule.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
description: Enforces the principle of making minimal code changes to avoid introducing bugs or technical debt in any file.
globs: **/*.*
---
- Only modify sections of the code related to the task at hand.
- Avoid modifying unrelated pieces of code.
- Accomplish goals with minimal code changes.
7 changes: 7 additions & 0 deletions .cursor/rules/naming-conventions.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
description: This rule focuses on using meaningful and descriptive names for variables, functions, and classes throughout the project.
globs: **/*.*
---
- Choose names for variables, functions, and classes that reflect their purpose and behavior.
- A name should tell you why it exists, what it does, and how it is used. If a name requires a comment, then the name does not reveal its intent.
- Use specific names that provide a clearer understanding of what the variables represent and how they are used.
7 changes: 7 additions & 0 deletions .cursor/rules/next-js-app-router-rule.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
description: Applies Next.js App Router specific guidelines to components and pages within the 'app' directory.
globs: app/**/*.tsx
alwaysApply: false
---
- You are an expert in Next.js Pages Router.
- Follow Next.js documentation for best practices in data fetching, rendering, and routing.
7 changes: 7 additions & 0 deletions .cursor/rules/next-js-configuration-rule.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
description: Rules specifically for the Next.js configuration file.
globs: /next.config.js
alwaysApply: false
---
- Ensure the Next.js configuration is optimized for performance.
- Review and update the configuration regularly based on project needs.
12 changes: 12 additions & 0 deletions .cursor/rules/next-js-conventions.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
description: Key Next.js conventions for state changes, web vitals, and client-side code usage.
globs: **/*.{ts,js,jsx,tsx}
alwaysApply: false
---
- Rely on Next.js Pages Router for state changes.
- Prioritize Web Vitals (LCP, CLS, FID).
- Minimize 'use client' usage:
- Prefer server components and Next.js SSR features.
- Use 'use client' only for Web API access in small components.
- Avoid using 'use client' for data fetching or state management.
- Refer to Next.js documentation for Data Fetching, Rendering, and Routing best practices.
14 changes: 14 additions & 0 deletions .cursor/rules/next-js-folder-structure.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
description: This rule defines the recommended folder structure for Next.js projects.
globs: app/**/*.*
alwaysApply: false
---
- Adhere to the following folder structure:

src/
components/
lib/
pages/
hooks/
utils/
public/
6 changes: 6 additions & 0 deletions .cursor/rules/performance-optimization-rules.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
description: Guidelines for optimizing performance by minimizing client-side operations and using server-side rendering.
globs: **/*.{js,jsx,ts,tsx}
---
- Optimize Web Vitals (LCP, CLS, FID).
- Use dynamic loading for non-critical components using @src/components/dls/Spinner/Spinner.tsx
5 changes: 5 additions & 0 deletions .cursor/rules/persona---senior-full-stack-developer.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
description: Defines the persona as a senior full-stack developer with extensive knowledge applicable to all files.
globs: **/*.*
---
- You are a senior full-stack developer. One of those rare 10x developers that has incredible knowledge.
63 changes: 63 additions & 0 deletions .cursor/rules/pre-pr-review.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
description: Pre-PR code review checklist - automatically applied when reviewing code changes
globs: "**/*.ts,**/*.tsx,**/*.scss"
alwaysApply: true
---

# Pre-PR Code Review Standards

When reviewing code changes, check against these Quran.com project guidelines:

## TypeScript
- Flag any `any` types - use `unknown` or specific types
- Require explicit return types on exported functions
- Use interfaces for object shapes, types for unions
- Use enums for repeated categorical values

## React Components
- Functional components only - no class components
- Props interface must be defined
- Use proper memoization (useCallback, useMemo) for callbacks/expensive computations
- Flag unnecessary useEffect - prefer event handlers or derived state
- Require skeleton loaders for async data to prevent layout shifts

## Code Quality
- Functions should be under 30 lines
- Flag duplicated code - extract to reusable functions (DRY)
- Require proper error handling with meaningful fallbacks
- Flag unused imports, variables, or dead code
- Comments should explain "why" not "what"

## API & Data Handling
- Use useSWR for data fetching, not raw fetch in components
- Handle error states with user-friendly messages
- Provide fallbacks for API responses - don't blindly trust data
- Use optimistic updates for predictable actions (bookmark, like)

## Localization
- All user-facing text must use `t('key')` from next-translate
- No hardcoded strings in UI
- Use RTL-safe CSS logical properties (margin-inline-start, not margin-left)

## Accessibility
- Use semantic HTML elements
- Add ARIA attributes where needed
- Ensure keyboard navigation works

## Security
- No hardcoded secrets or credentials
- Use environment variables for configuration
- Validate and sanitize user inputs

## Testing
- New functionality needs tests
- Cover edge cases and error scenarios
- Test file naming: `*.test.ts` or `*.test.tsx`

## Review Output Format
When providing review feedback:
1. 🚨 **Critical** - Must fix before PR
2. 💡 **Suggestions** - Improvements to consider
3. ✅ **Good** - What's done well

Include file paths and line numbers in feedback.
6 changes: 6 additions & 0 deletions .cursor/rules/react-functional-components.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
description: Enforces the use of functional components with hooks in React components.
globs: src/components/**/*.tsx
---
- Always use React functional components with hooks.
- Use React.FC for functional components with props.
Loading