You will be creating Pinspiration, an idea-sharing platform that functions just like this little website!
Pinspiration requires registration to use. Users can upload, save, sort, and manage images—known as pins—and other media content (e.g., videos and images) through collections known as "pinboards". Pinspiration acts as a personalized media platform. Users can browse the content of others on the main page.
Not sure where to start? Try tackling your application in the following order...
- Draw an ERD
- Create migrations to define your database
- Define your models
- Define some basic routes
- Add controllers / actions & views
In this cloned repo directory:
rails _5.2.3_ new . -d postgresql --skip-turbolinks --skip--coffee --skip-git
As always, we build our application iteratively. You implement all the features of a level before implementing features of the next. Spend some time planning your approach to a feature before launching into it. Take advantage of the whiteboards -- they're everywhere.
Add to your seeds.rb
for the deafult data to make each iteration work.
Users can log in and create a pin.
They can see a single pin and a list of all pins.
Implement two models, with a RESTful interface to manage them...
- Pin
- Comment
Pins have...
- a title
- an image url
Comments have...
- a body
- a date/time posted
There is a one-to-many relationship between Pins and Comments.
A user can see on their /dashboard
all of their pins.
A user can see on their /dashboard
all of their comments for all pins.
Check out the ffaker
gem to make fake data in your app.
Bootstrap-ize your app by putting the bootstrap CDN link
tag in the head
. The head
tag is in views/layouts/application.html.erb
- Users have many boards, a board belongs to one user
- Boards have many pins, a pin belongs to one board
- Pins have many tags, a tag can be applied to many pins
- display all the pins for a given tag:
/tags/cats
- Instead of storing an image url as a string, allow users to upload to AWS using paperclip or carrierwave
- Users can sort, or filter of pins / boards / tags
- pins can be in multiple boards
- users can follow other users
- users can follow boards
A user's feed is compilation of the users they follow and the boards they follow