Tuhfah is a comprehensive information and management system built for Islamic Education Parks (Taman Pendidikan Al-Qur'an / TPQ) and Islamic Education Centers (Taman Pendidikan Agama / TPA). It provides a unified platform for administrators, teachers, and student guardians to manage every aspect of institution operations — from student registration and attendance to financial payments and learning progress reports.
Tuhfah (تُحْفَة) is an Arabic word meaning gift or masterpiece — reflecting the goal of delivering an exceptional tool to support Islamic education.
Five distinct roles with scoped permissions: Owner, Headmaster, Administrator, Teacher, and Student Guardian. Each role sees only what they need.
Register and manage student profiles including personal details, gender, enrollment status, and guardian assignment. Student IDs are auto-generated using the Hijri calendar for a culturally relevant identifier.
Teachers record subject-by-subject milestones with optional scores and notes. Progress is visualized through interactive charts (ApexCharts). Guardians are notified when a new record is saved for their child.
Administrators can draft and publish announcements scoped as Public (visible on the welcome page without login) or Internal (visible only to authenticated users). Drafts can be scheduled or published immediately.
In-app notification bell with unread badge. Notifications are dispatched for:
Users can opt out of email delivery per their profile preferences.
Track institution assets with full condition monitoring (Good / Damaged / Lost). Administrators can log usage and disposal events, each of which decrements stock automatically. Full usage history is retained per item.
Generate and export three report types:
All reports are exportable as XLSX or PDF. Teachers can access progress reports scoped to their own students only.
| Layer | Technology |
|---|---|
| Backend | PHP 8.2+, Laravel 11 |
| Database | MySQL (production), SQLite in-memory (tests) |
| Frontend | Bootstrap 5, jQuery, ApexCharts |
| Auth | Laravel Breeze (session-based) |
| Payments | Midtrans (Snap) |
| Excel Export | Maatwebsite Laravel Excel |
| PDF Export | barryvdh/laravel-dompdf |
| DataTables | Yajra Laravel DataTables |
| Hijri Calendar | pharaonic/laravel-hijri |
| Testing | PHPUnit 11, 400+ tests |
1. Clone the repository
git clone [email protected]:404NotFoundIndonesia/tuhfah-webapp.git
cd tuhfah-webapp
2. Run the setup script
composer setup
This single command installs dependencies, copies .env.example to .env, generates the application key, caches config, runs migrations, and links storage.
3. Configure your environment
Open .env and set your database credentials and any third-party service keys:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=tuhfah
DB_USERNAME=root
DB_PASSWORD=
# Midtrans payment gateway (optional)
MIDTRANS_SERVER_KEY=
MIDTRANS_CLIENT_KEY=
MIDTRANS_IS_PRODUCTION=false
4. Start the development server
php artisan serve
Open http://localhost:8000 in your browser.
The test suite uses an in-memory SQLite database — no separate database setup required.
php artisan test
Expected output: 407 tests, 710 assertions, 0 failures.
Register the scheduler in your server's cron to enable automatic overdue detection:
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
The payments:mark-overdue command runs daily and transitions eligible unpaid payments to Overdue, dispatching notifications to guardians and administrators.
app/
├── Console/Commands/ # MarkOverduePayments
├── Enum/ # Role, AttendanceStatus, PaymentStatus, AnnouncementScope, ItemCondition, ...
├── Exports/ # PaymentExport, HonorariumExport, AttendanceReportExport, FinanceReportExport (XLSX + PDF)
├── Http/Controllers/ # Feature controllers per domain
├── Models/ # Eloquent models
├── Notifications/ # StudentAbsent, PaymentOverdue, NewLearningProgress
└── Services/ # AttendanceService, DashboardService, PaymentGatewayService
Tuhfah Web Application is open-source software licensed under the MIT License.