Our App is called FakeFlix which is based off the well known movie streaming site ‘Netflix’
It will demonstrate a combination of React, JavaScript, Express and MongoDB. The App is pretty self explanatory, once a profile has been created the user will be able to login, choose movies and add them to a favorites or watchlist.
https://brandonhall96.github.io/fakeflix/

The App uses React which allows us to make calls to our API on the backend and render data from our database. We were able to create a login and signup page that upon being submitted will talk to the backend to authenticate the profile. After youve been authenticated youll have access to the full site and being able to explore the different pages.
useEffect(() =>{
let url = CONNECTION_URI+'/api/movies'
setAuthToken(localStorage.getItem("jwtToken"))
axios.get(url)
.then((res) =>{
console.log(res.data.movies)
setMovieData(res.data.movies)
})
}, [])
useEffect(() => {
setAuthToken(localStorage.getItem("jwtToken"))
},[movieData])
const allMovies = movieData.map((mov, idx)=> {
return <div class="row row-cols-1 row-cols-md-3" key={idx}>
<div className="col mb-4" key={idx}>
<img class="card-img-top" src={mov.Poster} alt="Card image cap" />
<button className='movies' className='specialButton' type='submit' onClick={() => handleFavorite(mov)}>+ Favorites</button>{' '}
<button className='movies' className='specialButton' type='submit'>+ Watchlist</button>{' '}
</div>
</div>
})
return (
<div>
<div id="moviediv" className="movie-grid">
{allMovies}
</div>
</div>
)
}
export default Welcome;

const userData = props.user ?
(<div>
<h1 style=>Profile</h1>
<p style=><strong>Name:</strong> { name }</p>
<p style=><strong>Email:</strong> { email }</p>
<p style=><strong>ID:</strong> { id }</p>
</div>) : <h4>Loading...</h4>
return (
<div className="text-center pt-4">
<div className="col-md-8 offset-md-2">
<div className="card card-body">
<div className='text-center'>
{props.user ? userData : errorDiv()}
<button type="button" id="profilebutt" ><Link className="edit" to="/form">Edit Profile</Link></button>
</div>
</div>
</div>
</div>
);