This repository contains the Backend APIs for Berkebun+ Capstone Project.
Cloud-Computing/
│
├── src/
│ ├── api
│ | ├── diagnose.js
│ |
│ ├── exceptions
│ | ├── ClientError.js
| | ├── InputError.js
| |
│ ├── server
│ | ├── routes.js
| | ├── server.js
| |
│ ├── services
│ ├── firestoreData.js
| ├── uploadData.js
|
|
├── .gitignore
├── package-lock.json
├── package.json
├── README.md
-
Diagnose endpoint
POST /diagnoses
For getting the plant diagnoses from ML-CC-backend /predict
-
Save specific users plant diagnosed endpoint
POST /diagnoses/{userId}/save
For saving specific plant diagnosed to user data
-
Get all users plant diagnosed endpoint
GET /diagnoses/{userId}
For getting all the plant diagnosed from user data
-
Get specific users plant diagnosed endpoint
GET /diagnoses/{userId}/{diagnosedId}
For getting specific plant diagnosed from user data
-
Delete specific users plant diagnosed endpoint
DELETE /diagnoses/{userId}/{diagnosedId}
For delete specific plant diagnosed from user data
This project leverages the following technologies:
- Backend Framework: Hapi.js
- Database: Google Firestore
- Cloud Storage: Google Cloud Storage
- Environment Management: dotenv
- HTTP Requests: Axios
- Form Handling: form-data
- Authentication/Permissions: Firebase Admin SDK
- Clone this repository
git clone https://github.com/CP-Berkebun/Cloud-computing.git
- Install all the dependecies
npm install
- Running the project
npm run start/dev
Your .env configuration should looks like
PROJECT_ID= # Google Cloud Project ID.
USER_BUCKET= # Cloud Storage Bucket name for saving the user image.
SERVICE_ACCOUNT= # Service Account Path.
URL_ML= # Machine Learning URL.
PORT=
This Backend was created by cloud computing cohort: