juanalvarez123 / contests-v1

Web application built on Ruby. It uses local storage and a relational database.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contests web application

This is a web application to manage contests, user's login/registration and participation in contests uploading audios.

Version 1

  • Built on Ruby and Ruby on Rails.
  • Bootstrap as a front-end framework.
  • Uses local storage to store images and audios.
  • Uses a relational database.

Assumptions

This application was created using:

  • Ruby 2.5.3
  • Rails 5.2.2
  • Ubuntu 18.4
  • MySQL 14.14

Prerequisites

  1. Install Ruby on Rails, follow this link.
  2. Install Git, follow this link.
  3. Install MySQL, follow this link.

Instructions

  1. Configure these environment variables:
Environment variable Example Description
CONTESTS_SERVER_URL http://localhost:8000/ The server URL where web application is deployed
CONTESTS_DATABASE_HOST localhost or 127.0.0.1 The database host
CONTESTS_DATABASE_USER root The database user
CONTESTS_DATABASE_PASSWORD 12345 The database password
CONTESTS_DATABASE_NAME contests The database name
CONTESTS_PATH_IMAGES /home/images/ The path for images
CONTESTS_PATH_ORIGINAL_FILES /home/audio/original/ The path where ORIGINAL audio files will be stored
CONTESTS_PATH_CONVERTED_FILES /home/audio/converted/ The path where CONVERTED audio files will be stored
  1. Go to bin/ folder.

  2. Install the MySQL gem and dependencies:

sudo apt-get install libmysqlclient-dev
gem install mysql2
  1. Install all the necessary gems and update the existing ones:
gem update
gem install rails
bundle install
  1. Create database model:
rails db:migrate
  1. Run the server:
rails server -p 8000
  1. Go to your favorite web browser and type:
http://localhost:8000/
  1. Enjoy.

About

Web application built on Ruby. It uses local storage and a relational database.


Languages

Language:CSS 69.1%Language:JavaScript 21.8%Language:HTML 5.1%Language:Ruby 4.0%Language:Shell 0.0%