kristenmarie / volunteer-tracker

Epicodus independent project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Volunteer Tracker

A volunteer tracking web application, 9.22.2017

By Kristen Marie Kulha

Description

This web application allows users to create projects and assign volunteers to projects that have been created. From the landing page, the user view a list of ongoing projects and also add a new project. When a particular project is clicked, the user is taken to that projects unique page where a list of volunteers assigned to that specific project is listed. The user can then update the title of the project if they so choose and also add volunteers to the project. There is also a delete button that will remove the project and all associated volunteers and redirect the user to the Home page.

Specifications

  • It will create an instance of a project class.
    • Example input: project = project.new({:title => "Teaching Kids to Code", :id => nil})
    • Example output: project.name = "Teaching Kids to Code"
  • It will save an instance of the project to the database.
    • Example input: project.save
    • Example output: Innerstellar Pig, William Sleator, nil
  • It will return a list of projects from the database.
    • Example input: Project.all
    • Example output: [project]
  • It will allow user to delete projects from the database.
    • Example input: project.delete({:title => "Teaching Kids to Code", :id => nil})
    • Example output: Project.all != [project]
  • It will return a project when given the id.
    • Example input: Project.(id)
    • Example output: project
  • It will create an instance of the volunteer class.
    • Example input: volunteer = Volunteer.new({:name => "Jónsi", :project_id => 1, :id => nil})
    • Example output: volunteer.name = "Jónsi"
  • It will save an instance of a volunteer to the database.
    • Example input: volunteer.save
    • Example output: Volunteer.all = [volunteer]
  • It will return a list of volunteers from the database.
    • Example input: Volunteer.all
    • Example output: [volunteer]
  • It will update a project in the database.
    • Example input: project.update ({:title => "Jónsi Birgisson Project"})
    • Example output: project.title = "Jónsi Birgisson Project"
  • It will delete a project from the database.
    • Example input: project.delete
    • Example output: Project.all != [project]

Setup/Installation Requirements

  • Clone directory from github using git

  • NOTE: These instructions assume you already have Ruby and Sinatra installed.

Installing the necessary database:

  • Do you have postgres and psql installed? Download

  • In your terminal enter: $postgres

  • Now enter $psql

  • Create the needed database by entering $CREATE DATABASE volunteer_tracker;

  • Connect to new database by entering $c\ volunteer_tracker

  • Enter the following:

CREATE TABLE projects (id serial PRIMARY KEY, title varchar);

The terminal should echo back CREATE TABLE. Then enter:

CREATE TABLE volunteers (id serial PRIMARY KEY, name varchar, project_id int);

  • In terminal, navigate into main project directory folder

  • Enter: $ruby app.rb

  • In web browser of choice copy and paste the following into the address field : http://localhost:4567/

Known Bugs

There are no known bugs at this time.

Support and contact details

Feel free to contact me at kristen.m.kulha@gmail.com

Technologies Used

Ruby, Sinatra, SQL, HTML, CSS, Bootstrap

License

This software is licensed under the MIT license.

Copyright (c) 2017 Kristen Marie Kulha

About

Epicodus independent project


Languages

Language:Ruby 74.5%Language:HTML 16.7%Language:CSS 8.8%