Backend RESTful api URL
API documentation (super simple demonstration)
Client side page works fine on Firefox now
- fix film page, maybe add some reviewsPage, and on film page, we list out several most liked reviews, and with a show all button. once clicked that button, we go to reviews page for this film. (if have time, will think about that.) 2 add pagination or lazy loading...(low priority)
can use aggregation for sorting films by director's name; (maybe unnecessary)
- make sure data can upload to db;
- route /model/ controller (get for now) for films;
- set up virtual part for reviews and users;
- add slug for each film
- authentication (signup / login / logout / forgotpassword / resetpassword / send welcome letter (via pug) / )
- virtual reviews for each film;
- fixed
email.js
template for react render page - Login/ Register works
- each user can create one review for each film
- cookie works fine now
- frontend error handling, e.g. mongoError duplicated index
- backend: restrict edit access to creator, from frontend, user cannot send and edit review if they are not creator for that review.
- once a user click like-btn, likesCount increase by 1 (only once) by inserting user's id into likedBy array on reviewsModel, and populate likedCount
- Remove unused components, use ErrorMessage and error/setError from context for errorHandling globally.
- LikedBy heart shows different color, if the user has liked, then it's red-400, otherwise it is red-200; once been liked by currUser, it will become red-400
- user's email needs to be verified to login
- Except for resetPassword, we need to manually set privateHeader, for other condition, we use cookie.jwt (10)
- update password (on frontend profile page) and error handling
- add loading status checking for all pages
- replace the old ErrorMessage component with error toaster
- add overlay and responsive video player for trailer on film detail page
- add image galary for images on detail page
- simple responsive layout for images & rating info on detail page (need to be improved)
- simple admin styling:
- Edit films: images upload part hasn't done yet.
- edit reviews: edit part not done
- edit users: done.
- All fields can be sorted once clicked title accordingly
- delete one film/review/user functionality part is done
- refactor components and styles to reuse repeated parts
- refactor sort function, due to new condition (if a user has been deletet, user === null)
- add loading status indicator
- use react-toast for error messages/success messages (works fine, will update frontend part accordingly too)
- redirect user to landing page if they are not logged in as 'admin'
- create new film
- upload film images/coverImage w/ multer
# Run frontend (:3000) & backend (:8080) development mode
`yarn start` or `npm start`
# Run production mode
`yarn start:prod`
# Import data to DB (delete this for now, will fix this later)
`yarn data:import`
# Destroy data from DB
`yarn data:destroy`
yarn add react-player
import React from 'react'
import ReactPlayer from 'react-player'
// Render a YouTube video player
<ReactPlayer url='https://www.youtube.com/watch?v=ysz5S6PUM-U' />
sudo lsof -i :8080
kill -9 {PID}
this is for server is running on 8080 already error. Maybe need to set some setting for error, will try to fix this if possible.