Diskusi
diskusi is a comments system and discussion board inspired by Disqus.
Prerequisites
Develop and Compile Dependencies
The following binaries / libraries need to be installed in order to compile the web application. The version numbers denotes the specific version used to develop (and release-test) the web application, it may or may not work under other minor versions:
- Elixir Lang v1.4.x
- Elm Lang v0.18.x
- Phoenix Framework v1.2.x
- Node.js v7.5.x
- npm v4.5.x
- Ruby v2.2.x
- Sass v3.4.x
Services (Database) Dependencies
The following applications need to be installed in order to provision an Ubuntu guest VM (1 core, 1GB RAM) which will contain the necessary services:
- Oracle VM VirtualBox v5.1.x
- Vagrant v1.9.x
The following Vagrant plugin is not mandatory, but help speed up subsequent box provisioning by caching common packages:
Successful Vagrant provisioning will enable the following services to be available within a guest VM:
- PostgreSQL v9.6.x
Setup Steps
Configure the services:
- Run
vagrant up
- Run
Install dependencies:
- Install Phoenix dependencies with
mix deps.get - Install npm dependencies with
npm install
- Install Phoenix dependencies with
Data store setup:
- Create database with
mix ecto.create - Migrate database with
mix ecto.migrate - Seed the database with
mix run priv/repo/seeds.exs
- Create database with
Run tests:
- Run Elixir tests with
mix test - Run JavaScript and Elm tests with
npm test
- Run Elixir tests with
- Start application with
mix phoenix.server
Now you can visit localhost:4000 from your browser.
Other Commands
mix dialyzerto run Dialyzer type-checkermix credoto run Credo static analysis toolmix docsto run ex_doc doc-comment documentation generator
NOTE: Run mix do deps.get, deps.compile, dialyzer --plt before running Dialyzer for the first time. It will build the PLT (Persistent Lookup Table) type information and may take a few minutes to complete.
Contributing
We follow the “feature-branch” Git workflow.
Commit changes to a branch in your fork (use
snake_caseconvention):- For technical chores, use
chore/prefix followed by the short description, e.g.chore/do_this_chore - For new features, use
feature/prefix followed by the feature name, e.g.feature/feature_name - For bug fixes, use
bug/prefix followed by the short description, e.g.bug/fix_this_bug
- For technical chores, use
- Rebase or merge from “upstream”
- Submit a PR “upstream” to
developbranch with your changes
Please read CONTRIBUTING for more details.
License
diskusi is released under the Apache Version 2.0 License. See the LICENSE file for further details.