Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abhinavkrin/app-workshop-welcome-bot
https://github.com/abhinavkrin/app-workshop-welcome-bot
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/abhinavkrin/app-workshop-welcome-bot
- Owner: abhinavkrin
- Created: 2024-01-26T11:02:51.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-13T12:34:04.000Z (8 months ago)
- Last Synced: 2024-05-15T15:36:40.473Z (6 months ago)
- Language: TypeScript
- Size: 55.7 KB
- Stars: 5
- Watchers: 1
- Forks: 16
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Setting Up the Rocket.Chat App starter code
This guide provides a brief overview of how to set up the starter code for the Rocket.Chat App. We will use this project during our App Development workshop.
## Prerequisites
Before you begin, ensure you have the following:
- Rocket.Chat server set up and running. We will provide a server during the workshop.
- Linux OS or WSL with Node.js installed.
- The Rocket.Chat Apps CLI installed. You can install it using npm with the command `npm install -g @rocket.chat/apps-cli`.
- The starter code is already set up. Follow the below steps to set up the starter code.## Steps to Set Up this Rocket.Chat App
1. **Clone this repo**:
```
git clone https://github.com/abhinavkrin/app-workshop-welcome-bot.git
```
2. **Install the dependencies**:
```
npm install
```
3. **Edit `app.json`**:
Every Rocket.Chat app has a unique ID. To set this, you will need to replace the value in the `id` field of your `app.json` file with a unique UUID.
- Obtain a UUID from [UUID Generator](https://www.uuidgenerator.net/version4) and replace the `id` field in your `app.json` with this UUID.
Example `app.json` snippet:
```json
{
"id": "YOUR-UNIQUE-APP-ID",
"name": "Your App Name",
"description": "What your app does",
...
}
```
Replace `YOUR-UNIQUE-APP-ID` with the UUID you obtained. As a result each of you will have an app with unique app id.Change `nameSlug` under app.json file to match with the name of your app.
```json
{
...
name: "YournameWelcomeBot",
nameSlug: "yournamewelcomebot"
...
}
```
Replace `Yourname` and `yourname` with your actual name without any sepcial character in `name` and `nameSlug` field respectively.
4. **Edit `GetInfo.ts`**:
Since, each slash command is unique, we cannot havemore than one slash command with same command string. Edit `slashCommands/GetInfo.ts`
```
export class GetInfo implements ISlashCommand {
public command = "getinfo-YOURNAME";
...async executor(...): Promise {
}
}
```
Replace `YOURNAME` with your name. As a result, each one of you will will have a unique slash command.5. **Check Setup and Confirm Seat**
Run a check if everything has been set up correctly:
```
npm run check-setup
```
If everything is set up correctly you can see a message like this:
![Screenshot from 2024-02-13 23-41-08](https://github.com/abhinavkrin/app-workshop-welcome-bot/assets/15830206/0065d085-8b9c-408a-b5ac-4df7e85c430f)Visit the link and fill the form to confirm your seat. 🥳
### Develop Your App: (During Workshop)
With the project starter code configured, follow us along in the workshop to develop the app.### Deploy Your App: (During Workshop)
After developing your app, you can deploy it to your Rocket.Chat server for testing and use. Use the Rocket.Chat Apps CLI to package and deploy your app:
```
rc-apps deploy --url --username --password
```
Username and password will be provided during workshop## FAQ
### **1. Where can I find the final code?**
The final code could be found in the `final` branch### **2. When will the Username and Password for the test server be shared?**
The credentials will be shared during workshop### **3. What if I encounter errors during setup?**
Please share your issue in the [Events Channel](https://open.rocket.chat/channel/events-and-meet-ups).### **4. Is setting up the project mandatory?**
Yes. For best experience during the workshop, It is highly recommended that you have set up the starter code.See you in the workshop! Don't forget to fill feedback form which will be provided at the end of the workshop.