Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
27 views6 pages

FE & BE Test

The document outlines test requirements for building a dynamic user dashboard using Angular and a RESTful API for a bookstore using Spring Boot. The Angular test includes tasks for creating a user dashboard, handling forms, and implementing state management, while the Spring Boot test involves creating CRUD operations, pagination, sorting, and securing the API with authentication. Submission guidelines for both tests require pushing code to a GitHub repository with a README file for instructions.

Uploaded by

kennkibathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views6 pages

FE & BE Test

The document outlines test requirements for building a dynamic user dashboard using Angular and a RESTful API for a bookstore using Spring Boot. The Angular test includes tasks for creating a user dashboard, handling forms, and implementing state management, while the Spring Boot test involves creating CRUD operations, pagination, sorting, and securing the API with authentication. Submission guidelines for both tests require pushing code to a GitHub repository with a README file for instructions.

Uploaded by

kennkibathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

### **Frontend (Angular) Test Requirements**

#### **Test Overview**

You are required to build a dynamic user dashboard using Angular. The test will evaluate your ability to
create components, handle data, implement forms, and manage state.

---

#### **Task 1: Build a Dynamic User Dashboard **

1. **Requirements:**

- Create an Angular application that displays a dashboard for managing users.

- Fetch user data from a mock API (use


[JSONPlaceholder](https://jsonplaceholder.typicode.com/users) or create your own mock data).

- Display the user data in a table with the following columns: **Name**, **Email**, **Phone**, and
**Actions**.

- Add a search bar to filter users by name or email.

- Implement a "Delete" button in the **Actions** column to remove a user from the table (no need to
persist changes to the API).

- Add a "View Details" button that opens a modal or a new route to display additional user details (e.g.,
address, company, etc.).

- Use Angular Material or Bootstrap for styling.

2. **Evaluation Criteria:**

- Proper use of Angular components, services, and routing.

- Clean and modular code structure.

- Correct implementation of data fetching and filtering.


- Responsive and visually appealing UI.

---

#### **Task 2: Form Handling and Validation **

1. **Requirements:**

- Create a reactive form for adding a new user.

- Include fields for **Name**, **Email**, **Phone**, and **Address**.

- Add validation:

- Name and Email are required.

- Email must be a valid email format.

- Phone number must be at least 10 digits.

- Display validation error messages for invalid inputs.

- On form submission, log the form data to the console and display a success message.

2. **Evaluation Criteria:**

- Proper use of Angular reactive forms and validators.

- Clear and user-friendly error handling.

- Logical and efficient form submission handling.

---

#### **Task 3: State Management

1. **Requirements:**

- Implement a simple state management solution using a service or NgRx.


- Create a counter component with buttons to **Increment**, **Decrement**, and **Reset** the
counter.

- Display the current counter value in real-time.

2. **Evaluation Criteria:**

- Proper implementation of state management.

- Clean and reusable code.

---

#### **Submission Guidelines**

- Push your code to a GitHub repository.

- Include a `README.md` file with instructions on how to run your application.

- Share the repository link with us by the submission deadline.


### **Backend (Spring Boot) Test Requirements**

#### **Test Overview**

You are required to build a RESTful API for a bookstore using Spring Boot. The test will evaluate your
ability to create APIs, handle data persistence, implement security, and manage exceptions.

---

#### **Task 1: Build a RESTful API for a Bookstore (60%)**

1. **Requirements:**

- Create a Spring Boot application for managing books in a bookstore.

- Use an in-memory database (H2) or MySQL for persistence.

- Implement the following endpoints:

- `GET /books`: Retrieve all books.

- `GET /books/{id}`: Retrieve a specific book by ID.

- `POST /books`: Add a new book (fields: `title`, `author`, `price`, `publishedDate`).

- `PUT /books/{id}`: Update an existing book.

- `DELETE /books/{id}`: Delete a book by ID.

- Add validation for the `POST` and `PUT` requests:

- `title` and `author` must not be empty.

- `price` must be a positive number.

- Implement global exception handling to return appropriate error messages and status codes (e.g.,
`404` for a missing book).

2. **Evaluation Criteria:**

- Proper use of Spring Boot annotations and REST conventions.


- Clean and modular code structure.

- Correct implementation of CRUD operations and validation.

- Effective exception handling.

---

#### **Task 2: Implement Pagination and Sorting (20%)**

1. **Requirements:**

- Modify the `GET /books` endpoint to support pagination and sorting.

- Allow the client to specify `page`, `size`, and `sortBy` parameters (e.g., `GET /books?
page=1&size=10&sortBy=title`).

- Return the paginated and sorted list of books.

2. **Evaluation Criteria:**

- Proper implementation of pagination and sorting using Spring Data JPA.

- Efficient handling of query parameters.

---

#### **Task 3: Secure the API with Basic Authentication (20%)**

1. **Requirements:**

- Secure the `/books` endpoints using Spring Security.

- Implement basic authentication with two roles: `ADMIN` and `USER`.

- Restrict access as follows:

- `ADMIN` can perform all CRUD operations.

- `USER` can only view books (`GET /books` and `GET /books/{id}`).
2. **Evaluation Criteria:**

- Proper use of Spring Security for authentication and authorization.

- Correct implementation of role-based access control.

---

#### **Submission Guidelines**

- Push your code to a GitHub repository.

- Include a `README.md` file with instructions on how to run your application.

- Share the repository link with us by the submission deadline.

You might also like