Skip to content

Instantly share code, notes, and snippets.

@reetp
Last active February 10, 2025 11:42
Show Gist options
  • Save reetp/b0ba4e3d0ea2ff48ca9da00a5a647d42 to your computer and use it in GitHub Desktop.
Save reetp/b0ba4e3d0ea2ff48ca9da00a5a647d42 to your computer and use it in GitHub Desktop.
Developers readme

Developers

Introduction

Please, please, please READ. Lots.

Most of your questions have been answered multiple time in multiple places.

Answering them becomes extremely tedious so don't be surprised at some less than friendly responses if you clearly haven't bothered doing some research. And they will know.

Search has been around for 30+ years. Make use of it.

Github

  • Rocket.Chat is a large mature project. It has multiple departments hidden from view with github being the very last bit right at the end. Don't expect any fast answers.
  • Github is NOT the primary resource for Rocket.Chat
  • Rocket.Chat have an internal tracker. Github is where the code gets sent in the end. Issues are not regularly checked by the team.
  • Github issues NEVER get assigned so please don't ask.
  • Please don't @ people anywhere - it gets really irritating and you will get muted or ignored. Those who need to know will see.
  • Before tackling an issue please ask about it on open
  • Some of the team watch a few of the channels from time to time, but on a 'voluntary' basis. Be patient.
  • Don't waste your own time. If an issue has been triaged as a bug or 'tasked' it will have been referred to the devs for them to fix. Look for another issue to solve and chreck they want it done.
  • If you decide to work on something then make sure you understand exactly what the problem is first. Many issues are support requests, not bugs that need fixing. Don't waste your valuable time.
  • If there is already a PR on an issue then don't waste your time doing another one. Either wait and see if it is accepted or find another issue you can work on.
  • Don't just add a PR. Make sure there is an open issue and link it as a fix to that issue.
  • PRs can take months to get merged. Rocket.Chat is not a startup. It is a large mature project. They have to go through a lengthy approval process. Don't just expect it will be merged in a day.
  • Feature requests or apps are a much better area to work on.
  • This is not school. No one is going to sit down and teach you now. If you want to learn you need to help yourself.
  • PRs should be ready to go. Do not waste devs time - they will ignore you. Ask for help at open

Information that support or devs will require

You are going to need to provide some basic information if you want a chance of resolving your issue.

If you haven't got this information to hand please go and get it now.

At a minimum you will need this:

  • Server Setup Information:

    • Licence type eg CE/Starter/Pro :
    • Number of users:
    • Server hardware: VPS/hypervisor/bare metal
    • Version of Rocket.Chat Server:
    • Operating System: Ubuntu/Redhat etc
    • Deployment Method: snap/docker/tar/etc
    • Number of Running Instances:
    • DB Replicaset Oplog:
    • NodeJS Version:
    • MongoDB Version:
  • Client information:

    • Client type: Electron app/React-Native app/Browser and version
    • If you are developmg show what code you are stuck on
  • A list of the steps required to replicate the issue.

    • If we can't replicate it we can't debug it

Developers debugging setup

READ. READ. READ. I keep saying this and no one seems to be bothered. It is how we got to know the answers to a lot of stuff. It's why YOU are asking us how to solve YOUR issues.

Most answers are already there. Most of the time if you carefully follow the docs it will work. If it doesn't you have almost certainly ignored something becuase you thought you were too clever to do it, or didn't need to. 99% of the time the issue is because people did not read and though they could just guess their way to a solution. You can't.

Don't just paste a screenshot and say "help". We cannot see your screen. We cannot see the commands you typed. We do not know your setup, OS, RAM, helper versions etc. We cannot help you.

Don't try and hide stuff becuase you are embarassed. We all make mistakes. The professionals WILL find out anyway - that's why you are asking them for help. So just tell the truth straight away.

See the above notes about information required, and the links below to "How to Report Bugs Effectively" and "How to Ask Smart Questions".

Get in the habit of writing lots of notes as you go. Be comprehensive. A list of commands you have typed, the versions of installed apps eg node, deno, node nvm etc.

They may need to be able to try and repeat your steps to re-create the issue.

You need to be professional if you want professionals to use their very valuable time helping you.

See It won't build below.

Writing your own code

No one is going to write code for you. They might help your well documented question on your own code, but that is it.

Don't write "How do I?". Read ALL the docs first.

Write "I have written X and Y but it shows Z and not A"

Links

There are NO simple solutions.

There are lots of answers. Search is your friend.

If you make some effort to educate yourself and ask sensible, well documented questions then people may help.

No one is going to sit down and teach you for free.

Please read all the following. There are some very useful hints tips and links that will help you on your journey.

Asking for help

How to Report Bugs Effectively

How to ask a smart question that will attract attention

Don't be this user:

The XY Info problem

Rocket chat docs and areas of interest.

Documentation

Developer Documentatiom

Forums

Open

Code walkthrough

Rocket.Chat server

Rocket.Chat server feature requests

React Native Mobile Client

Electron desktop application

Rocket.Chat documentation

FAQ

All of these are answered elsewhere.....

Is it open source?

The core code is on github and is MIT licensed. You can take it and do with it as you want under MIT.

You CANNOT use the EE code.

It is likely that in time will ONLY released source code on github will be classified as open source. Any binaries eg docker images will have to be licensed one way or another.

Why?

Because Rocket.Chat needs to stay in business to pay developers and keep building software and no one will pay anywhere near enough volutarily to make that happen.

Tried, failed.

It won't build

Most issues with building are because people have not read ALL the docs.

There are lots of them and there are lots of issues with information being in say Ubuntu deployment but not in Linux build server. It is why you MUST read everything.

If you clearly state you have read everything but haven't, someone is going to find you out really fast and tell you so quite bluntly. That is why you are asking them for help.....

Build Environment

Don't bother with working on versions less than 7 unless you have a very specific reason.

  • Are you using a supported client? Windows needs WSL + 12Gb to build. Minimum.

  • Are you using the correct version of Node? Needs v14.x for 6.x and v20.x for 7.x

  • Deno You need to install and update deno something like this:

curl -fsSL https://deno.land/install.sh | sh

cp deno from ~/.deno/bin to /usr/bin/deno or add it to your path

Only Deno versions >=1.37.1 and <2.0.0 are supported.

deno upgrade --version 1.43.6

  • Meteor Are you using the correct version of Meteor? It needs Meteor 2.6.x for Rocket.Chat v6.x and Meteor v3.x for Rocket.Chat v7.x

  • Building is slow It takes ages to build. Yup. It is a massive project to build. Get another coffee.

  • It fails.

Use yarn dsv instead of yarn dev

localhost vs domain/https

Using a local IP/localhost is fine for developing.

But for production you need to use a domain, https and reverse proxy. The iOS app will not work without it.

A common mistake is to deploy, then use the server locally to login. The system knows if you are entering from a different URL and will try and switch the Root URL to match. That will break things for everyone else.

So DON'T do it.

Once setup ALWAYS use the proper https URL from wherever you login, even if it is on the same host (if you use a headless server you won't make this sort of mistake)

Build notes

Every time you pull/update the repo then run through this list again.

Setup deno

curl -fsSL https://deno.land/install.sh | sh

Exit terminal and create new terminal. Check deno version. Only Deno versions >=1.37.1 and <2.0.0 but IIIRC there is a bug thatsays use 1.43.x currently

deno --version
deno upgrade --version 1.43.6

Use a git directory eg ~/git. Then clone each repo separately.

mkdir -p ~/git

Clone and check deps - every time!!!

cd ~/git
git clone https://github.com/RocketChat/Rocket.Chat.git (or from your fork)
cd ~/git/Rocket.Chat
cat package.json | grep -A4 engines | grep node
nvm install x.x.x

Check node

node -v

Install meteor

Check required version

grep METEOR apps/meteor/.meteor/release |cut -d "@" -f2

Install it

curl https://install.meteor.com/?release=x.x | sh

On Mac you may need to escape it like this

curl "https://install.meteor.com/?release=3.1.1" | sh

Setup meteor

cd apps/meteor
meteor --version
cd ../..

Start to build

yarn
yarn build
yarn dsv
# get a big cup of tea and wait

Deploy App

Use a different directory - not Rocket.Chat

cd ~/git
git clone https://github.com/RocketChat/Apps.Jitsi.git
cd ~/git/Apps.Jitsi
npm i
rc-apps deploy --url http://localhost:3000 --username <username> --password <password>

Add Environment variables

# an example URL from Atlas, replace with the deployed Mongo connection string

$ export MONGO_URL="mongodb+srv://<user>:<pass>@vsea.mongodb.net/?retryWrites=true&w=majority&appName=vsea" 

$ yarn dsv
@SJ5858
Copy link

SJ5858 commented Feb 10, 2025

The issue you're encountering is due to Rocket.Chat's rate limiting mechanism

@reetp
Copy link
Author

reetp commented Feb 10, 2025

The issue you're encountering is due to Rocket.Chat's rate limiting mechanism

Your response is pure AI garbage.

Reporting accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment