TryRamadan.app — Expected Outline
This document outlines the structure, features, and expected behavior of the TryRamadan application.
Name: TryRamadan.app
Purpose: A web app for experiencing Ramadan-style fasting (dawn to sunset), aimed at both Muslims and non-Muslims. It provides prayer times, fasting timer, meal planning, daily missions, culture/recipes, and learning content.
Stack: React 18, TypeScript, Vite, React Router, Tailwind CSS, Radix UI (shadcn/ui), Framer Motion, TanStack Query. PWA support via vite-plugin-pwa.
Path
Page
Description
/
Index
Landing: hero, features, mission, CTA
/culture
Culture
Country list for Ramadan traditions
/culture/:countryId
CultureCountry
Country traditions, mosques, map links, SEO
/recipes
Recipes
Suhoor & Iftar recipe list
/recipe/:mealType/:id
RecipeDetail
Single recipe with ingredients and steps
/programs
Programs
Fasting programs (e.g. Full Ramadan)
/guides
Guides
List of user guides
/guides/:slug
GuidePage
Single guide
/personas
Personas
User personas/journeys
/personas/:slug
PersonaPage
Single persona
/health-safety
HealthSafety
When to break fast, contraindications
/faq
FAQ
Frequently asked questions
/emergency
Emergency
Break fast + medical/resources
/terms
Terms
Terms of use
/legal
Legal
Legal info
/privacy
Privacy
Privacy policy
Onboarding (required before dashboard)
Path
Page
Description
/onboarding
OnboardingLayout
Wrapper with steps
/onboarding/welcome
OnboardingWelcome
Welcome
/onboarding/mode
OnboardingMode
New / Muslim
/onboarding/knowledge
OnboardingKnowledge
Five Pillars question
/onboarding/health
OnboardingHealth
Health screening
/onboarding/location
OnboardingLocation
City + auto-detect (required)
/onboarding/schedule
OnboardingSchedule
Fasting schedule (Full Ramadan only)
/onboarding/notifications
OnboardingNotifications
Reminders
/onboarding/priorities
OnboardingPriorities
Learning, culture, Quran, macros
/onboarding/goals
OnboardingGoals
Goals until Ramadan
Dashboard (post-onboarding)
Path
Page
Description
/dashboard
Dashboard
Main hub: timer, I'm fasting / Break my fast, schedule strip, timeline, missions, day plan, quick access
/dashboard/today
DashboardToday
Today's fast status, timer, Suhoor/Iftar countdowns, hydration, mark complete / break fast
/dashboard/schedule
DashboardSchedule
Calendar, daily goals, quick actions, export .ics, day detail (notes, events, meal plan, food log, macros), timeline
/dashboard/prayers
DashboardPrayers
Prayer times, Hijri date, per-prayer notifications, Adhan section
/dashboard/meals
DashboardMeals
Suhoor/Iftar recipes, add to today's schedule
/dashboard/learn
DashboardLearn
Daily fact, hadith, quiz, links
/dashboard/progress
DashboardProgress
Progress ring, streak, completed days, hours fasted
/dashboard/culture
DashboardCulture
Culture overview
/dashboard/health
DashboardHealth
Wellness, symptoms
/dashboard/journal
DashboardJournal
Journal entries
/dashboard/achievements
DashboardAchievements
Badges / achievements
/dashboard/goals
DashboardGoals
Goals until Ramadan
/dashboard/quran
DashboardQuran
Quran link
/dashboard/macros
DashboardMacros
Macro tracker
/dashboard/glossary
LearnGlossary
Glossary terms
Path
Page
Description
/learn/glossary
LearnGlossary
Same as dashboard glossary
/learn/hadith
LearnHadith
Hadith collection (marks “read hadith” for daily missions)
Path
Page
Description
/settings
Settings
Preferences, location, notifications, theme
*
NotFound
404 page
FastingTimer — Countdown to Suhoor end or Iftar; shows Eating period / Fasting period with tooltips.
TodayScheduleTimeline — Today's key times: Imsak, Fajr, Dhuhr, Asr, Maghrib (Iftar), Isha, optional Taraweeh.
DailyMissionsCard — Today's missions (start fasting, complete/break fast, log Suhoor/Iftar, add note, read hadith) with completion and tooltips.
BreakFastReasonDialog — Reason picker when user breaks fast early.
ProgressRing — Ring with center label (e.g. days completed) and sublabel.
Navbar — App nav; shows “You're fasting” when applicable.
Footer — Links (Emergency, Health, Guides, FAQ, Legal, Privacy).
GoalsUntilRamadanCard — Countdown / Ramadan Mubarak + goals list; tooltips for Ramadan, goals, greeting.
SunnahFastingBadge — Badge for Sunnah day (Mon/Thu) or Ayyam al-Beed; tooltips for Sunnah / Ayyam al-Beed.
PrayerLocationBadge — Current location; click to update.
LocationSearch / LocationDisplay — Search and display for city/coords.
AdhanScheduler — Schedules adhan at prayer times when permission granted.
ReminderScheduler — Suhoor/Iftar and optional prayer reminders.
DailyHadith — Daily hadith snippet.
ArabicHover / ArabicTerm — Arabic text with hover/term behavior.
PageSEO — Per-page meta title/description.
PWAInstallBanner — Prompt to install PWA when applicable.
FastingBottomBar — Bottom bar (e.g. quick nav) when used.
Tooltip , Button , Card , Dialog , Select , Input , Switch , Tabs , etc. under src/components/ui/.
File
Purpose
eating-times-tooltips.ts
Tooltips for Suhoor, Iftar, Fajr, Maghrib, Dhuhr, Asr, Isha, Imsak, cut-off, break fast, etc.
general-tooltips.ts
Tooltips for Ramadan, Sunnah, Taraweeh, Laylat al-Qadr, Adhan, I'm fasting, Break my fast, Mark complete, fasting/eating period, goals, Ramadan Mubarak, Ayyam al-Beed, today's missions, Hijri date, prayer times.
cultural-traditions.json
Country traditions, foods, mosques (with addresses/map links).
daily-facts.json
Daily Ramadan facts.
hadiths.json
Hadith list by topic.
glossary.json
Terms (Sawm, Suhoor, Iftar, Ramadan, etc.) with Arabic and definitions.
guides.ts
Guide slugs, titles, steps, quick links.
recipes.json
Suhoor/Iftar recipes with nutrition.
ramadan-info.json
Ramadan-related info.
fasting-programs.json
Fasting program definitions.
personas.json
User personas and journeys.
cities.json
Cities for location search.
languages-and-countries.ts
Languages and country/region options (e.g. for Settings).
5. Hooks & state (localStorage)
useUserPreferences — Theme, location, onboarding complete, mode (new/muslim), priorities, macro tracking, etc.
useFastingProgress — completedDays, fastingLog (startedAt, completedAt, status, brokenReason), sunnahDaysCompleted.
useDailyMissions — Derives today's missions and completion from progress, meal plans, food log, schedule notes, hadith-viewed dates.
useDayMealPlans / useDayNutrition / useDayFoodLog — Per-day meal plan, nutrition, food log.
useCalendarEvents — Per-day events for .ics export.
useDailyGoals — Daily calorie/macro goals.
useDashboardQuickActions — Order of dashboard quick-access links.
usePrayerTimes / usePrayerTimesForDate — Prayer times for location and date.
useIftarLabel / useIftarLabelShort — “Iftar” vs “Breaking Fast (Iftar)” by user mode.
useHadithViewedDates / markHadithViewedToday — Used for “Read one hadith” mission.
Schedule notes — tryramadan-schedule-notes (per-day notes).
6. Features (expected behavior)
I'm fasting — Shown when user has not started fasting today; tap to log “fasting started.” Hidden or disabled once fasting today or day complete.
Break my fast — Shown only when user is fasting today; opens reason dialog and logs break. Not shown when not fasting.
Mark complete — Logs “completed dawn–sunset fast” for the day; tooltip explains meaning.
Fasting period / Eating period — Determined by current time vs Fajr/Maghrib; timer shows countdown to Suhoor end (cut-off) or Iftar; tooltips explain.
Today's schedule — Dashboard shows strip (Suhoor end, Iftar, Fajr, Maghrib) and TodayScheduleTimeline (full day order). Schedule page shows same timeline for selected day.
Calendar — Month view with Ramadan days, Sunnah days, Laylat al-Qadr, completed, notes, journal, meal plan indicators.
Export .ics — Month, next 30 days, or Ramadan range; includes prayers and custom events.
Six missions: Start fasting, Complete or break fast at Iftar, Log Suhoor, Log Iftar, Add a note for today, Read one hadith.
Completion is derived from progress, meal plans, food log, schedule notes, hadith-viewed dates.
Each mission has a tooltip explaining the step; “Read one hadith” is marked when user visits Learn Hadith page.
Tooltips (non-Muslim friendly)
FastingTimer — Eating period, Fasting period, time-until labels.
Dashboard — Currently fasting / Not fasting, Mark complete.
DailyMissionsCard — Section title and per-mission tips.
DashboardPrayers — Prayer Times title, Hijri date, each prayer name (Fajr, Sunrise, Dhuhr, Asr, Maghrib, Isha), Adhan section.
DashboardSchedule — Ramadan, Sunnah, Laylat al-Qadr (and legend).
DashboardToday — Today's fast, You fasted today, You broke your fast, I fasted today — mark complete, I broke my fast.
SunnahFastingBadge — Sunnah badge, Ayyam al-Beed.
GoalsUntilRamadanCard — Goals until Ramadan, Ramadan Mubarak, days until Ramadan.
Eating-times and general-tooltips — Reused across components for consistency.
Required at onboarding — User must set city or use auto-detect to continue.
Prayer times — From coordinates (Aladhan API or similar); used for timer, schedule, and prayers page.
Muslim mode — “Iftar” / “iftar.”
Non-Muslim mode — “Breaking Fast (Iftar)” / “breaking fast” (or similar) for clarity.
No green-on-green text; primary contrast and muted text used for readability in light/dark theme.
Buttons/labels use clear touch targets and cursor-pointer where appropriate.
Key terms have tooltips; Arabic shown where relevant (e.g. in tooltips).
Vitest — Unit and component tests in src/test/ (e.g. routes, accessibility, main features, user flow, culture data, links, adhan).
Expected: All tests pass; dashboard, schedule, today, prayers, missions, and tooltips behave as described above.
Install: npm install
Dev: npm run dev
Build: npm run build
Preview: npm preview
Test: npm test or npm run test -- --run
TryRamadan is a React + TypeScript PWA that supports:
Onboarding — Mode, knowledge, health, required location, schedule (Full Ramadan), notifications, priorities, goals.
Dashboard — Fasting timer, I'm fasting / Break my fast (only when relevant), today's schedule strip + timeline, daily missions, day plan, quick access.
Schedule — Calendar, daily goals, export .ics, per-day notes/events/meal plan/food log/macros, today's timeline for selected day.
Prayers — Prayer times, Hijri date, per-prayer notifications, Adhan section with tooltips.
Today — Today's fast status, mark complete / break fast (break fast only when fasting today), countdowns, hydration.
Missions — Six daily missions with tooltips and completion derived from app state.
Tooltips — Widespread use of eating-times and general-tooltips so terms (Suhoor, Iftar, Ramadan, Sunnah, etc.) are clear to non-Muslims.
Culture, recipes, guides, emergency, health, legal — As per routes and data above.
This file serves as the single expected outline for structure, routes, components, data, behavior, and testing.
10. Verification checklist
Use this to verify the app against expected.md (e.g. after changes):
Check
How to verify
Routes
All paths in §2 exist in src/App.tsx and render the listed page component.
Onboarding order
welcome → mode → knowledge → health → location → schedule → notifications → priorities → goals (see App.tsx and each step’s Back/Continue targets).
Data files
All files in §4 exist: src/data/* for tooltips, JSON, guides; cities.json at project root (used for location/culture).
Daily missions
Six missions: Start fasting, Complete/break at Iftar, Log Suhoor, Log Iftar, Add note, Read one hadith (getDailyMissions in useLocalStorage.ts).
Location required
Onboarding location step: Continue disabled until a location is selected or detected (OnboardingLocation.tsx).
Tests
npm test -- --run — all tests pass.
Build
npm run build — succeeds.