This project facilitates the searching through the 613 mitzvot & sections of the Tanakh, AI summaries for daily Mitzvot completion, and more.
Accessible at: https://web-production-aae7.up.railway.app/
- Node.js
- npm (Node Package Manager)
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Install the dependencies:
npm install
-
Start the server:
npm start
The server will start on port 3000.
Generate a unit test report:
npx jest
Resulting in a coverage report, looking like:
- 100 requests per hour for non AI endpoints.
- 20 requests per hour for AI endpoints.
- Usage is IP-based.
- URL:
/api/mitzvot/all - Method:
GET - Description: Returns all mitzvot.
[
{
"number": 1,
"description": "To know there is a God.",
"source": "Exodus 20:2"
},
...
]- URL:
/api/mitzvot/ai/search - Method:
GET - ** Query parameters:** q (required): The query string to search in the description.
- Description: Searches for mitzvot by description using AI to figure out what is meant. Example response below, based on "/api/mitzvot/ai/search?q=food":
[
{
"description": "Preparing and eating a meal",
"potentialMitzvah": "Birkat Hamazon (Grace After Meals)"
},
{
"description": "Acquiring food",
"potentialMitzvah": "Avoiding theft or deception in food transactions; ensuring fair prices and honest dealings."
}...
]- URL:
/api/mitzvot/search - Method:
GET - ** Query parameters:** q (required): The query string to search in the description.
- Description: Searches for mitzvot by description..
[
{
"number": 1,
"description": "To know there is a God.",
"source": "Exodus 20:2"
},
...
]- URL:
/api/mitzvot/source - Method:
GET - ** Query parameters:** source (required): The query string to search in the source.
- Description: Searches for mitzvot by source.
[
{
"number": 1,
"description": "To know there is a God.",
"source": "Exodus 20:2"
},
...
]- URL:
/api/tanakh/random - Method:
GET - Description: Provides a random section from the Tanakh, alongisde the book it comes from.
{
"book": "Lamentations",
"line": "חשב יהוה להשחית חומת בת ציון נטה קו לא השיב ידו מבלע ויאבל חל וחומה יחדו אמללו"
}- URL:
/api/tanakh/random/english - Method:
GET - Description: Provides a random section from the Tanakh, alongisde the book it comes from, this time with English included.
{
"book": "Judges",
"line": "והיה בבקר כזרח השמש תשכים ופשטת על העיר והנה הוא והעם אשר אתו יצאים אליך ועשית לו כאשר תמצא ידך",
"english": "And there was the east cattle the sun and simplified on the city and here he and the people with whom he will come to you and you did to him when you find your hand"
}- URL:
/api/mitzvot/ai - Method:
GET - Description: Based on an explanation of the activities you have completed in a day, Google Gemini AI will act as a Rabbi and return the list of Mitzvot completed (if any), in a JSON format.
{
"prompt": "Said the Shema"
} {
"mitzvotForToday": ["Shema"],
"mitzvotCount": 1
}- URL:
/api/mitzvot/ai/explain/:id - Method:
GET - Description: Based on a Mitzvah ID, these can be found by searching the mitzvot in our API or by using the official order of Mitzvot found on Chabad.org, we return an AI explanation for the Mitzvah. An example call would be to the endpoint: /api/mitzvot/ai/explain/4 - this would return an explanation and mitzvah name for the fourth mitzvah in the list, responding with:
{
"mitzvahName": "Ahavat Hashem (Love of God)",
"explanation": "Ahavat Hashem, the love of God, is the foundation of all mitzvot. It's not merely an emotion, but a commitment expressed through actions reflecting reverence, awe, obedience to His commandments (mitzvot), and striving to emulate His divine attributes – chesed (loving-kindness), tzedek (justice), and rachamim (compassion). This love is cultivated through Torah study, prayer, and living a righteous life according to Halakha (Jewish law). It's a constant, evolving relationship, characterized by both intellectual understanding and deep emotional connection, ultimately leading to a life of meaning and purpose dedicated to serving God and humanity."
}