Skip to content

xechi/CloudComputing

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 

Repository files navigation

AgriCurify

Capstone Project Bangkit Academy 2024 Batch 2

Cloud Computing

The service available:

  • Authentications

    POST /login
    POST  /register
    POST  /logout
  • User

    GET  /user
    PUT  /user
    PUT  /users/updateProfile
    PUT  /users/changePassword
  • Predictions

    POST /predict/apple
    POST /predict/grape
    POST /predict/tomato

Tech Stack

Node.js, Express.js, MySQL, Prisma, Flask, App Engine, Cloud Build, Cloud SQL, Cloud Storage, Secret Manager.

Documentation API

User
  • Register
POST /register

Request Body:

{
  "username": "John",
  "email": "[email protected]",
  "password": "john12345"
}

Response Body:

{
  "message": "User created successfully"
}
  • Login
POST /login

Request Body:

{
  "email": "[email protected]",
  "password": "john12345"
}

Response Body:

{
  "message": "Login successful",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MTMsImVtYWlsIjoiaGVsbG8zQGdtYWlsLmNvbSIsImlhdCI6MTczMzkyMTk1MiwiZXhwIjoxNzM0MDA4MzUyfQ.tmWOVP2LJw_jBUQ27eTiaOcT3ORbQAQcEId_7bjAVf8"
}
  • Logout
POST /logout

Response Body:

{
  "message": "Logged out successfully"
}
  • View Profile
GET /users

Response Body:

{
  "message": "Success grab data user",
  "data": {
      "name": "John",
      "email": "[email protected]",
      "image": "https://i.imgur.com/HFmWnmJ.png"
  }
}
  • Update Profile
POST /users

Request Body:

{
  "name": "John D",
  "email": "[email protected]"
}

Response Body:

{
  "message": "User updated successfully",
  "data": {
      "id": 1,
      "email": "[email protected]",
      "name": "John D",
      "image": "https://i.imgur.com/dETmvGX.png"
  }
}
  • Update Profile Image
POST /users/updateProfile

Response Body:

{
  "message": "Profile image updated successfully"
}
  • Change Password
POST /users/changePassword

Response Body: Request Body:

{
  "oldPassword": "john12345",
  "newPassword": "john123456",
  "confirmPassword": "john123456"
}

Response Body:

{
  "message": "Password successfully updated"
}
Predictions
  • Predict
POST /predict/apple

Response Body:

{
  "label": "Apple__Apple_scab",
  "confidence": 100.0,
  "disease_info": {
      "description": "Apple scab is a fungal disease that causes dark, sunken lesions on apples.",
      "name": "Apple Scab",
      "treatment": [
          "Grow scab-resistant apple cultivars such as Akane, Chehalis, Liberty, Prima, and Tydeman Red.",
          "Apply nitrogen to fallen leaves in the fall to increase decomposition and make them more palatable to earthworms. Use liquid fish solution or 16-16-16 fertilizer.",
          "Shred fallen leaves in the fall with a lawn mower to speed up decomposition.",
          "Prune trees to improve air circulation.",
          "Avoid wetting foliage when watering.",
          "Apply dolomitic lime in the fall to increase pH and reduce fungal spores.",
          "Spray fungicides (Bonide Captan, wettable sulfur, summer lime sulfur, or Spectracide Immunox) when temperatures are above 60°F and leaves or flowers are wet."
      ]
  },
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 55.1%
  • JavaScript 44.9%