Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/indrayyana/melancong-backend
- Owner: indrayyana
- License: mit
- Created: 2024-07-05T14:06:56.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-08-20T04:46:02.000Z (4 months ago)
- Last Synced: 2024-08-20T07:24:47.257Z (4 months ago)
- Language: JavaScript
- Homepage: https://melancong-be.vercel.app
- Size: 142 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```