View it live at: https://grab-bag-1701.herokuapp.com/
The goal of this project was to 'clone' the base functionality of Dropbox.
To set up a local copy of this project, perform the following:
- Clone the repository:
git clone https://github.com/glassjoseph/grab_bag.git
cd
into the project's directory- Run
bundle install
- Run
bundle exec rake db:{create,migrate,seed}
to set up the database locally and seed it with files, folders, users, and comments - To login as an admin (in development), use these credentials - username: admin1, password: password
- Run the application in the dev environment with
rails s
- Visit http://localhost:3000/ and enjoy
A visual representation of the schema is here:
- A visitor is an un-logged in user
- He can view public folders, and that's about it
- A user can sign up for an account via Facebook or create one manually
- Regardless of signup method, they must provide a username and phone number for Two Factor Authentication purposes
- A user can view and edit their details
- A user can reset their password with a text confirmation (via Twilio)
- A user is created with a home folder, via a private
make_folder
method.@user.home
will return this folder - A user has
owned_folders
, a relationship throughFolder
, through the foreign keyuser_id
- An admin can make other users into admins, deactivate users, and delete files and folders
- Every user is created with a home folder
- When a new folder is created, its entire path is stored in the database
- Folders can be created as public or private
- Folders can be shared by entering another user's email, which sends that user an email invite link
- Folders have a method
children
. This includes both other folders and binaries stored in that folder - Folders have a method
url
, which concatenates a complete route by combining theowner.username
and theroute
- Files can be uploaded or downloaded if they belong to that user, or if they are in a folder shared with that user
- Files can be previewed on the page
- Binary has a
url
method which builds the url by combining thefolder.url
,name
, andextension
- A user can leave comments on any file that is owned or shared with him
- A user can like a comment or a file to which he has access, and can like it as many times as he wants, so feel free to go a bit crazy
- Related to Binaries and Comments through a polymorphic association
- We used Bootstrap to style our website.
- The test suite tests the application on multiple levels. To run all of the tests, run
rspec
from the terminal in the main directory of the project. The feature tests (integration tests) rely mainly on the capybara gem for navigating the various application views.
- This application depends on many ruby gems, all of which are found in the
Gemfile
and can be installed by runningbundle install
from the terminal in the main directory of the project.
Joseph Glass
Jonathan Kidd
Sam Landfried
Danny Radden
Brett Schwartz