Giter Site home page Giter Site logo

mghanii / the9books Goto Github PK

View Code? Open in Web Editor NEW
25.0 4.0 6.0 49.41 MB

API to access Hadiths of Bukhari, Muslim, Abu-Dawud, Ahmed Ibn-Hanbal, Muwataa, Ibn-Maja, Al Tirmidhi, Al Nasai, Al Darimi

C# 93.60% Dockerfile 6.40%
sunnah hadith hadith-api sqlite csharp netcore

the9books's Introduction

Overview

An API to retrieve hadith of nine famous books:

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

Development Setup

Starting the Development Server

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/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.

Routes

GET /books

Retrieves list of all books

GET /{bookId}/{hadithNumber}

Retrieves specific hadith from specific book.
book ids can be obtained from end point GET /books

GET /{bookId}/{startHadithNumber}/{rangeSize}

Retrieves a range of hadiths from speific book starting from specific hadith.
Maximum range size is 50.

GET /random

Retrieves a random hadith from Sahih al-Bukhari.

GET /random/{bookId}

Retrieves a random hadith from specific book.

the9books's People

Contributors

mghanii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

the9books's Issues

No Data/SunnahDb.rar files

In your readme your saying "Extract database file from "src/Api/Data/SunnahDb.rar" in the same directory", but there is no Data folder or SunnahDb.rar.

Also when running docker run -p 5000:80 --name 9hadithbooks 9books/dev there is this error: docker run -p 5000:80 --name 9hadithbooks 9books/dev

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.