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.
You can see a demo version of the application deployed to Heroku here: https://rails-storyplan.herokuapp.com/
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).
- 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.
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.
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).
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
This project is open source under the terms of the MIT License.