PlanHappy TV is a web app which allows users to track which TV show episodes they've watched and add shows to their watchlist.
- A User should be able to:
- Mark Episodes as watched/unwatched
- Add/Remove Shows to/from their Watchlist
- Set their Watchlist to private to prevent access by other users
- Be notified about upcoming airing Episodes
The following page structure will be required:
- Most watched Episodes
- Upcoming Episodes
- Watchlists that include the Show
- Only watchlists that are visible to the logged in user
- Seasons belonging to the Show
- The next airing Episode, if there is one
- Add/Remove Show to/from Watchlist
- Episode list, ordered by air date
- List of Users who have watched
- Mark as watched/unwatch
- Only if the Episode has aired
- The User's Watchlist with a list of Shows
- Recently watched Episodes
- Toggle visibility of the Watchlist
Send out a basic email notification to a User 1 hour before an Episode airs if the user has the Show on their Watchlist.
Please write some HTTP Tests to test various functionality.
Some initial tests have been added to tests/Feature/HttpTest
.
There are a handful of incomplete tests in here which will need implementing.
Feel free to write additional tests for any other functionality that may require it.
Don't worry about hitting 100% test coverage.
You can run the PHPUnit test suite with composer test
This project assumes you have developed a Laravel app locally before using a solution such as Homestead or Valet.
- Clone this repository to your local machine
- Create a new branch to complete your work
- Copy the
.env.example
file to.env
- Run
composer install
- Run
php artisan key:generate
- Run
npm install
- Run
npm run dev
- Update the database values in the
.env
file - Run
php artisan migrate:fresh --seed
- Commit changes as you go and don't forget to push changes to the repository
- Create Pull Request on GitHub to merge your branch back into
master
- You can use this Pull Request to ask for any help that may be required from us.
- When finished assign the Pull Request to @seanmtaylor
- Please follow PSR-12
- Add parameter type hints where possible
- Add method return types where possible
- Use Form Requests for validation
- Use Policies for Authorization
- Reuse blade views where possible
- Ensure eager loading is used where possible to avoid any N + 1 issues
- Don't worry too much about how things look from a design perspective
- Some code has already been written for you, this may contain mistakes or things that can be optimised
- Feel free to refactor anything
The following tools have been added to help you with your development
- Telescope - accessible at
yourappurl.test/telescope
- PHP-CS-Fixer -
composer style
- This will follow PSR-2 as well as some additional rules - PHPStan -
composer analyse
- This will analyse your code for any potential errors - Laravel IDE Helper -
composer ide-helper
- Generates helper files that enable your IDE to provide accurate autocompletion