Functional Document - nosesandsight/rm GitHub Wiki

Functional Document

Introduction

The site has two major components. Primarily the site is designed as a database of Volunteer Voice Programs, these Programs belong to specific Volunteer Organization. Any user will be able to search through a ‘Search Machine’ page and find organization, based on specific details. The second component is a User Profile system. Users will be able to log in, comment and review programs, save programs to their profile, and message one another. There is also a separate blog that needs to be built, but it shouldn’t be that hard and we can focus on it when we finish up with everything else.

I think a good idea would be to split up the two components, so that you can take one of them and I can take the other, and then we can integrate them (or rebuild them). One of us figures how to build a framework for managing Organizations and Programs, and then build a faceted search page. The other one figures how to implement users and tie them into Reviews. Think about which one would be easier for you.

Resources

Rails works on providing a simple framework for working resources, so I am going to break out the primary Resources that we will need to create Models for.

Organization

Will be searchable, have several fields such as Location, Size, Profit/Non-Profit. Will contain Programs as children. Thus each program will belong_to to a Organization and Organizations will has_many programs.

Organizations will have a rating, which is determined by the average of all ratings applied to their programs. Thus if Organization A has 10 programs, and each of those programs has 5 reviews. Then the Organizations Rating will be the average of the 50 Reviews.

There will be a Organization Profile Page, I will send a screenshot as soon as it’s completed.

Programs

This will be the primary resources users will interact, there will be over 12 associated fields, including cost, location, program type and more. Programs will belong to Organizations, and have_many Reviews Programs will have a search page, and individual profile pages. Users will be able to apply reviews against Users

We will implement Devise gem for users, it creates pretty much all the necessary components for integrating users. The tricky part will be tying User with the Reviews, and accessing the user model through other controllers.

Reviews

Reviews will belong to Programs, and Users. They will be listed on the Program profile page, but they can also be accessed by the parent organization.

Functionality Analysis

User Functionality

We will be implementing Devise (https://github.com/plataformatec/devise), it has pretty much all the functionality we need. For example it has user registration, validation, and email confirmation. It ties in with a users cookies, and build sessions when a user logs in. It has helper functions that the view can call to create ‘Login’ and ‘Logout’ links. The main thing we will have to do is integrate it so that Users have their own profile pages, and that users can do reviews.

Login and Logout Link

We will have a link in the top-right hand corner allowing users to login and log-out. The app needs to access the Session to decide which link to display.

  • Helper Function that is called by view to determine wither ‘Login’ or ‘Logout’ is displayed.

  • Selecting ‘Login’ will display a Username/Password form, that when submitted logs in the user

  • Selecting ‘Logout’ will destroy the current users session and re-direct to the page

Register

Selecting the ‘Register’ will take a user to a Registration Form, that they will input their user details in. We are still figuring out the exact meta-data associated with each User account.

  • User Registration Page, and Registration Form

  • Validation of User Fields

  • Successful submission of Register Page redirects to corresponding User Profile Page

Reviewing

If a user is logged in and they are viewing a specific page, selecting the ‘Review this Program’ will link to a Submit Review Form page. The user will then submit the necessary information, and that review will be linked to the Organization and the User

  • I will build Reviews, and the review form. But we will need to integrate this with the User Functionality so that users can leave Reviews

  • Users will also be able to Upload images for the program

  • Users will be able to Edit Reviews after they have submitted

User Profile Page

Each user will have their personal Profile page, which will display their corresponding Model data fields. In additional Users will see all reviews created, messages from other users, and be able to upload a picture.

  • Upload an Image, users will be able to select and upload an Image. There should already be a gem that does this functionality we just need to integrate it.

  • A listing of Reviews, you should be able to see all reviews that a user created, and selecting a review should re-direct you to that review.

  • Messages, if you are the user who is on the page, then you will see a listing of messages that users have sent to you. We should try to keep this as simple as possible, so it would be like a wall. Next to each message there will be a reply to sender, but replies will be treated as new messages.

  • There is a ‘Account Setting’s button in the mock-up but I am not sure exactly what that is for, I will get more information.

  • Favorite a Program, when browsing programs, if a user is signed in, they can save a Program to their profile page. These will display in the ‘My Favorites’ section of the User Profile page.

Organization/Program/Review Functionality

Program/Organization/Reviews Association

Organizations will have many programs, and programs will have many reviews.

  • Creating a Program should automatically update the corresponding Organization

  • Organizations will aggregate and average the Review score for each child Program

Program/Organization Search Page

The primary search page will have a listing of all the programs on the site. Users will then filter based on specific categories, filtering will reload the page with the applicable programs.

  • Facets: This will basically be a form with checkboxes that the user submits. Those values are then passed to the controller which will pull only those relevant searches. Each submission of the form will have to retain in memory when the page uploads.

  • Search Results: Programs that satisfy the search parameters will be listed with specific data, selecting that Program will link directly to the Program profile page.

  • Running a search in the search bar will populate this page with empty faceted values

Organization Profile Page

Organizations will have profile pages that will contain account information, program listings, and aggregate review content.

  • Account Information: Basic fields like name, location, profit vs. non-profit will be listed.

  • Write a Review: this button will link a user to a ‘Review Form’ with the Organization name already listed

  • Programs Tab: Each Organization will have a Program Tab, selecting that link will populate a page listing all the Programs associated with that organization

Program Profile Page

The program profile page will contain information regarding programs. Users will be able to ‘Review’ and ‘Favorite’ Programs.

  • Review: Selecting the Review button, will take a user to a ‘New Review’ page with the Organization and Program details already filled out.

  • Favorite: Selecting the Favorite button, will save the program on the users page, but redirect back to the Program page.

Submit a Review Page

Any logged in user will be able to submit a Review.

  • Submitting a Review will update the user’s ‘My Review’ page, the program’s list of reviews, and the Organization’s Review Score.