Skip to content
This repository has been archived by the owner on Jan 1, 2022. It is now read-only.

breadtubetv/breadtubetv

Repository files navigation

BreadTube.tv

This is the working project for the redesign and relaunch of BreadTube.tv.

This second iteration of the project aims to solve these two key problems of the first site.

  • Design: Improve Usability through a purposeful design
  • Moderation: Improve Usability through an automated update system

Design

Daniel Torres has provided the wireframes and logos for the site https://xd.adobe.com/view/f7e45c84-fe46-4754-48a9-28cf24dc3a5b-81d5/

Application

This application is written in Ruby on Rails and runs on Docker.

Developing

To start required services in the current console and have everything reload when files are changed, use:

docker-compose up

After some time (various bundles and templates will need to be built/cached), you can access your instance of app at http://localhost:3000.

To start the services in detached mode (will stay alive if terminal closes), use docker-compose up -d. If you do this and want to access the logs of the containers, you can use docker-compose logs -f.

To bring the services down (will wipe database), use:

docker-compose down

Database Setup

Once the services are up, you can use the following to initialise the database:

docker-compose exec web rails db:create db:setup

Accessing Containers

Generally speaking, any command can be executed on the appropriate Docker container using docker-compose exec <container> <command>. Note that the container must be up to use exec.

The available containers are:

  • web
  • webpacker
  • postgres

Functionality

The following functionality is available, designs for further improvements are also provided.

Administration

TODO: Images are served locally, which means channel images need to be added to the repo in development This means you need to import a channel in development and deploy the code, before importing in production Resolving this requires storing images for production on a hosted service, or not using Heroku

rails breadtube:heroku:pull

Import a YouTube Channel

Create channel and set title, description, image

rails breadtube:import:youtube[<url>]

Locally

docker-compose run web rails breadtube:import:youtube[https://www.youtube.com/channel/UCRwzzq8hVdFjcNw_I9wZrVQ]

Heroku

heroku run rails breadtube:import:youtube[https://www.youtube.com/channel/UCR_RL13AHgqojmKC6HFfzRA]

Refresh a Channel

Pull in all data from the channel (uses API)

heroku run rails breadtube:refresh:channel[

Sync a Channel

Pull in last 10 videos

Locally

heroku run rails breadtube:sync:channel[zoomernation]

Roadmap

2020 Q4

  • Fix build pipeline for tests are deploys
  • Complete automated feature testing
  • Simplify adding a channel to one command / page
  • Optmize build/deploy pipeline

2021 Q1

  • TBD