Awesome
Apalachin
A websockets team chat built with Erlang's ChicagoBoss, using Cowboy server and PostgreSQL.
Goal of the project
- 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.
Look & feel
<img alt="Apalachin look and feel" src="https://raw.github.com/joaomilho/apalachin/master/priv/static/img/shot.png" />Install
-
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!
Roadmap
- Add support to reference users, with @ and maybe notify 'em by email;
- Add websockets compat layer to work in IE as well;
- <del>Add tests!;</del>
- Add bcrypt to password validation;
- <del>Figure out how to have proper migrations, docs aren't helpful!;</del>
- Make setup process more user friendly;
- <del>Use markdown or something like that, and allow auto urls in the chat;</del>
- <del>Save messages in the database and allow full text search;</del>
- Allow image uploads, and maybe other media stuff;
- <del>Add a favicon</del> with status.
- Improve design (a lot!). Some refs: