hect1c / skitty_v2

2 stars 0 forks source link

Create, integrate `GIF` model #17

Open EranSch opened 10 years ago

EranSch commented 10 years ago

Splitting off from #8...

Ahh, an integral component to our beloved Skitty... animated GIFs. This should be an interesting endeavor to say the least. It's one thing to create a model and start storing this resource in Mongo but it will be yet another to make the resource manageable from the frontend. Luckily, if we stick to modeling with Mongoose then everything should be fairly tangible. Here's the process I see working best, we start from the express end and link it up to the bot last.

  1. (The easy part) Create CRUD module with MEAN.JS Generator: yo meanjs:crud-module <module-name> -- this will create the UI, barebones schema, controllers, views, and everything else.
  2. Customize Schema
  3. Figure out where images will be stored (third party or locally?)
    • If hosted locally, need express route to return images
  4. Refactor bot to query database for GIFs
  5. Just so a barebones setup isn't totally empty, I think we should figure out a way to load the existing GIFs into the DB on launch if they don't exist.

Thoughts?

EranSch commented 10 years ago

After having an hour to dwell on it, this would be 1,000,000x easier to just require images be hosted on a third party like imgur and include a URL field.

hect1c commented 10 years ago

I agree with the logic, makes sense:

  1. I think we should utilize a third party that will allow us to use an API to be able to maintain the gifs, and route them so imgur or any similar sites should definitely be considered. I'll see if there is anything else besides imgur out there that we can use.