Skip to content

Instantly share code, notes, and snippets.

@daryllxd
Last active March 22, 2017 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daryllxd/e4e420f3f8a967955ae070878cd82fcc to your computer and use it in GitHub Desktop.
Save daryllxd/e4e420f3f8a967955ae070878cd82fcc to your computer and use it in GitHub Desktop.
HaybaDesu
HaybaDesu -- AirBnb clone
Purely back-end app, JSON only.
- 1st Part -- Hosts/adding properties
- Hosts Table - Email, Password, FirstName, LastName, Location, ImageUrl
- Host has_many Accomodations
- Accomodations Table - Name, Location, Description, Status (Unbooked or Occupied)
- An Accomodation has_many AccomodationPhotos
- AccomodationPhotos Table - ImageUrl (required), Caption (not required, but if none was generated, save as "Caption#{AccomodationPhoto.Id}"
- All tables have timestamps
Endpoints (Namespace all endpoints as /hosts/...)
- Host can sign up
- Host can add Accomodation
- Host can edit Accomodation
- Host can set Accomodation as Occupied
- Host can add AccomodationPhoto for an Accomodation
- Host can edit AccomodationPhoto
- Host can delete AccomodationPhoto
- Host can view all of their accomodations (paginated) -> 5 per page (params[:page])
-> Use rails generate model instead of rails generate migration if making a table
-> Use PostgreSQL as the database
Phase 2
- Use kaminari gem to paginate Accomodations and Users.
- Use paperclip gem so the user can upload an AccomodationPhoto.
- Research: How to send an email after a user adds an Accomodation -> (How to use Rails ActionMailer).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment