CookDApp’s purpose is to allow the creation, sharing, and schedule of meals through recipes.
CookDApp name represents the implementation of food, recipes, and cooks in this DApp, it will allow users to create recipe books in which they will be able to store recipes, these recipes can be edited and deleted by the creator, the individual recipes and recipe books can be rated by others, this rating will be used to keep tracking of the most rated recipes, this will allow a ranking system for the most popular and delicious meals which can be selected and added to anyone’s schedule so they may try the recipe themselves.
For the locally installation of this project:
-
Before you compile this code, you will need to install Node.js ≥ 12
-
(optional) near-shell
npm i -g near-shell
- yarn
npm i -g yarn
- Install dependencies:
yarn install.
git clone https://github.com/NEAR-Hispano/cook-dapp.git
cd cook-dapp
Install npm dependencies
npm install
Script for building the contract
sh scripts/build-contract.sh
Script for deploying the contract
sh scripts/dev-deploy-contract.sh
Script for cleaning the current local build of the contract
sh scripts/clean.sh
Script for testing contract
sh scripts/test-contract.sh
near call <your deployed contract> getUser "{}" --account-id <your test account>
near call <your deployed contract> createRecipeBook "{"title":string}" --account-id <your test account>
near call <your deployed contract> getRecipeBook "{"id": string}" --account-id <your test account>
near call <your deployed contract> updateRecipeBook "{"id": string, "title": string}" --account-id <your test account>
near call <your deployed contract> deleteRecipeBook "{"id": string}" --account-id <your test account>
near call <your deployed contract> createRecipe "{"title": string, "description":string, "ingridientsList": Array["label":string, "amount":i32, "unit":string, "details":strring], "instructions":Array[string], "recipeBookID":strrig, "category":string, "chefNote":string}" --account-id <your test account>
near call <your deployed contract> getRecipe"{"id": string}" --account-id <your test account>
near call <your deployed contract> updateRecipe "{"id": string, "title": string, "description":string, "ingridientsList": Array["label":string, "amount":i32, "unit":string, "details":strring], "instructions":Array[string], "recipeBookID":strrig, "category":string, "chefNote":string}" --account-id <your test account>
near call <your deployed contract> updateRecipeBook "{"id": string}" --account-id <your test account>
near call <your deployed contract> tipRecipe "{"id": string}" --account-id <your test account>
near call <your deployed contract> getRecipes "{}" --account-id <your test account>
near call <your deployed contract> getTrendingRecipes "{}" --account-id <your test account>
near call <your deployed contract> getMostTipedRecipes "{}" --account-id <your test account>
near call <your deployed contract> createReview "{"text": string, "rating":i32, "recipeID":string}" --account-id <your test account>
near call <your deployed contract> getReview "{"id": string}" --account-id <your test account>
near call <your deployed contract> updateReview "{"id": string, "text": string, "rating": i32}" --account-id <your test account>
near call <your deployed contract> getRecipeReviews "{"id": string}" --account-id <your test account>
near call <your deployed contract> deleteReview "{"id": string}" --account-id <your test account>
near call <your deployed contract> addGroceryListRecipe "{"recipeID": string}" --account-id <your test account>
near call <your deployed contract> updateRecipeBook "{"lists": Array["label": string, "ingridients": Array["label":string, "amount":i32, "unit":string, "details":string], "recipeID": string]}" --account-id <your test account>
near call <your deployed contract> addFavoriteRecipe "{"recipeID": string}" --account-id <your test account>
assembly/
contract developed in AssemblyScriptassembly/assembly/index.ts
for the AssemblyScript contract codesrc/index.html
for the front-end HTMLsrc/index.js
for the JavaScript front-end code and how to integrate contractssrc/App.js
for the main React componentscripts/
runable scripts for building/testing/deploying the contract
Here you can give a check to our Front-End design - Figma Mockup