A comprehensive Laravel web application for Muslims to track their spiritual journey, featuring prayer times calculation using astronomical formulas, Quran progress tracking, and community leaderboards.
- Accurate prayer times calculated using astronomical formulas (solar longitude, declination, sidereal time)
- Real-time Julian day and calendar handling
- Multiple calculation methods: Muslim World League, Egyptian, Karachi, Dubai, etc.
- Madhab support: Shafi and Hanafi
- Forbidden prayer times (Makruh times) detection
- Prayer completion tracking with points system
- Prayer streaks and quality tracking (on-time, congregation, mosque)
- Automatic timezone detection and location-based calculations
- Complete Quran: All 114 surahs with Al-Fatiha verses fully implemented
- 6,236 verses with Arabic text, transliteration, and English/Bengali translations
- Progress tracking: Mark verses as read, understood, and memorized
- Spaced repetition system for memorization review with difficulty levels
- Advanced search functionality across Arabic text, English translation, and transliteration
- Surah-wise progress visualization with completion percentages
- Points system: Reading (1pt), Understanding (2pts), Memorization (5pts)
- JSON-based verse storage for efficient data management
- Authentic hadith collections: Sahih al-Bukhari, Sahih Muslim, and more
- Chapter-wise organization with sections and proper categorization
- Arabic text with English translations and chain of narrators (Isnad)
- Search and filter functionality by collection, chapter, grade, and text
- Progress tracking for hadith study (read, memorized status)
- Grade verification: Sahih (Authentic), Hasan (Good), Daif (Weak)
- CSV import system for large hadith databases
- Comprehensive leaderboards for points, Quran progress, prayer completion, and streaks
- Achievement system: Reading (1pt), Understanding (2pts), Memorization (5pts), Prayers (10-30pts)
- Daily goals and progress tracking with visual indicators
- User statistics with detailed breakdowns by category
- Community ranking and motivation features
Based on "Astronomical Algorithms" by Jean Meeus:
- Solar longitude and declination
- Apparent sidereal time calculation
- Nutation in longitude and obliquity
- Julian day and century calculations
- Solar coordinates and time equations
- XAMPP with PHP 8.2+ and MySQL
- Composer (PHP package manager)
-
Clone/Download the project
# If you have git: git clone https://github.com/Red1-Rahman/muslim-buddy.git # Or extract the downloaded ZIP file
-
Navigate to project directory
cd muslim-buddy-laravel -
Install Composer dependencies
# Download Composer if not installed: https://getcomposer.org/download/ composer install -
Setup environment
# Copy environment file copy .env.example .env # Generate application key php artisan key:generate
-
Configure database
- Start XAMPP (Apache & MySQL)
- Open phpMyAdmin (http://localhost/phpmyadmin)
- Create database named
muslim_buddy - Update
.envfile with your database credentials:
DB_DATABASE=muslim_buddy DB_USERNAME=root DB_PASSWORD=
-
Run migrations and seeders
# Run database migrations php artisan migrate # Seed basic data (surahs, collections, sample data) php artisan db:seed --class=SurahSeeder php artisan db:seed --class=AlFatihaVerseSeeder php artisan db:seed --class=TestHadithSeeder php artisan db:seed --class=BukhariChapter2Seeder # Or run all seeders at once php artisan db:seed
-
Start the application
# Start Laravel development server php artisan serve --host=0.0.0.0 --port=8000 -
Access the application
- Open browser and go to:
http://localhost:8000 - Register a new account or login
- Open browser and go to:
- Go to Profile settings
- Enter your latitude and longitude
- Choose calculation method and madhab
- Prayer times will be calculated for your location
- Dhaka, Bangladesh: 23.8103Β°N, 90.4125Β°E
- Mecca, Saudi Arabia: 21.4225Β°N, 39.8262Β°E
- Palestine (Jerusalem): 31.7683Β°N, 35.2137Β°E
- Sudan (Khartoum): 15.5007Β°N, 32.5599Β°E
- Congo (Kinshasa): -4.4419Β°S, 15.2663Β°E
- View Today's Prayers: Go to Prayers section
- Mark Complete: Click on prayer name to mark as completed
- Quality Tracking: Mark if prayer was on-time, in congregation, or at mosque
- View Statistics: Track your prayer completion rates and streaks
- Browse Surahs: View all 114 chapters with progress indicators
- Read Verses: Click on any surah to start reading with Arabic text and translations
- Track Progress: Mark verses as read, understood, or memorized
- Review System: Use spaced repetition to review memorized verses
- Easy: Normal intervals (1, 3, 7, 14, 30, 60 days)
- Medium: Shortened intervals for challenging verses
- Hard: Reset to 1 day for forgotten verses
- Search: Find specific verses using Arabic text, English translation, or transliteration
- Statistics: View detailed progress by surah, juz, and overall completion
- Browse Collections: Access authentic hadith collections (Bukhari, Muslim, etc.)
- Chapter Navigation: Browse by chapters and sections within collections
- Read Hadiths: View Arabic text with English translations and chain of narrators
- Filter & Search: Find hadiths by text, grade (Sahih/Hasan/Daif), or collection
- Track Progress: Mark hadiths as read or memorized
- Verification: See authenticity grades and collection verification status
- Overall Rankings: View top performers by total points
- Category Rankings: Filter by Quran progress, prayers, or streaks
- Time Periods: View all-time, monthly, or weekly leaders
- Your Rank: See where you stand in the community
The application implements precise Islamic prayer time calculations using:
- Meeus algorithms for solar position
- Geographic coordinates for location-specific times
- Various calculation methods following different Islamic authorities
- High latitude adjustments for polar regions
- Real-time Julian day calculations
- Users: Profile, location, preferences, points, streaks
- Surahs: All 114 chapters with metadata (names, verse counts, revelation type)
- Verses: Complete Quran with Arabic text, translations, transliteration
- User Verse Progress: Reading, understanding, memorization tracking with spaced repetition
- Hadith Collections: Major authentic collections with verification status
- Hadith Chapters & Sections: Organized structure for hadith navigation
- Hadiths: Full hadith texts with Arabic, English, Isnad, and authenticity grades
- User Hadith Progress: Study tracking for hadith collections
- Prayer Logs: Daily prayer completion records
- Daily Goals: Target setting and achievement tracking
POST /api/prayer-times - Get prayer times for coordinates
GET /api/user - Get authenticated user details (requires authentication)
muslim-buddy-laravel/
βββ app/
β βββ Http/Controllers/ # Web controllers (Quran, Prayer, Hadith, User)
β βββ Models/ # Eloquent models (User, Verse, Hadith, Progress)
β βββ Services/
β βββ Astronomy/ # Astronomical calculations
β βββ Prayer/ # Prayer time calculations
βββ database/
β βββ migrations/ # Database schema (users, verses, hadiths, progress)
β βββ seeders/ # Data seeders (Quran, hadiths, sample data)
βββ resources/
β βββ views/ # Blade templates (quran, hadith, prayer, auth)
β βββ data/ # JSON files (Al-Fatiha verses, surah data)
βββ routes/ # Web and API routes
βββ public/ # Assets and entry point
- Astronomical: Core astronomical calculations for accurate prayer times
- SolarTime: Solar position and time calculations using Meeus algorithms
- PrayerTimes: Islamic prayer time calculator with multiple methods
- CalculationMethod: Various Islamic calculation methods (MWL, Egyptian, Karachi, etc.)
- UserVerseProgress: Spaced repetition system for Quran memorization
- HadithController: Comprehensive hadith browsing and study system
The application can be deployed for free on several platforms:
-
Railway (Recommended)
- Excellent Laravel support
- Automatic deployments from GitHub
- Includes PostgreSQL database
- 500 hours/month + $5 credit
-
Vercel
- Great performance and GitHub integration
- Requires external database (PlanetScale)
- Unlimited personal projects
-
Heroku
- Popular choice for Laravel apps
- Low-cost options starting at $5-7/month
- PostgreSQL add-on available
-
Prepare for production
# Set environment variables APP_ENV=production APP_DEBUG=false # Optimize application php artisan config:cache php artisan route:cache php artisan view:cache
-
Database setup
- Run migrations:
php artisan migrate --force - Seed essential data:
php artisan db:seed --force
- Run migrations:
-
Configure environment variables on your hosting platform:
- Database credentials
- App key and URL
- Any third-party service keys
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Phase 1: Core Features β Completed
- β Prayer time calculations with astronomical accuracy
- β Complete Quran (114 surahs) with progress tracking
- β Al-Fatiha verses with Arabic text, translation, transliteration
- β Spaced repetition system for memorization
- β Hadith collections (Bukhari Chapter 2 implemented)
- β User authentication and progress tracking
- β Responsive UI with Islamic design elements
Phase 2: Data Expansion π In Progress
- π Populating remaining 113 surah JSON files
- π Expanding hadith collections (Muslim, Tirmidhi, etc.)
- π Adding more language translations
Phase 3: Advanced Features π Planned
- π Mobile app companion
- π Offline functionality
- π Community features and discussions
- π Advanced analytics and insights
This project is open-sourced under the MIT License.
Redwan Rahman
- GitHub: Red1-Rahman
- Islamic astronomy and prayer time calculation specialist
- Full-stack Laravel developer
- Jean Meeus - "Astronomical Algorithms" book
- Islamic Society of North America - Prayer time calculation methods
- Quran.com - Quranic text and translations
- Laravel Community - Framework and packages
May Allah accept our efforts and make this application beneficial for the Muslim community. Ameen.
"And establish prayer and give zakah and bow with those who bow [in worship and obedience]." - Quran 2:43