Book | Hadith count |
---|---|
Sahih Bukhari | 7008 |
Sahih Muslim | 5362 |
Sunan Nasai | 5662 |
Sunan Abi Dawud | 4590 |
Sunan Tirmidhi | 3891 |
Sunan Ibn Majah | 4332 |
Muwatta Imam Malik | 1594 |
Sunan Darimi | 3367 |
Musnad Ahmad | 26363 |
- Api was built using Visual Studio Community 2019 Version 16.4.0, .net core 3.1, SQLite.
- Download SQLite & SQL Server Compact Toolbox extension to access SQLite database from visual studio.
Open up Terminal and navigate to the directory where you want the project to live.
Clone this repository:
git clone https://github.com/MohamedAbdelghani/The9Books.git
Extract database file from "src/Api/Data/SunnahDb.rar" in the same directory, it was compressed because it exceeded github file size limit.
The original Hadith CSV files can be found in Open-Hadith-Data repository.
Navigate to api project:
cd The9Books/src/Api
Ensure that Docker Desktop is up and running, then run the following commands:
docker build -t 9books/dev .
docker run -p 5000:80 --name 9hadithbooks 9books/dev
Wait for the logs to show "server started on port 5000", then navigate to localhost:5000 to access api.
Retrieves list of all books
Retrieves specific hadith from specific book.
book ids can be obtained from end point GET /books
Retrieves a range of hadiths from speific book starting from specific hadith.
Maximum range size is 50.
Retrieves a random hadith from Sahih al-Bukhari.
Retrieves a random hadith from specific book.