Terminal User Interface for Rocket.Chat made using Bubbletea
Prerequisites:
-
Clone this Project Repo and set up Rocket.chat Meteor Application in your machine.
-
Run Rocketchat Meteor Server on your
http://localhost:3000and login/signup into a new account save your credentials for signing in TUI. -
In the RocketChat TUI root folder run
go getin terminal to get all golang packages we are using -
Make a
.envfile in the project root directory and add below code in it.PROD_SERVER_URL=https://community.liaison.rocketchat.digital DEV_SERVER_URL=http://localhost:3000 -
Now in the RocketChat TUI root folder run
go run main.go -debugto run the TUI. -
We have to pass
-debugflag so that it logs log statements indebug.logfile. -
To use production server pass
-prodflag too while runningmain.go. It will use the production server. -
To use any other server pass
-urlflag too while runningmain.goi.e.go run main.go -url=https://open.rocket.chat. It will use the given server. -
Hopefully you will see the TUI running.
-
Enter your email and password. Press Enter to login.
- The starting file of the project is
main.go. It starts the bubbletea Program to run TUI. - TUI models, view and controllers are present in ui folder.
- In ui folder
model.gocontain global state of TUI and methods required by bubbletea to initialise, Update and Render the TUI in terminal. - In ui folder
view.gocontain UI code of the TUI which uses styles defined instylespackage. We are using lipgloss for styling the TUI. - All Key bindings used in TUI is present in
keyBindingspackage to keep them seperate from TUI so that new key bindings can be easily added when needed. - Caching related functions are present in
cachepackage