CHAID system has two pieces, the backend and the frontend. The frontend is madeup of VueJS while the backend is madeup of nodeJS. The backend is using mongo DB for data storage.
Frontend and backend codes are both in github under dLab repository https://github.com/dlab-tz/chad
The source code can be downloaded by cloning the github repository. The repository can be cloned by running below command
git clone https://github.com/dlab-tz/chad
To run CHAID, you will need mongoDB, npm and nodejs installed. This installation procedure will be limited to running CHAID on ubuntu (18.04), CHAID can also run on windows.
Setup apt repository with below command
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
Add MongoDB APT repository url in /etc/apt/sources.list.d/mongodb.list
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb.list
Update repository
sudo apt update
Install mongo
sudo apt install mongodb-org
sudo systemctl enable mongod
Use below commands to start or stop mongo DB
sudo systemctl stop mongod
sudo systemctl restart mongod
sudo apt install nodejs
sudo apt install npm
`
The frontend comes with built files that can be deployed on any web server ready for running the frontend, these files are under chad/gui/build, copy them to a web server to start running the frontend.
Follow below instructions if you want to rebuild the frontend.
Switch to the gui directory with below commands
cd chad/gui
npm install
npm run build
Copy built files that are under chad/gui/build to any web server of your choice i.e apache or nginx and access the frontend with localhost/folder_name, assuming folder_name is the folder which has built files on your root directory of your web server
The backend can be installed by running below commands Switch to the backend directory
cd chad/backend
npm install
To run the backend issue below command Switch to the lib folder of the backend
cd backend/lib
Start the backend server
node app.js
The backend will be running and listening requests using port 3000
The default username is root@bmf.org and passowrd is chad. This is an admin account.
To install rapidpro, follow these instructions in here http://rapidpro.github.io/rapidpro/docs/development/
The easy way to get ona up and running is to use docker. Docker installation
sudo apt-get install docker && sudo apt-get install docker-compose
Download ONA source code with below command
git clone https://github.com/onaio/onadata.git
Run ONA Data with below commands
cd onadata
sudo docker-compose up
Above command will start onadata on port 8000 Run below commands to create onadata super user account
docker exec -it onadata_web_1 bash
source /srv/.virtualenv/bin/activate
python manage.py createsuperuser