آيات الأرقم
AyyatAlArqam
تَعَاهَدُوا الْقُرْآنَ
هذا العمل خالص لوجه الله. اللهم ثبتنا على ذلك. This work is purely for the sake of Allah
بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ
كل ما تم تحديثه وإضافته في آيات الأرقم — منصة تتبع حفظ القرآن للعائلات والحلقات
عرض ١٠١–١٢٠ من أصل ١٦٥ إصدار
Fix أحفظها الآن card on mobile: row-2 grid in StatsView now uses `grid-cols-1 lg:grid-cols-4` so the card takes full width on small screens instead of being squashed to 25% of the viewport.
آخر نشاطاتي box now shows the exact date (day, month, year) below the relative time on each activity row.
Admin user deletion now handles owned groups before deleting the account. The admin is shown each group the user owns with two options per group: transfer ownership to a chosen co-owner, or soft-delete the group (members keep their data). Soft-deleted groups are reassigned to the performing admin's account so they survive the FK cascade and real members still see the "محذوفة" card. The user is also silently removed from any co-owner roles. If the user owns no groups, a simple confirm proceeds directly. New API route `GET /api/admin/users/[id]/groups` returns owned groups with co-owners. `DELETE /api/admin/users/[id]` now accepts a `groupDecisions` payload. New `DeleteUserModal` component used in both the users list and the user detail page.
Group Soft-Delete: deleting a group is now a soft-delete with smart member handling. Before confirming deletion, the owner is offered an instant transfer to any co-owner (if the group has co-owners). On confirmed delete: fake members (no real account) are hard-deleted with all their data; real-account members keep their data and see the group marked as "محذوفة" in their dashboard with the deletion date and an "إزالة من القائمة" button. Pending member invites and transfer requests are cancelled on deletion. The delete button now calls `/api/delete-group` (POST) — admin uses service_role for all operations. Admin panel groups page now shows a separate "Deleted Groups" table with owner, deletion date, real member count, and manual member count.
Group Ownership Transfer: primary group owners can now initiate a transfer of ownership to another user via their profile code from the Edit Group modal (نقل الملكية section). The sender optionally keeps themselves as a co-owner after transfer. The transfer is a two-step flow: sender creates a pending request (7-day expiry), recipient accepts or rejects from a new "طلبات نقل الملكية" section on their profile page. On acceptance: `groups.owner_id` is updated, the new owner is removed from `group_owners` if they were a co-owner, and the old owner is optionally inserted as a co-owner. New `group_transfer_requests` table with RLS; API routes at `/api/transfer-group-ownership` (GET pending / POST create) and `/api/transfer-group-ownership/[id]` (PATCH accept/reject/cancel).
Group Co-Ownership: group owners can now invite co-owners by profile code from the Edit Group modal (المشرفون المشتركون section). Co-owners get full management access (members, progress, invites, messages, group settings) except they cannot delete the group. New `group_owners` table; `current_user_owns_group()` updated to include co-owners; all ownership-gated RLS policies now use the helper. Co-owned groups appear in the dashboard with a "مشرف مشارك" badge. API route at `/api/group-coowners` (GET list + POST add by profile code); removal is direct client-side via RLS.
Member add/edit forms now use the same EmojiPicker component as groups (popover grid of 50 emojis + custom input), replacing the old flat inline grid. EmojiPicker extracted to a shared component at components/ui/EmojiPicker.tsx.
Groups tab: group cards now show metadata chips (location, family flag, age group, level, type tags, schedule) below the description; group detail view replaces the plain description line with a styled info card showing all metadata as teal/gold chips.
Group modals UX improvements: emoji field replaced with a picker (grid of 30 preset emojis + custom input); info tooltip added beside the "مجموعة عامة" toggle explaining public visibility; info tooltip added beside the "أضف نفسي كعضو" toggle explaining its purpose. Both create and edit modals updated.
Create group modal now includes the "معلومات المجموعة (اختياري)" section (country, city, schedule, age group, level, group type tags, family group toggle) matching the edit group modal. Both modals are now scrollable for small screens.
Fix login: server action + captcha instant render. `signInWithPassword` moved to a Server Action (`actions.ts`) so Supabase sets the session cookie in the HTTP response before the redirect, eliminating the middleware bounce-back-to-login bug. MathCaptcha switched from `useState(null)` + `useEffect` to `useState(() => makeNums())` so the math question renders immediately with no "..."/`؟` flash. PWA splash screen updated to show both "آيات الأرقم" and "AyyatAlArqam" labels.
Group Rich Profiles: added 7 nullable metadata columns to the `groups` table (country, city, schedule, age_group, level, group_type[], is_family_group). EditGroupModal gains a "معلومات المجموعة" section with inputs for all new fields. Group public profile page (`/groups/[slug]`) displays metadata as teal chips (family flag, age group, level, type tags, location) and a schedule line. Groups search page (`/groups`) adds three filter dropdowns (age group, level, type) that narrow the live results.
SEO: Arabic keyword optimization across all public pages. Wove target keywords (تتبع حفظ القرآن، برنامج تحفيظ القرآن، حلقات التحفيظ، متابعة حفظ القرآن، العائلات والحلقات) naturally into meta descriptions, OG descriptions, and the landing page hero text (ar.json). Updated root layout, about, guide, groups, compare, and login pages.
SEO: per-page metadata across all public pages. Added `title` (short form, template-aware), `description` (150-char compelling Arabic), `openGraph`, and `alternates.canonical` to About, Guide, Contact, Privacy, Terms, Groups, Compare, Login, Reset-password, and Sitemap pages. Fixed title template separator from `|` to `—` to match existing style. Homepage gains its own `canonical` tag.
SEO: professional Google search result. Added `metadataBase` so OG image URLs resolve correctly; upgraded meta `description` to a compelling 150-char Arabic sentence (was a short cryptic Hadith fragment Google was ignoring); added full `openGraph` block (title, description, siteName, image, locale, type) and `twitter` card; expanded `icons` to explicitly list favicon.ico + 96/192px PNGs so Google picks up the logo; created `app/sitemap.ts` (generates `/sitemap.xml`) and `app/robots.ts` (generates `/robots.txt` with disallow for private routes + sitemap pointer); added JSON-LD `WebSite` schema with `SearchAction` to the landing page for rich results.
PWA title fix: rename app from "آيات" / "آيات الأرقم" to "AyyatAlArqam" across all PWA surfaces. Updated `name` and `short_name` in `manifest.ts`, `metadata.title` and `appleWebApp.title` in root layout, and the in-page JS splash text; bumped service worker cache to `ayyat-v7` so existing installs pick up the new manifest on next visit.
Add `AyyatApp.md`: complete, detailed plan for a native iOS + Android mobile app. Recommends React Native + Expo + Supabase JS, reusing the existing Supabase backend untouched (RLS as the security boundary) and porting the brand design system, fonts, Quran data, types, and i18n from the web repo. Covers the tech-stack decision (vs. Flutter/native/PWA/Capacitor), architecture, a full feature-parity map, offline-first memorization via a write outbox, push notifications (additive `device_tokens` table + `notify-group` Edge Function + DB webhook), RTL handling, navigation/screen map (phone tabs / tablet master-detail), auth incl. Sign in with Apple for store compliance, EAS build/submit + store requirements, testing, security, a 6-phase ~3–3.5-month roadmap, costs, risks, and open decisions. Planning doc only — no app code.
Fix PWA cold-launch black screen. The installed app's `start_url` was `/`, so every launch redirected `/` → `/dashboard` (auth round-trip) and then server-rendered the dashboard (second auth round-trip + ~5 Supabase queries) before any HTML painted — a multi-second blank/black webview. New lightweight `/launch` entry point (`app/launch/`) does zero server work, so its cream splash HTML arrives almost instantly, then it client-redirects to `/dashboard`; `manifest.ts` `start_url` now points there (with explicit `scope: '/'`). Also replaced the invalid iOS `startupImage` (a 180×180 icon, which iOS silently ignored → black launch) with properly-sized cream launch images per iPhone class under `public/icons/splash/`, wired via `appleWebApp.startupImage` media queries. Note: Android re-reads the manifest automatically; iOS only picks up the new `start_url`/splash images after the PWA is removed and re-added to the home screen.
Performance: faster landing page + PWA launch. Landing page (`/`) homepage counters now come from a cross-request cache (`getLandingStats` via `unstable_cache`, revalidated every 10 min) instead of running ~5 DB queries — including a full scan of the `progress` table to sum ayahs — on every visit; removed the redundant `supabase.auth.getUser()` from the landing page (middleware already redirects logged-in users away from `/`). Service worker bumped to `ayyat-v6` and now serves immutable, content-hashed `/_next/static/` build assets (JS/CSS/fonts) cache-first in production — repeat PWA launches load the app shell from cache instead of re-downloading megabytes of JS (navigation/RSC requests still pass through to the network, dev origins excluded so hashed-filename reuse can't serve stale chunks). Dashboard server fetch collapses the query waterfall: ribbon/social/profile fold into the first parallel batch, and the linked-groups fetch runs in parallel with the own-member inference. Dropped the unused IBM Plex Sans Arabic weight 300 (one fewer preloaded font file).
Dashboard group/member improvements: "أضف نفسي كعضو" toggle in CreateGroupModal auto-creates a member named after the owner's display name and links it via member_access so owners can track their own progress immediately (own-member id wired live into state on creation); two-step delete confirmation in EditGroupModal (warning → "ستُفقد جميع البيانات نهائياً — اضغط للتأكيد"); Shaikh group creation limit raised 5→6 (GROUP_LIMITS + profile role description); group activity feed now reads from append-only progress_activity table (ordered by created_at) instead of progress, with an activity row inserted on every member progress save in GroupsView; improved owner own-member inference in dashboard page (excludes members claimed by other users, falls back to most recent activity); added AboutAyyatAlArqam.md project overview doc