Skip to main content

Core Types

Reciter

Represents a Quran reciter with associated moshaf and metadata. Location: src/types/reciter.ts:13
id
number
required
Unique identifier for the reciter
name
string
required
Reciter’s name (usually in Arabic)
moshaf
Moshaf
required
The moshaf (recitation) associated with this reciter
source
LinkSource
required
Origin of the audio files (MP3QURAN, ISLAMHOUSE, etc.)
type Reciter = {
  id: number;
  name: string;
  moshaf: Moshaf;
  source: LinkSource;
};

Moshaf

Represents a complete Quran recitation (moshaf) with playlist information. Location: src/types/reciter.ts:3
id
string
required
Unique identifier for the moshaf
name
string
required
Name/description of the moshaf
riwaya
Riwaya
required
Quranic reading tradition (Hafs, Warsh, etc.)
server
string
required
Base URL for audio files
surah_total
string
required
Total number of surahs available (usually “114”)
playlist
Playlist
required
Array of playlist items with links to audio files
type Moshaf = {
  id: string;
  name: string;
  riwaya: Riwaya;
  server: string;
  surah_total: string;
  playlist: Playlist;
};

Playlist & PlaylistItem

Represents audio tracks in a playlist. Location: src/types/playlist.ts:1
surahId
string
required
Surah number as string (“1” to “114”)
Direct URL to the audio file
type PlaylistItem = {
  surahId: string;
  link: string;
};

type Playlist = PlaylistItem[];

Surah

Metadata for a Quranic surah (chapter). Location: src/types/surah.ts:1
id
number
required
Surah number (1-114)
name
string
required
Arabic name of the surah
englishName
string
required
English transliteration of the surah name
revelationType
'Meccan' | 'Medinan'
required
Where the surah was revealed
ayahCount
number
required
Number of verses in the surah
type Surah = {
  id: number;
  name: string;
  englishName: string;
  revelationType: 'Meccan' | 'Medinan';
  ayahCount: number;
};

Enums

Riwaya

Quranic reading traditions (recitation methods). Location: src/types/riwaya.ts:1
Hafs
'حفص'
Most common reading (transmitted by Hafs from Asim)
Warsh
'ورش'
Common in North Africa (transmitted by Warsh from Nafi)
Qaloon
'قالون'
Another transmission from Nafi
Khalaf
'خلف'
Reading of Khalaf
AlBazzi
'البزي'
Reading of Al-Bazzi from Ibn Kathir
AlSoosi
'السوسي'
Reading of Al-Soosi from Abu Amr
AlDooriKisai
'الدوري-الكسائي'
Al-Doori’s transmission from Al-Kisai
AlDooriAbuAmr
'الدوري-أبي-عمرو'
Al-Doori’s transmission from Abu Amr
Shuaba
'شعبة'
Reading of Shuaba from Asim
IbnZakwan
'ابن-ذكوان'
Reading of Ibn Zakwan from Ibn Amir
Hisham
'هشام'
Reading of Hisham from Ibn Amir
IbnJammaz
'ابن-جماز'
Reading of Ibn Jammaz from Abu Jafar
Yaqoub
'يعقوب'
Reading of Yaqoub al-Hadrami
enum Riwaya {
  Hafs = 'حفص',
  Warsh = 'ورش',
  Qaloon = 'قالون',
  Khalaf = 'خلف',
  AlBazzi = 'البزي',
  AlSoosi = 'السوسي',
  AlDooriKisai = 'الدوري-الكسائي',
  AlDooriAbuAmr = 'الدوري-أبي-عمرو',
  Shuaba = 'شعبة',
  IbnZakwan = 'ابن-ذكوان',
  Hisham = 'هشام',
  IbnJammaz = 'ابن-جماز',
  Yaqoub = 'يعقوب',
}

LinkSource

Source/origin of audio files. Location: src/types/link-source.ts:1
MP3QURAN
'mp3quran.net'
Primary source for most reciters
ISLAMHOUSE
'islamhouse.com'
Alternative audio source
INTERNETARCHIVE
'archive.org'
Internet Archive as audio source
UNKNOWN
'unknown'
Unknown or unspecified source
enum LinkSource {
  MP3QURAN = 'mp3quran.net',
  ISLAMHOUSE = 'islamhouse.com',
  INTERNETARCHIVE = 'archive.org',
  UNKNOWN = 'unknown',
}

Additional Types

TrackType

Simple track representation (alternative to PlaylistItem). Location: src/types/track-type.ts:1
surahId
number
Surah number as number (not string)
Direct URL to audio file
type TrackType = { 
  surahId: number; 
  link: string; 
};
This type is similar to PlaylistItem but uses number for surahId instead of string. Check the specific component or function to see which type it expects.

Type Index

All types are exported from the main types index: Location: src/types/index.ts:1-6
export * from './link-source';
export * from './playlist';
export * from './reciter';
export * from './riwaya';
export * from './surah';
export * from './track-type';
Always import types from @/types rather than individual files:
// ✅ Good
import { Reciter, Playlist, Riwaya } from '@/types';

// ❌ Avoid
import { Reciter } from '@/types/reciter';
import { Playlist } from '@/types/playlist';

Build docs developers (and LLMs) love