Skip to content

Latest commit

 

History

History
142 lines (117 loc) · 3.11 KB

README.md

File metadata and controls

142 lines (117 loc) · 3.11 KB

Berkebun+ Cloud Computing Backend APIs 🌱

This repository contains the Backend APIs for Berkebun+ Capstone Project.

📂 Project Structure

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

🎯 Feature

  • 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

🛠️ Technologies used

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

🌩️ Cloud Architecture

architecture

🏃 Running Locally

  1. Clone this repository
    git clone https://github.com/CP-Berkebun/Cloud-computing.git
  1. Install all the dependecies
    npm install
  1. Running the project
    npm run start/dev

⚙️ Environment

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=

🗄️ Database structure

structure

💡 About this repo

This Backend was created by cloud computing cohort: