Home > dietcontest

dietcontest

Dietcontest is a project mainly written in PERL and CSS, it's free.

office colleagues wanted to lose weight together and make a game out of it, this is an app to sign up and keep track of their progress.

Screenshots

Main Page

Login Page

Leaderboard

Install (Perl modules & Ubuntu packages dependencies)

  1. Ubuntu packages sudo apt-get install apache2 mysql-server phpmyadmin git-core

  2. and these perl modules: sudo apt-get install libmime-base64-urlsafe-perl libchart-strip-perl libdate-manip-perl

  3. then make a user named "fwiffo" (or alternatively you can modify the apache config files to point to the right directories)

sudo adduser fwiffo
su fwiffo
cd ~fwiffo
mkdir scripts
cd scripts
  1. grab the app git clone https://github.com/borgified/dietcontest.git

  2. make links so apache can read the config file that is provided, and get rid of the existing 0default link, restart apache2

    cd /etc/apache2/sites-enabled
    sudo ln -s /home/fwiffo/scripts/dietcontest/utils/apache2/dietcontest
    sudo rm 0default
    sudo /etc/init.d/apache2 restart
    
  3. create your tables with the predefined structure, assumes no root password for mysql root user, if you do have a password just modify this line in the scripts: my $dbh = DBI->connect('DBI:mysql:dietcontest', 'root', '')

    mysql -uroot -p
    source /home/fwiffo/scripts/dietcontest/utils/mysql/dietcontest.mysql
    
  4. that's it, just browse over to http://localhost/ for the main page. to zero out all the values in the database, just go to http://localhost/phpmyadmin and click on the "Empty" tab for each table. be sure to repopulate the avatars table using the helper script afterwards:

    cd /home/fwiffo/scripts/dietcontest/utils
    ./installavatars.pl