A websockets team chat built with Erlang's ChicagoBoss, using Cowboy server and PostgreSQL.
- Have a working example of many features of ChicagoBoss, including websockets, for the beginner.
- Be as easy to mantain as possible.
- Be stupidly fast.
- Have a working version using Elixir also.
-
Install Erlang (version R15B03 +). You can also use
brew install erlang
if you're on MacOS. -
Download and install ChicagoBoss:
wget wget https://github.com/ChicagoBoss/ChicagoBoss/archive/v0.8.19.tar.gz tar -xvf v0.8.19.tar.gz cd ChicagoBoss-0.8.19 make
-
Clone Apalachin:
git clone git@github.com:joaomilho/apalachin.git cd apalachin
-
Copy boss.config.example to boss.config, then edit the file changing the path of ChicagoBoss and your database setup:
cp boss.config.example boss.config vi boss.config
-
Run in dev mode:
./init-dev.sh
-
Migrate (run inside project's erlang console) and generate some users:
> boss_migrate:run(chat). > User = person:new(id, "Al Capone", "al@capone.com", "1234"). > User:save(). > User = person:new(id, "Joe Barber", "joe@barber.com", "1234"). > User:save().
-
Open your [modern] browser on http://localhost:8001, sign in, and have fun!
- Add support to reference users, with @ and maybe notify 'em by email;
- Add websockets compat layer to work in IE as well;
Add tests!;- Add bcrypt to password validation;
Figure out how to have proper migrations, docs aren't helpful!;- Make setup process more user friendly;
Use markdown or something like that, and allow auto urls in the chat;Save messages in the database and allow full text search;- Allow image uploads, and maybe other media stuff;
Add a faviconwith status.- Improve design (a lot!). Some refs: