Narrative development tool built with Rails.
Ruby HTML CSS Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bin
config
db
lib
log
public
spec
tmp
vendor
.gitignore
.rspec
.ruby-version
Gemfile
Gemfile.lock
NOTES.md
README.md
Rakefile
bower.json
config.ru
license
package.json
readme_storyplan.jpg

README.md

Rails Storyplan

Storyplan is a narrative development tool built using Rails to help users plan out stories and connect with others as their projects evolve. It has started out as a CRUD application involving the creation of stories, chapters, and characters, but there is room for greater functionality going forward.

screenshot

Demo App

You can see a demo version of the application deployed to Heroku here: https://rails-storyplan.herokuapp.com/

Functionality

Users can create an account either manually or via Facebook. They can create stories and associate chapters with them to flesh them out and develop narrative structure. Users can create characters that can be associated with chapters they appear in, but can also exist independently, offering the option to begin story planning with characters first.

In addition to creating models, users can view the stories, chapters, and characters of other writers as well, sortable through different paths (such as audiences or genres).

Application Info

  • Authentication (user registration and login) is handled by the Rails Devise gem. Facebook authentication is enabled via OAuth for Devise.
  • The back end uses ActiveRecord as the ORM. It uses PostgreSQL for the database via the pg gem.
  • The front end leverages Bootstrap 4 via the Bootstrap gem in conjunction with Rails ERB templates. Styling uses SCSS.
  • Pagination uses the Kaminari gem.
  • Image uploading is managed by the Rails Paperclip. For production, it's configured to use AWS S3 to store images.

Install Instructions

In order to get the application to work, install dependencies from the Gemfile via Bundler by running bundle install.

Since the application uses PostgreSQL, you need to have it installed locally on your machine with a user that has table creation privileges. You can get further instructions here. If you'd rather not bother with PostgreSQL, you can use an older version of the application that uses SQLite3 here.

Create the database with bundle exec rails db:create and run migrations with bundle exec rails db:migrate, then run bundle exec rails db:seed to populate the database. You need to seed, or else there will be no genres or audiences. In order to get OAuth to work, you need a .env file with a secret and application key for Facebook.

Front end dependencies are managed by bower-rails with the bower.json file. Dependencies are checked into git (under vendor/assets/bower_components), so no action is required.

For production, the application is configured to use AWS S3 for image uploads. You can read more about setting up S3 here (with Heroku).

Testing

The test suite is developed using Rspec via the rspec-rails gem with shoulda-matchers. Capybara is used for integration (feature) testing to mimic user browser interaction, while model factories are set up with FactoryGirl.

Tests are located under the /spec folder. Model and controller level tests are fairly comprehensive, while feature tests only test core CRUD functionality right now. In order to run tests, run bundle exec rspec followed by an optional folder or file under the /spec directory (for example, if you only want to test models, run bundle exec rspec spec/models).

More Info

For more, see this post: http://mitulmistry.github.io/ruby/rails/rails-project/

This project began as a Rails assessment for Flatiron School's Learn Verified Full Stack Development program: https://github.com/learn-co-students/rails-assessment-v-000

License

This project is open source under the terms of the MIT License.