Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/indrayyana/melancong-backend

A backend application for the Melancong Web App, a tourism platform that provides information and recommendations for tourist destinations in Bali. This backend is built with Express.js and Firebase, and integrates with the Google Gemini API to support chatbot functionality.
https://github.com/indrayyana/melancong-backend

Last synced: about 1 month ago
JSON representation

A backend application for the Melancong Web App, a tourism platform that provides information and recommendations for tourist destinations in Bali. This backend is built with Express.js and Firebase, and integrates with the Google Gemini API to support chatbot functionality.

Awesome Lists containing this project

README

        

## API URL : [https://melancong-be.vercel.app](https://melancong-be.vercel.app)
## API Endpoints
| Endpoint | Method | Body | Description | JWT Token |
| :---------------------------: | :----: | :----------------------------------------------------------------------------: | :-----------------------------------------------: | :-------: |
| / | GET | - | Accessing our root endpoints | ☐ |
| /auth/register | POST | email, password, name | Register account for new user | ☐ |
| /auth/login | POST | email, password | Login to access the feature in application | ☐ |
| /auth/google | GET | - | Login with Google Account | ☐ |
| /auth/forgot-password | POST | email | Send Forgot Password email for user | ☐ |
| /auth/logout | GET | - | Logout for user | ☑ |
| /auth/token-validation | GET | - | JWT Token Validation | ☑ |
| /users | GET | - | Show all users | ☑ |
| /users/profile | GET | - | Show the detail data from user | ☑ |
| /users/update | PUT |`Anything you want to edit from:` name, gender, phone | Edit profile from user | ☑ |
| /users/delete | DELETE | - | Delete profile from user | ☑ |
| /users/upload-image | POST | image | Upload profile image from user | ☑ |
| /destinations | GET | - | Show all destinations | ☐ |
|/destinations/detail/`{dataId}`| GET | - | Show the detail destinations | ☑ |
| /destinations/saved | GET | - | Show all saved destinations | ☑ |
| /destinations/add | POST | id | Add destination to saved | ☑ |
| /destinations/delete | DELETE | id | Delete saved destination | ☑ |
| /chatbot | POST | prompt | Ask travel tips/question for chatbot | ☑ |

## Firebase | Cloud Firestore
![Melancong_DB](https://github.com/user-attachments/assets/7f4405fc-470e-4290-8482-5caa11b6dcf6)

## Running Locally
```console
npm install
```
```console
npm run dev
```
> [!NOTE]
> Open http://localhost:7777 with `Postman` or your API testing tool.

## Deploy to Firebase Functions
```console
npm install -g firebase-tools
```
```console
firebase init
```
```console
npm run deploy
```

## Deploy API to Google Cloud Run
```console
docker build -t gcr.io/melanc0ng/backend:tag .
```
```console
docker push gcr.io/melanc0ng/backend:tag
```
```console
gcloud run deploy melancong-api --image gcr.io/melanc0ng/backend:tag --platform managed
```