GithubHelp home page GithubHelp logo

smartflix's People

Contributors

unijewski avatar

Watchers

 avatar

smartflix's Issues

Render shows to the homepage

You have just set up a Rails application with a test-driven dummy view! ๐ŸŽ‰

In this challenge, you will update the application so the root route renders the shows from the provided CSV file.

Here's how it should look by the end of this ticket:

Basic Smartflix homepage with shows

To complete this ticket, you will have to:

  • Write a new acceptance test that asserts: when the user visits the homepage, the page content should include each show title in the provided CSV file.
  • Configure your Rails app to use Haml for the views.
  • Create a new controller to show all shows. Make sure you're following the Rails naming conventions!
  • Create a new route so that users visiting the root of your application are directed to the index action of your new controller. Make sure you're following the Rails routing conventions!
  • Pass the acceptance test by displaying all shows from the provided CSV file file.

Tips

  • There are a lot of shows in the provided CSV file! You may need to limit the number you render to the view.

Import the movies CSV into the database

You've built a Bootstrap-styled homepage displaying all the movies in the provided CSV file.

In this ticket, you'll import that data into your application by storing it in a Postgres database.

To complete this ticket, you must:

  • Install Postgres.
  • Connect your Rails application to your Postgres database.
  • Create the database using the Rails CLI.
  • Generate an appropriately-named Rails model (and associated migration) using the Rails Command Line with the following properties:
    • show_type, as a string that is never null.
    • title, as a string that is never null.
    • director, as a string.
    • cast, as a text.
    • country, as a string.
    • date_added, as a date.
    • release_year, as an integer that is never null.
    • rating, as a string.
    • duration, as a string.
    • listed_in, as a text.
    • description, as a text.
      Feel free to rename the properties to follow conventions.
  • Migrate the database to update it with the new structure.
  • Create a new Rake task for importing the CSV. Consider that you'll be importing a lot of data!
  • Run the Rake task to import the CSV data into your database. Check that it worked using the Rails Console.
  • Rewrite your controller and view to use the database-backed models, instead of reading from the CSV.

Tips

  • When generating a model, you should always check (and amend) the generated migration file before running it.
  • Rails applications default to using a lightweight in-memory database called sqlite. You won't need this any more, so you can remove references to sqlite from your application (for example, in the Gemfile).
  • Since shows can only be one of two types ('Movie' or 'TV Show'), consider using a Rails enum for the show type. You may need to generate a Rails migration to do this!

Dockerise the app

In the previous ticket, deployed your app to Heroku using Git.

In this ticket, you will deploy your app to Heroku using Docker.

To complete this ticket, you must:

  • Install Docker.
  • Define .dockerignore.
  • Create a dedicated Docker image for your application.
    • Don't forget about JS dependencies.
  • Create docker-compose.yml file and configure multiple containers, such as the application, database and so on.
  • Update database.yml file.
  • Configure environment variables accordingly.

Tips

  • The process of readying your app for deployment with Docker is called containerisation (๐Ÿ“ฝ๏ธ ).
  • Here (๐Ÿ“„ ) is why Docker is a good idea.
  • A guide by Semaphore on how to dockerise a Rails app.

Style the homepage

In the previous ticket, you created an unstyled homepage that loads and displays data from the provided CSV file.

In this ticket, you will style that homepage using CSS, Sass, and Bootstrap. Here's what it will look like:

Styled Smartflix homepage

To complete this challenge, you will have to:

  • Configure your Rails app to use Sass as a pre-processor.
  • Reset any automatic browser styles with a CSS reset.
  • Add the Bootstrap CSS framework to your application.
  • Style the homepage so it matches the screenshot above. Aim for perfection!
  • When you submit a Pull Request for this ticket, include a screenshot of your app's homepage.

Tips

Setup a new Rails application

Welcome to the Smartflix Basics project!

In this ticket, you will build a basic, dummy, unstyled version of the Smartflix homepage. Here's how it will look:

Basic Smartflix page

To complete this ticket, you will need to:

  • Set up a new Ruby on Rails app called smartflix.
  • Write an acceptance test using Capybara that asserts: when the user visits the index route (/), the page content includes Smartflix.
  • Create a new route, controller, and view to pass the acceptance test. Make sure you're following the Rails conventions!

Deploy the app to Heroku using Git

In the previous ticket, you styled the homepage that lists all the movies in the provided CSV.

In this ticket, you will deploy your app to Heroku using Git.

To complete this ticket, you must:

  • Create an account on Heroku.
  • Deploy the application to Heroku using Git.
  • Visit your working, production application!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.