Skip to content

tabiapp/CloudComputing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Architecture Cloud

The cloud architecture of the TABI app integrates several Google Cloud services to deliver efficient and scalable functionality. Android users interact with the app, which routes requests to the backend hosted on Cloud Run (Express). The backend retrieves data from Firestore and stores large assets in Cloud Storage. Machine learning workflows, hosted on Cloud Run (Flask), utilize models and tokenizers stored in Cloud Storage. Continuous Integration and Deployment (CI/CD) is managed through Cloud Build and Git repositories, enabling seamless development and deployment processes. This architecture ensures scalability, reliability, and optimal performance.


Structure Folder

CloudComputing/
├── app/
│   ├── controllers/
│   │   ├── regionController.js
│   ├── routes/
│   │   ├── regionRoutes.js
│   ├── services/
│   │   ├── regionService.js
│   ├── utils/
│   │   ├── data.js
│   ├── app.js
├── server.js
├── Dockerfile
├── cloudbuild.yaml
├── .gitignore

API Specification for TabiApp

Base URL:
https://tabiapp-65059410484.asia-southeast2.run.app/api

Endpoints

1. Get All Regions

GET /regions

Description:
Returns a list of all regions.

Response:

  • 200 OK
    {
      "success": true,
      "message": [/* Array of regions */]
    }
  • 500 Internal Server Error
    {
      "success": false,
      "message": "Failed to fetch regions.",
      "error": "Error details (if any)"
    }

2. Get Region Details

GET /regions/:regionName

Description:
Returns detailed information about a specific region.

Path Parameters:

  • regionName (string): Name of the region.

Response:

  • 200 OK
    {
      "success": true,
      "message": {/* Region details */}
    }
  • 404 Not Found
    {
      "success": false,
      "message": "Region '<regionName>' not found."
    }
  • 500 Internal Server Error
    {
      "success": false,
      "message": "Failed to fetch region detail.",
      "error": "Error details (if any)"
    }

3. Get Region Manners

GET /regions/:regionName/manners

Description:
Fetches manners or traditions related to the specified region.

Path Parameters:

  • regionName (string): Name of the region.

Response:

  • 200 OK
    {
      "success": true,
      "message": [/* Array of manners */]
    }
  • 404 Not Found
    {
      "success": false,
      "message": "Region '<regionName>' not found."
    }
  • 500 Internal Server Error
    {
      "success": false,
      "message": "Failed to fetch manners.",
      "error": "Error details (if any)"
    }

4. Get Region Places

GET /regions/:regionName/places

Description:
Fetches notable places from the specified region.

Path Parameters:

  • regionName (string): Name of the region.

Response:

  • 200 OK
    {
      "success": true,
      "message": [/* Array of places */]
    }
  • 404 Not Found
    {
      "success": false,
      "message": "Region '<regionName>' not found."
    }
  • 500 Internal Server Error
    {
      "success": false,
      "message": "Failed to fetch places.",
      "error": "Error details (if any)"
    }

5. Get Region Foods

GET /regions/:regionName/foods

Description:
Fetches popular foods from the specified region.

Path Parameters:

  • regionName (string): Name of the region.

Response:

  • 200 OK
    {
      "success": true,
      "message": [/* Array of foods */]
    }
  • 404 Not Found
    {
      "success": false,
      "message": "Region '<regionName>' not found."
    }
  • 500 Internal Server Error
    {
      "success": false,
      "message": "Failed to fetch foods.",
      "error": "Error details (if any)"
    }

Example Usage

Fetch All Regions

GET https://tabiapp-65059410484.asia-southeast2.run.app/api/regions

Fetch Details of a Region

GET https://tabiapp-65059410484.asia-southeast2.run.app/api/regions/Yogyakarta

Fetch Manners of a Region

GET https://tabiapp-65059410484.asia-southeast2.run.app/api/regions/Bali/manners

Fetch Places of a Region

GET https://tabiapp-65059410484.asia-southeast2.run.app/api/regions/Semarang/places

Fetch Foods of a Region

GET https://tabiapp-65059410484.asia-southeast2.run.app/api/regions/Jakarta/foods