(click above to see project in action)
Minimal IMDB clone to browse information on movies and its cast members.
-
NextJs: Provides serverside rendering. Makes routing extremely simple. -
semantic-ui-react: Provides barebone UI components.
- To run in
devmode:
npm run dev- To run in
prodmode:
npm run build
npm run start-
You are going to find code in following three(mostly first two) dirs:
/pages/src/static: Useful for storing files like stylesheets and images etc. For the project mostly used inline css.
-
/pagesdir: This directory houses all the pages that developer wants to display.NextJsrenders all the files in here and creates a link for every file. The URL pattern mimics the directory structure of the all the files and dirs under/pages. E.g.test.com--->/pages/index.jstest.com/movies--->/pages/movies/index.jstest.com/movies/:slug--->/pages/movies/[slug].js# dynamic routing in nextJs
-
/srcdir: This dir holds all the components required for the project.a.
redux: Holds the code for global store.b.
generic: Exteremly generic code that we are going to use only once, still putting it in separate component will help and so it is here.c.
api: All async api request functions can be found in this dir. For the project we are only going to makeGETcalls so I've extracted a generic fetch method and reused it for all other requests.d.
components: Contains all the required components.layout: used to build a uniform layout for the project. Menubar, Footer and Searchbar is there.ui: this dir has all the reusable ui components used throughtout the projects.movies:detailed.js: To present movie details at/movies/:movieIdcatalog/: Used to put together components used in creating Movie catalog page at/movies
index/: Contains all the code for/.inTheater.js: A small component to showcase movies in theaters (preview kind of thing on index page)popular.js: Component used to showcase a pageful of popular movies, with option to browse all of them.
profile.js: This component code for profile of an artist.
Extensive testing has not been done yet so, there is a chance that the code might break. Also errors from apis are thrown to the console.