Wotchd - a mobile application which groups your hours spent on watching entertainment TV Shows during the day, week or the month.
This project is part of the Microverse curriculum in Ruby On Rails course!
Explore the docs »
View Demo
Report Bug
Request Feature
Wotchd is a tracker app.
It is an application to group and track your hours spent on watching your favorite TV Shows
Additional features are :
- User can delete a program
- User can update a group and change its icon
- Screen Shots
- Video presentation
- About the Project
- N+1 Problem
- Entities Relationship Diagram
- Live Version
- Application Instructions
- System Requierments
- Dependencies
- Configuration
- Development
- Testing
- Populate DB
- Built With
- Contributors
- Copy Rights
- Acknowledgements
The project creates a database which holds 3 tables:
- Users : Is the table containing the users' data
- Fields :
- string: name
- string: email
- string: password
- datetime: created_at
- datetime: update_at
- Programs : is the table containing the programs' data
- Fields:
- string: name
- integer: amount
- integer: author_id
- integer: group_id
- datetime: created_at
- datetime: update_at
- Groups : Is the table to groups programs
- Fields
- string: name
- string: icon
- datetime: created_at
- datetime: update_at
We have 2 tables created by the ActiveStorage to store users and groups avatars as well.
- active_storage_attachments
- active_storage_blobs
The n+1 problem encountered in this project is the association between a user, programs and groups (retrieve all the programs associated with a group or not of a user.)
has_many :programs, -> { includes :group }, class_name: 'Program'
Exemples for Program class
scope :no_group, -> { where group_id: nil }
scope :daily, -> { where(created_at: Time.now.beginning_of_day..Time.zone.now) }
scope :weekly, -> { where(created_at: Time.now.prev_day(days = 7)..Time.zone.now) }
scope :monthly, -> { where(created_at: Time.now.prev_month(months = 1)..Time.zone.now) }
You can see it working on [Heroku]
- A guest user open the app and access the splash screen which display the logo and two buttons, login and sign up
- You need to sign in with only your name if you already have an account or sign up in order to navigate through the app
- When logged in,
- You can see all your programs and your shuffled programs by clicking on the appropriate buttons
- You can create a new program and add a group or not to it
- You can see all existing groups by clicking on the link 'All group' in the main page
- You can create a new group of programs by clicking on the green button in the bottom of the page ('All groups page')
- you can edit a group by clicking on the button in the top right corner of the group's show page
- Click in the small sidebar in the user profile page to have a resume of your hours watched for the current day, the week (the last 7 days), and the month (the last 30 days)
- Ruby
- Rails
- Yarn
- RSpec
- ActiveStorage
- gem 'rspec-rails'
- gem 'capybara'
- gem 'selenium-webdriver'
- gem 'chromedriver-helper
- gem 'bcrypt'
- gem 'rack-cors'
- gem 'factory_bot_rails'
- gem 'rails-controller-testing'
- gem 'faker'
- gem 'capybara'
- gem 'guard-rspec'
- gem 'launchy'
- gem 'aws-sdk-s3'
- gem 'coderay'
- first, clone the project Run
git clone https://github.com/ericmbouwe/Wotchd.git
- Install the necessary dependancies Run
rails db:create
rails active_storage:install
rails db:migrate
bundle install
yarn install
- Clone the project
https://github.com/ericmbouwe/Wotchd.git
In order to run tests, run this command first
rails generate rspec:install
Then run
- For full tests
bundle exec rspec spec
- For a specific model
bundle exec rspec spec/models/{model_name}_spec.rb
Unit and integration tests have been done using RSpec an Capybara
- Location ./spec/
This project was built using these technologies.
- Ruby version 2.6
- Ruby On Rails version 6.0
- rspec
- capybara
- ActiveStorage
- Heroku
- Bootstrap 4
- AWS
👤 Author
- Github: @ericmbouwe
- Twitter: @ericmbouwe
- Linkedin: Eric Mbouwe
- E-mail: ericmbouwe@gmail.com
Gregoire Vella on Behance
And his ideas, for the original design