🎤🐢 An open source, self-hosted alternative to Discord - updated version: https://git.hippoz.xyz/hippoz/waffle
This repository has been archived on 2022-05-17. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
2021-01-03 17:04:45 +02:00
api/v1 fix #10 2021-01-03 17:04:23 +02:00
app [Experimental] add an option for brainlet instance owners to require a special code sign up 2020-12-09 01:49:57 +02:00
libbrainlet yaay not testing commits! 2020-12-08 01:21:10 +02:00
models use colors throughout the whole app 2020-12-03 01:46:29 +02:00
.gitignore fix message clumping and also add discord<->brainlet bridge bot 2020-12-07 23:25:59 +02:00
apitest.rest add basic gateway connection functionality 2020-11-16 21:16:25 +02:00
config.js revert config to fix conflict 2020-12-07 23:26:32 +02:00
index.js add forceful refresh of user clients to push updates and erase bad messages from the dom 2020-12-01 22:28:35 +02:00
LICENSE Add 'LICENSE' 2020-12-30 22:41:01 +00:00
notes.txt message clumping!!!!!!! 2020-12-03 19:39:40 +02:00
package-lock.json improve message object structure, rearrange methods in app.js just for the code to look better and make sure the message list updates when a new message is sent 2020-11-17 15:27:23 +02:00
package.json improve message object structure, rearrange methods in app.js just for the code to look better and make sure the message list updates when a new message is sent 2020-11-17 15:27:23 +02:00
README.md fix #8 2020-12-30 22:46:38 +00:00
secret.js.template Initial commit 2020-10-05 20:36:03 +03:00

Brainlet

Brainlet is a simple chat app. Each category has a text channel associated with it, all messages sent in the text channel are temporary, while in the category itself all posts are permanent.

As its database, it uses Mongo DB.

Self-hosting

So you wanna host Brainlet yourself, huh?

Firstly, you're gonna need a MongoDB server, I just use Docker for the Mongo server, but you can try to not use Docker, though Mongo does not want to standalone on anything outside a perfect debian system or windows, so just use Docker. (if you are on windows, simply install mongo normally, it should work nicely)

Let create a Docker container for Mongo!

docker run -it -v mongodata:/data/db -p 27017:27017 --name mongodb -d mongo

This should automatically run it, however, next time you need it you gotta run:

docker start mongodb

Stopping it is as simple as:

docker stop mongodb

Now that we have a Mongo server set up, let's actually begin to set up the Brainlet server.

NOTE: You need nodejs and npm installed in order to proceed! I recommend using node 12.x, but anything above that will probably work.

Once you have installed node, clone the repo and then cd into it. Then, run the following command:

npm i

This will install all of the node modules.

Then, run:

cp secret.js.template secret.js

This will create a new secret.js based on that template.

IMPORTANT: Open secret.js with your favourite editor, and set the jwtPrivateKey variable to a random string of characters, preferably generated from /dev/urandom or using node's own generation thing.

NOTE: You can edit config.js to tweak some of the settings. You might wanna do that, especially if you are planning to run it on a domain. (setting the address variable)

You should now be ready to go!

Just run Brainlet with the command below:

node index.js

Good luck!