Learn Ruby on Rails by building an online marketplace like Etsy or Airbnb from scratch.
Connect two parties through your platform.
In this course, you'll learn how to build a two-sided marketplace for buyers and sellers. Sellers will be able to upload listings with images, manage their inventory through a dashboard, and charge credit cards with the Stripe API. You'll learn how to take a small percentage cut of each transaction and transfer payments to your sellers.
View a live demonstration of the final Etsydemo app we'll be building and get an introduction to the topics this course will cover.
Install the latest versions of Ruby on Rails, Xcode, iTerm2, Git, and Sublime Text on your Mac computer. Set up a shortcut to launch Sublime Text from your terminal.
Install the latest versions of Ruby on Rails and Sublime Text on your computer. Launch your terminal with Git Bash and verify your installation worked correctly.
Learn common terminal commands and create a new app Rails. Launch your Rails server and explore localhost:3000 to see your new app.
Generate static pages in Rails by creating an "About" and "Contact" page for your app. Add content to your pages with HTML.
Add links for the "About" and "Contact" URLs. Organize common code into a single location in the Application Layout file to decrease redundancy.
Learn the 3-step process for generating migrations. Create a page with the ability to add new product listings with a name, description, and price field. Set the homepage to be the new Listings Index page.
Learn how to use gems to add prepackaged features to your site. You'll install the Bootstrap gem and set it up properly for usage.
Learn to work with Bootstrap by reading the documentation on their site. Use Bootstrap to add a navigation bar and add the "About" and "Contact" links.
It's best practice to simplify code files for readability and debugging. Learn how partials and embedded Ruby work to clean up the header and footer files.
Use Bootstrap classes to add better spacing and design to the New Listing form and Edit Listing form. Add a variety of Bootstrap buttons on each page.
Install the Paperclip and ImageMagick gem by reading and implementing the documentation for both Mac and Windows computers.
Generate a migration to add images to the listings database. Learn to authorize images so they can be sent in the forms, update the forms to give users the ability to upload an image, and display the image in the Index and Show pages for each listing.
Use the Bootstrap grid system to split the screen into different-sized columns. Organize your listings as thumbnails in four columns on the Index page. Learn how to display numbers as currency.
Learn how to use CSS with Bootstrap by creating a custom.css.scss file. Customize your app's background-color, font color, and font-family with CSS. Use a Google Chrome extension to find specific web colors to use. Learn how the nth-child CSS selector can identify specific listings to align.
Create a new Github account to save your code online in a repository. Generate a new SSH key to authenticate your account on your computer.
Learn how to commit and push your code to Github. Start by creating a new repository on Github for your app. Learn the four commands you need to run each time you save your code to Github.
Learn how to launch your app live on the web by hosting it for free on Heroku. Set up Heroku for the production and development environments on your computer and launch your app live on the web for the first time.
Use Dropbox to host your images online for others to see and use the Paperclip-dropbox gem to upload our files. Install Dropbox on your computer and store your account information in a dropbox.yml file.
Protect your sensitive account information in your code by storing your information in a gem called Figaro.
Configure separate settings in Dropbox for Heroku (production environment) and localhost (development environment) so that images you upload on localhost won't get sent to Github.
Install and set up a popular gem called Devise to give our app the ability to have multiple user accounts. Verify that it works by signing up with an email and password.
Learn to use the command 'rake routes' to find which routes to use for creating new URLs. Add a "Sign up", "Sign in", and "Sign out" button to our navigation bar. Learn how to add conditional links so different users see different links depending on whether they are signed in or not.
Improve the look and feel of the Devise forms for signing in and signing up. Add some custom Ruby code to customize the Devise alert messages when users don't fill in the form properly.
Allow users to sign up with their first and last name in addition to their email by generating a new migration to add two new fields to the User database.
Learn how to use validations in the Models files to verify that the user-submitted data satisfies certain criteria such as filling in form fields, uploading images, and inputting prices greater than $0.
Link Listings with Users in the Controller file so that the Listing database can track the User that each Listing belongs to. Learn how Models, Views, Controllers work together in Rails to create an app.
Add authorizations to control the pages and URLs that each user is allowed to see. Allow users to only edit and delete listings created with their own account once they are signed in.
Create individual Seller pages that show only the listings each seller has uploaded. First add a new URL in the config/routes file, then update the Controller about this new action, and finally, create a View page for users to see when they visit the new seller URL.
Transform the Seller page into a dashboard where Sellers can manage all their listings in one place. Wrap the listings in an HTML table for a structured layout with dropdown buttons.
Create a homepage banner with Bootstrap's jumbotron class and add a custom image and text in the banner.
Create a new migration for an Orders database that tracks the address of the buyer. Identify and link the relationship between the Order, Listing, and User databases through unique Listing, Buyer, and Seller IDs.
Tell Rails how to fill out the information for the columns in the Order database by using the unique IDs of the currently signed in User who is placing the order, the Seller ID, and the Listing ID in the URL.
Create two separate pages for Users to view their past purchases and past sales. Showcase the information in a formatted table with image, item name, price, and date.
Create Dropdown menus in the navigation bar with URLs for "Purchase History" and "Manage Listings". Disable a user's ability to edit their Order histories.
Accept money from users by using the Stripe API to accept online credit card payments. Add your sensitive Stripe keys to the Figaro gem.
Update the Order form with form fields for users to input their credit card information. Display your form with the Bootstrap grid system.
Use Coffeescript to check the user's credit card information, let the User know if there were any issues they need to correct, and let the form submit once the credit card data is valid.
Once Stripe returns a valid token, write the code to charge a user's credit card. Verify that the payment went through in your Stripe dashboard.
Set up your app so sellers are asked for their bank account details when they first create a new listing. Add bank account information fields to your New Listing form.
Write Coffeescript code to check whether the bank account information the user submits is valid. Test out errors on localhost with test bank account numbers provided on the Stripe API documentation.
Create a Stripe recipient in the Listings controller by using the token from Stripe. Transfer 95% of each transaction to the seller and keep 5% for yourself. Place a test order on Heroku and check that it went through on Stripe.
Moving forward, apply what you've learned to building out your own Rails app by using this course as a guide.
“I personally and wholeheartedly recommend this for anyone who wants to jump in with both feet and learn as you go by creating an actual application that you can use and or modify for your own use.” - William P.
"I created my own demo website and deployed to Heroku in 2 days. Alex explained eveything you need when you start Ruby on Rails: installing gems, facing problems on Ruby, creating lists, bootstrap designs, uploading images, Git version control, deploying on Heroku. I'm waiting for more lectures/courses from Alex." - Volkan G.
"I just finished your course, and I loved every minute of it. It's amazing how much I've learned in just a couple of days, and I'm excited to continue learning more and applying the skills I gained from watching your videos." - Matthew F.