Skip to content

Aplikasi jam masjid digital yang modern dan responsif dengan sistem database-less menggunakan Next.js 15, TypeScript, dan Tailwind CSS.

Notifications You must be signed in to change notification settings

sonarta/jam-masjid

Repository files navigation

πŸ•Œ Ψ³Ψ§ΨΉΨ© Ψ§Ω„Ω…Ψ³Ψ¬Ψ―

Aplikasi jam masjid digital yang modern dan responsif dengan sistem database-less menggunakan Next.js 15, TypeScript, dan Tailwind CSS.

✨ Fitur Utama

πŸ• Waktu Shalat Otomatis

  • Integrasi dengan MyQuran API v2 untuk jadwal shalat akurat
  • Auto-refresh jadwal setiap tengah malam
  • Sistem notifikasi adzan dengan countdown real-time
  • Toleransi waktu 1 menit untuk akurasi
  • Fallback data offline jika API tidak tersedia

πŸ“± Interface Modern

  • Design responsif untuk berbagai ukuran layar
  • Dark theme dengan warna hijau Islamic
  • Live streaming Masjidil Haram (opsional)
  • Animasi smooth dan loading states

πŸ”§ Admin Panel

  • Konfigurasi informasi masjid
  • Manajemen pengumuman/kajian
  • Sistem autentikasi sederhana
  • Update real-time tanpa refresh

πŸ’Ύ Database-less Architecture

  • Data disimpan di localStorage + file JSON
  • Tidak memerlukan database server
  • Backup otomatis ke file sistem
  • Sync data antar tab browser

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • npm atau yarn

Installation

# Clone repository
git clone <repository-url>
cd jam-masjid

# Install dependencies
npm install

# Jalankan development server
npm run dev

# Buka browser di http://localhost:3000

Build untuk Production

npm run build
npm start

πŸ“ Struktur Project

jam-masjid/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ components/          # Komponen UI reusable
β”‚   β”œβ”€β”€ services/           # Business logic & API calls
β”‚   β”œβ”€β”€ hooks/              # Custom React hooks
β”‚   β”œβ”€β”€ types/              # TypeScript type definitions
β”‚   β”œβ”€β”€ admin/              # Admin panel pages
β”‚   β”œβ”€β”€ prayer/             # Halaman adzan
β”‚   └── api/                # API routes
β”œβ”€β”€ public/
β”‚   └── data/               # File JSON untuk data storage
β”œβ”€β”€ components/             # Global UI components
└── lib/                    # Utility functions

πŸ”§ Konfigurasi

Data Masjid

Edit file public/data/mosque-config.json:

{
  "mosque": {
    "name": "Nama Masjid",
    "location": "Lokasi Masjid", 
    "cityCode": "0506",
    "liveStream": {
      "url": "https://youtube.com/embed/...",
      "title": "Live Stream Title",
      "autoplay": true,
      "muted": false
    }
  },
  "settings": {
    "announcements": [...],
    "prayerTimeAdjustments": {...}
  }
}

City Code

Dapatkan city code dari MyQuran API

πŸ› οΈ Teknologi

  • Framework: Next.js 15 (App Router)
  • Language: TypeScript
  • Styling: Tailwind CSS
  • UI Components: Radix UI
  • API: MyQuran API v2
  • Storage: localStorage + JSON files
  • Authentication: Cookie-based

πŸ“Š Fitur Teknis

Error Handling

  • βœ… Retry mechanism (3 attempts) untuk API calls
  • βœ… Fallback ke data offline jika API gagal
  • βœ… Graceful degradation untuk semua fitur
  • βœ… Network status detection

Performance

  • βœ… Dynamic interval checking untuk efisiensi
  • βœ… Lazy loading untuk komponen berat
  • βœ… Optimized bundle size
  • βœ… Static generation untuk halaman statis

Security

  • βœ… Input validation dengan Zod
  • βœ… XSS protection
  • βœ… Secure cookie handling
  • βœ… Environment variable protection

πŸ” Admin Access

  1. Buka /admin/login
  2. Default credentials (ubah di production):
    • Username: admin
    • Password: admin123

πŸ“± Responsive Design

  • Desktop: Layout 2 kolom dengan live stream
  • Tablet: Layout adaptif dengan grid responsif
  • Mobile: Layout 1 kolom dengan navigasi touch-friendly

🌐 API Integration

MyQuran API v2

  • Endpoint: https://api.myquran.com/v2/sholat/
  • Features: Jadwal shalat, pencarian kota
  • Fallback: Data statis jika API down

πŸš€ Deployment

Vercel (Recommended)

npm run build
# Deploy ke Vercel

Manual Server

npm run build
npm start
# Aplikasi berjalan di port 3000

πŸ”„ Update & Maintenance

Update Jadwal Shalat

  • Otomatis update setiap tengah malam
  • Manual refresh melalui admin panel
  • Fallback ke data lokal jika API gagal

Backup Data

  • Data tersimpan di public/data/
  • Backup otomatis ke localStorage
  • Export/import melalui admin panel

πŸ› Troubleshooting

API Tidak Tersedia

  • Aplikasi akan menggunakan data fallback
  • Indikator "Offline" muncul di header
  • Data terakhir tetap tersimpan

Waktu Tidak Akurat

  • Cek koneksi internet
  • Verifikasi city code di config
  • Restart aplikasi jika perlu

πŸ“„ License

MIT License - Bebas digunakan untuk keperluan masjid dan dakwah.

🀝 Contributing

  1. Fork repository
  2. Buat feature branch
  3. Commit changes
  4. Push ke branch
  5. Buat Pull Request

πŸ“ž Support

Untuk pertanyaan dan dukungan, silakan buat issue di repository ini.


Dibuat dengan ❀️ untuk kemudahan ibadah umat Islam

About

Aplikasi jam masjid digital yang modern dan responsif dengan sistem database-less menggunakan Next.js 15, TypeScript, dan Tailwind CSS.

Resources

Stars

Watchers

Forks

Packages

No packages published