Assignment_Interns
Assignment_Interns
Overview:
Visitors can view available books, filter by genre, author, or publication year.
Admin users can log in, add, update, and delete books.
Assignment Breakdown
LoginPage : On successful login, the backend will return the user’s role (Admin or Visitor), which will be
stored in localStorage or sessionStorage for session management.
BookList: Display a list of books in a table or grid format. Each book should display its title, author, genre,
publication year, and a link to view details.
BookForm: A form to add new books or edit an existing one.
BookItem: Display detailed information of a selected book with options to edit or delete it.
BookFilters: Filter books by genre, author, or publication year.
BookList Component:
Fetch and display the list of books from the backend.
Include pagination if the list grows large.
Include buttons to edit or delete a book.
BookForm Component:
Provide input fields for book details (title, author, genre, publication year).
Implement form validation (e.g., non-empty fields for title and author).
Implement both "Add New Book" and "Edit Book" functionalities.
This form will be available only for admin users, other users can not access this form.
BookItem Component:
Show detailed information about the book when clicked, with an option to edit or delete.
BookFilters Component:
Allow users to filter books by genre, author, or publication year.
Ensure that the filtered data is reflected in the BookList component.
State Management:
Use React’s useState and useEffect hooks to manage state and fetch data from the backend.
Use axios or fetch to interact with the backend REST API.
2. Backend (Spring Boot)
Set up a Spring Boot project using Spring Initializr with dependencies for:
Spring Web (for RESTful APIs)
Spring Data JPA (for interacting with PostgreSQL)
PostgreSQL Driver (to connect to PostgreSQL)
Spring Boot DevTools (for development convenience)
3. Database (PostgreSQL)
Evaluation Criteria:
React JS:
Correctly display related data (authors, genres, reviews).
Implement complex forms (selecting multiple genres for a book).
Ability to handle state and manage API calls correctly for multiple related entities.
Spring Boot:
API endpoints to filter books based on different criteria (author, genre).
Proper handling of CRUD operations and relationships between entities.
Swagger Documentation of all API
Database:
Correct implementation of relational database with PostgreSQL.
Efficient use of joins and constraints.
Comments for each column clearly indicating use of the column.