Skip to content

Commit

Permalink
Merge pull request #10 from dyaskur/improvement/add_instructions
Browse files Browse the repository at this point in the history
docs: add instructions how to use this application
  • Loading branch information
dyaskur authored May 23, 2023
2 parents a478e70 + 608a457 commit dc434f7
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 6 deletions.
49 changes: 43 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Google Chat Shuffle Maven
# Google Chat RandomBot

#### Chat app that can be used to shuffle google chat space member or anything
#### Chat app that can be used to random google chat space member or anything else

[![StyleCI](https://github.styleci.io/repos/641918189/shield?branch=master)](https://styleci.io/repos/641918189)
[![Github Action](https://github.com/dyaskur/google-chat-shuffler/workflows/Node.js%20CI/badge.svg?branch=master)](https://github.com/dyaskur/google-chat-shuffler/actions)
Expand All @@ -15,15 +15,52 @@
[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=dyaskur_google-chat-shuffler&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=dyaskur_google-chat-shuffler)
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=dyaskur_google-chat-shuffler&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=dyaskur_google-chat-shuffler)

Features:
#### Features:

- Quick shuffle the chat space members
- Unit Test (ready to TDD)
- No database needed
- Using google cloud task (AWS SQS equivalent)
- Shuffle from input
- Choose how many item will be showed (winner count)
- Random GPT, random anything using GPT prompt (e.g random number, quotes, places etc)

Coming soon:

- Choose how many item will be showed
#### Roadmap:
- Make the app configurable (need a DB)
- Scheduler (example use case: send daily quote or motivation to google chat space)

#### Screenshot:
- Random based on input in mentioned message:
- ![screenshot.gif](assets%2Fscreenshot.gif)
- Random member of current google chat space
- ![screenshot2.png](assets%2Fscreenshot2.png)
- You can also get random quotes, motivation, number, places or anything else using this app
- ![screenshot1.png](assets%2Fscreenshot1.png)

#### Prerequisites:
- Minimum NodeJS 16
- yarn (optional)
- Google Cloud project that enabled Cloud Function, Cloud Task, Google Chat API, etc or [click here](https://console.cloud.google.com/flows/enableapi?apiid=chat.googleapis.com,%20cloudbuild.googleapis.com,%20cloudfunctions.googleapis.com,%20pubsub.googleapis.com)
- Google Workspace account
- Google Cloud CLI ([how to install](https://cloud.google.com/sdk/docs/install))

#### How to install/deploy:
- run `yarn install` to install dependencies
- run `yarn test` to make sure no failing of functionality
- run `cp .env.yaml.examle .env.yaml` to copy [.env.yaml.example](.env.yaml.example) to `.env.yaml`
- fill the value on `.env.yaml` file to correct config/environment
- run `gcloud config set functions/region <your-region>` with the same region in `.env.yaml`
- run `yarn deploy` to deploy

#### How to setup google chat app:

- In Google Cloud Console, search for "Google Chat API" and click Google Chat API.
- Click `Manage` button.
- Click Configuration and set up the Google Chat app:
- In App name, enter the app name (e.g RandomBot Custom).
- In Avatar URL, enter the logo(e.g https://developers.google.com/chat/images/quickstart-app-avatar.png) .
- In Description, enter the app description.
- Under Functionality, select Receive 1:1 messages, Join spaces and group conversations, and Log errors to Cloud Logging.
- Under Connection settings, select App URL and paste the URL for the Cloud Function trigger into the box.
- Under Permissions, select Specific people and groups in your domain and enter your email address.
- Click `Save` button. And done. You can use your app in google chat. Just search your app in "Find apps" menu
Binary file added assets/screenshot.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/screenshot1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/screenshot2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dc434f7

Please sign in to comment.