-
NodeJS / Express / React
-
Server directory: the root of the project
-
Client ( React ) directory: /client
-
React is generated using:
create-react-app
- Global Installation of
nodemon
:
npm i nodemon -g
- Run
npm install
in root directory. - Run
cd client & npm install
- installing the react application dependencies. - Run
cd ...
- to go to the root folder again. - Run
npm run dev
: This will start the server (running server.js with nodemon) & run the react application from the client directory.
There is a proxy configuration in the client part, to map the http://localhost:5000 (Where the server API is running) to http://localhost:3000 (Where the client front end is running): "proxy": "http://localhost:5000/",
.
The server is running on nodeJS / Express
- Create a database connection ( preferable MongoDB )
- You can register a free MongoDB Cloud Cluster on https://www.mongodb.com/cloud/atlas by pressing "Free Sandbox" and follow the steps.
- Or you can download and install MongoDB on your own computer and use that one https://docs.mongodb.com/manual/administration/install-community/.
- Create Database models for: Genres & Books
- Book: should have a name, author, genre & dates of creation and last update
- Genre: should have a name & dates of creation and last update
- Create API Endpoints for:
- Getting the information about a single book:
/api/book/:id
- Getting a list of all books:
/api/books
- Getting a list of books by genre:
/api/genre/:id
- Getting a list of genres:
/api/genres
- Search books by name:
/api/books/search
( Should be a post method with a search param) - Search books by genre name:
/api/genres/search
( Should be a post method with a search param)
- An additional task, not mandatory:
- Create model for Users
- Add a register/login/forgot password login in the application
- Provide the library information only to authenticated users
- Apply routing using
react-router
[https://reacttraining.com/react-router/web/guides/philosophy - Create a sidemenu component with filter by genre & a search input.
- Create a single Book Component to display the list of books in search and filter screens.
- Create a Book Screen with displaying full details of the book on the screen ( When clicked on a book component )
- An additional task, not mandatory:
- Use redux in the application - A strong plus if you apply redux.
- Create a authentication login in the app:
- Login screen / Private routes / Reset Password / Sign Up screen