Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
7ab5fa9
first stage - fetching from API based on search query
rolandjlevy Sep 28, 2018
31605bd
Receiving results from fetch. trying to create results as a menu of l…
rolandjlevy Sep 28, 2018
6c86781
search results appearing in a list. Bug with errors though
rolandjlevy Sep 28, 2018
3cade8a
Bug fixed
rolandjlevy Sep 28, 2018
da704af
started to display selected movie
rolandjlevy Sep 29, 2018
36d24d8
Fixed bugs and added some styling
rolandjlevy Sep 29, 2018
1e0f80f
mobile view complete. NO working on responsiveness for iPad and Deskt…
rolandjlevy Sep 29, 2018
f77e57f
Minor tweaks
rolandjlevy Sep 29, 2018
739612e
Added pagination
rolandjlevy Sep 29, 2018
da7af7a
fixing bugs
rolandjlevy Sep 29, 2018
aa6c697
Completed pagination
rolandjlevy Sep 30, 2018
28f4625
Fixed bug with pagination
rolandjlevy Sep 30, 2018
ef54af3
Bug in DisplayMovie.js not rendering HTML correctly
rolandjlevy Sep 30, 2018
5aefa2b
fixed HTML render bug by making a component that uses dangerouslySetI…
rolandjlevy Sep 30, 2018
10c6335
Working on layout for iPad and desktop
rolandjlevy Sep 30, 2018
16485ae
Working on responsiveness
rolandjlevy Sep 30, 2018
6ac7740
made a start on favourites but ran out of time
rolandjlevy Sep 30, 2018
1584ebd
Updated favourites. Still no working.
rolandjlevy Sep 30, 2018
aa3039f
Tweaked CSS
rolandjlevy Oct 1, 2018
b2ac6b1
CSS tweaks
rolandjlevy Oct 1, 2018
901c42a
Added more commenting
rolandjlevy Oct 2, 2018
a7a64c5
Improved code in App.js by changing the way searchDisplay is set and …
rolandjlevy Oct 3, 2018
43fb8de
Completed Readme file
rolandjlevy Oct 10, 2018
785ae17
Small changes to Readme text
rolandjlevy Oct 10, 2018
8f9b70f
Updated Readme file
rolandjlevy Oct 16, 2018
ba79bad
Updated readme
rolandjlevy Nov 30, 2018
6a4fe9a
Readme updated
rolandjlevy Nov 30, 2018
60a1d00
Updated readme
rolandjlevy Nov 30, 2018
d4e25d7
Updated readme
rolandjlevy Nov 30, 2018
43dce84
Set theme jekyll-theme-minimal
rolandjlevy Dec 2, 2018
d94f276
Set theme jekyll-theme-minimal
rolandjlevy Dec 2, 2018
fd20642
Delete _config.yml
rolandjlevy Dec 2, 2018
269ad07
Update README.md
rolandjlevy Dec 2, 2018
5316fac
Changed where and how baseUrl is defined so Netlify can access it as …
rolandjlevy Dec 2, 2018
022b015
.env variablees not working
rolandjlevy Dec 2, 2018
15af6ae
Temporary fix for API_KEY bug in .env file
rolandjlevy Dec 2, 2018
3ce26e6
Resolved problem with API_KEY loading from .env file
rolandjlevy Dec 3, 2018
56dd76c
Updated readme
rolandjlevy Dec 3, 2018
b14affa
Updated readme
rolandjlevy Dec 3, 2018
25e42c5
Updated readme
rolandjlevy Dec 3, 2018
9ec7c17
Updated for Heroku deployment
rolandjlevy Dec 3, 2018
b970c5a
Updated package.json
rolandjlevy Dec 4, 2018
4c0c7ea
Updated webpack
rolandjlevy Dec 4, 2018
65c3ee1
Updated package.json by removing commented out link at the start of t…
rolandjlevy Dec 4, 2018
bbba912
Changes for deployment
rolandjlevy Dec 4, 2018
8005dcc
Merge pull request #1 from rolandjlevy/heruko-deployment
rolandjlevy Dec 4, 2018
52f10d5
Webpack bugs now fixed
rolandjlevy Dec 5, 2018
e7eb5c9
Merge pull request #2 from rolandjlevy/heruko-deployment
rolandjlevy Dec 5, 2018
77a4e3d
Updated API URL - removed http: due to mixed content error
rolandjlevy Dec 5, 2018
a26ed41
Merge pull request #3 from rolandjlevy/heruko-deployment
rolandjlevy Dec 5, 2018
5ca0b22
Updated readme
rolandjlevy Dec 5, 2018
75bf2aa
Updated readme
rolandjlevy Dec 5, 2018
5c3fa6c
Merge pull request #4 from rolandjlevy/heruko-deployment
rolandjlevy Dec 5, 2018
bd1e886
Updated webpack with CleanWebpackPlugin
rolandjlevy Dec 5, 2018
3fada5f
Merge pull request #5 from rolandjlevy/heruko-deployment
rolandjlevy Dec 5, 2018
acd15c7
Tweaked code for deployment
rolandjlevy Dec 5, 2018
d4cae81
Merge branch 'parcel-james'
rolandjlevy Dec 5, 2018
c652020
turned on ts in vscode
rolandjlevy Dec 5, 2018
d7189e2
Updated readme
rolandjlevy Dec 20, 2018
37eb936
Updated readme
rolandjlevy Dec 20, 2018
20a9d2c
Updated readme
rolandjlevy Dec 24, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/node_modules
/dist
.DS_Store
/images
.env
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: npm run start
111 changes: 53 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,53 @@
# React Cinema

Let's revisit our first project where we built a movie search engine using the Open Movie Database. This time we want to implement it using React. It should be a Single Page App, that is all the functionality should be on a single page, rather switch between multiple pages.

Before starting to code produce a diagram using pen and paper of your application which shows both layout and a tree diagram of the components.

What are some of the components you are going to need? Which components will fetch data and how will that data be displayed? Which components will store state and how will they pass data to other components? Which components should be re-used? Rather than re-implementing your previous solution again have a think about what you have learned in the past week and how you can apply it here.

You can start coding once your plan has been checked by a TA or instructor.

## The brief

We want to create a movie search engine. To power it we will use the [Open Movie Database](http://www.omdbapi.com) API.

To start using the OMDB API you will first need to sign up with them to receive and API key. The key issued to you will allow you 1000 requests per day and you will need to include this key as part of every request.

To get started, fork and clone this repo. Please submit a pull request after your first commit and push commits regularly.

You should complete as many of the following tasks as you can.

- [ ] Work using mobile first, that is create the mobile version first and add tablet and desktop versions after.
- [ ] Create an HTML page which should have a `form` at the top which contains a text input and a submit button. Below it should have a placeholder element for the returned results.
- [ ] Use JavaScript to capture the `submit` event in your search form, extract the query string from the text input and use that to make an API call to the Open Movie Database API to search for films which match the query string using `fetch`. `console.log` the results
- [ ] Display the data returned by the API including title, year and poster picture

**Movie details**

- [ ] Adjust your layout to create room for a detailed view of movie information
- [ ] Capture clicks on your movie results items and use that information to make another request to the API for detailed movie information. Using event delegation will help you here. `console.log` the returned result
- [ ] Display the detailed movie result in the in the details view you created earlier
- [ ] Make your design responsive and ensure it looks great at different screen widths

**Your own feature**

- [ ] Implement any feature you would find useful or interesting

**Stretch goals**

- [ ] Implement pagination so that users can navigate between all movies in search results rather than just the first ten
- [ ] Create a favourites list. It's up to you how you would add items to favourites. You could add a button or otherwise. Display a list of favourites somewhere on your page.
- [ ] Make the favourites list sortable. Add `up` and `down` buttons to your favourites which on click will move the result in relevant direction
- [ ] Save favourites locally using `localStorage` so that favourites persist in browser after refresh
- [ ] Let's create a search preview. It should listen for input events and submit a search request with current query string. Display the search preview results in an absolute positioned container just below the search box.
Hint: You may want to kick of the searching after at least 3 characters have been typed.

## Objectives

* We want to see great looking webpages that work well at all screen widths
* Your code should have consistent indentation and sensible naming
* Use lots of concise, reusable functions with a clear purpose
* Add code comments where it is not immediately obvious what your code does
* Your code should not throw errors and handle edge cases gracefully. For example not break if server fails to return expected results
* Use BEM methodology to style your page
* Try to use pure functions as much as possible, but keep in mind it will not be possible to make all functions pure.

## README.md

When finished, include a README.md in your repo. Someone who is not familiar with the project should be able to look at it and understand what it is and what to do with it. Explain functionality created, mention any outstanding issues and possible features you would include if you had more time. List technologies used to create the app. Include a screenshot of your app in the README.
![Screenshot](./src/images/react-cinema-screenshot-mobile.png)
![Screenshot](./src/images/react-cinema-screenshot-ipad.png)

# Moviewer
## A movie search enginee
**Moviewer** is a movie search engine app which uses the Open Movie Database API. Enter a search term and see the search results instantly with full details of the movie. It has a responsive layout for mobile and desktop screen sizes giving a user-friendly experience.

> [View the live demo](https://moviewer.herokuapp.com/)

> [View the repo on Github](https://github.com/rolandjlevy/moview)

## Installation and set up
+ Clone this repo
+ Run `npm install` to install dependencies
+ Run `npm run dev` to create a development build with webpack
+ Open index.html file in the browser

## Functionality and features
+ The app first captures the search input and fetches data that matches the input from the [Open Movie Database](http://www.omdbapi.com) API.
+ The app then uses React and CSS to display the data returned by the API as pages which are lists of 10 links per page.
+ Each link has a unique ID which is used to identify the selected movie from the API.
+ Each time a movie is selected, the title, poster image, description and other details are displayed

## Technology used
+ React
+ CSS
+ Classnames
+ Flex-box
+ Webpack
+ Open Movie Database API

## Stages of development
+ Set up API and read the Open Movie Database API documentation
+ Created functionality for the initial search query
+ Created smart pagination, with scrolling to see all results
+ Retrieved the data for selected movie
+ Used React to display the poster image, year, IMDB rating, director and description
+ Used CSS to style the UI

## Features
+ Responsive search preview - results are updated each time a letter is entered and shown below the search box
+ Smart pagination allows users to quickly navigate all pages of the search results
+ Form validation gives the user feedback and details of results:
> + if the search input is more or less than 3 letters
> + if the search input has returned a valid result or not
> + How many results and pages of results have been found

## Desired features with more time
+ Improve the desktop view for better responsiveness
+ Allow users to mark movies as favourites and use localStorage to save the favourites into a sortable list
+ Added a featured movies section
+ Include infinate scrolling with the initial results
+ Use the [Youtube API](https://developers.google.com/youtube/v3/) to load a trailer into the detailed results area
24 changes: 20 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,27 @@
<html>
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="style.css">
<title>Hello World</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Moviewer</title>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
</head>
<body>
<div id="root"></div>
<script src="dist/bundle.js"></script>
<div class="content">
<header class="header">
<h1 class="title shadow">
<li><i class="fas fa-search fa-1x fa-inverse fa-flip-horizontal"></i></li>
<li class="title-light">Moviewer</li>
</h1>
</header>

<div id="root"></div>

<footer class="footer">
<div class="footer__contact pad-top">CALL ME ON 07901 972 811 or <a href="mailto:[email protected]">EMAIL ME</a></div>
<div class="footer__contact pad-bottom">FIND ME ON <a href="https://www.linkedin.com/in/roland-levy/">LINKEDIN</a></div>
</footer>
</div>
<script src="./src/index.js"></script>
</body>
</html>
Loading