Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

EmployWise JAVA ASSIGNMENT

Instructions:
1. Build the following App in Spring Boot using Maven.
2. Use Any NoSQL Database, CouchDB Preferred.
3. Request and Response for all APIs must be in JSON Format only.
4. For "Advance Level" create a new Gmail account.

5. After completing your tasks, share a .zip/.rar file which contains.


a. Your Spring boot project.
b. Readme.txt file, containing instruction on how to run the project, how to setup the
database, url if hosted and basic API documentation for every route created [Input
JSON structure for every route].

6. All levels are not necessary but more levels you complete more the chance of being
selected for next round.[Speed and accuracy both will be tested]
7. For a level to be complete all tasks in that level needs to completed.
8. Time Limit: 6 hours.

Entry Level
a. Add Employee to a Database: In this task, the candidate needs to implement an
API endpoint to add an employee to the database. The employee data should include the
fields EmployeeName, PhoneNumber, Email, ReportsTo (which refers to the Employee ID of
the reporting manager), and ProfileImage (an URL to the Employee's profile image [use
google images]). Additionally, the candidate needs to generate a unique UUID as the ID field
for the Employee and return this ID,if the Employee is successfully added to the
database.

b. Get All Employees: The candidate needs to implement an API endpoint to retrieve
all employees from the database.

c. Delete Employee by ID: The candidate needs to implement an API endpoint to


delete an employee from the database based on their ID.

d. Update Employee by ID: The candidate needs to implement an API endpoint to


update the details of an employee in the database based on their ID.

Intermediate
a. Get nth Level Manager of an Employee: The candidate needs to implement an API
endpoint that takes an employee ID and a level (n) as input and returns the nth level
manager of that employee. For example, if employee A reports to B, and B reports to C, and
n=1, then the API should return the manager B for employee A, and if n=2, it should return
manager C for employee A.

b. Get Employees with Pagination and Sorting: Modify the "Get All Employees" task
to implement pagination and sorting options. Allow the client to specify the page number,
page size, and sorting criteria (e.g., sort by name or email). Return the appropriate subset of
employees based on the pagination parameters.

Advanced Level
a. Send Email to Level 1 Manager on New Employee Addition: The candidate needs
to implement a functionality that sends an email to the level 1 manager when a new
employee is added. The email should contain a message stating that "<EmployeeName>
will now work under you. Mobile number is <PhoneNumber> and email is <EmailId>". The
email should be a link that opens the email client. Candidate should create a new
email account specifically for this purpose instead of using personal accounts.

b. Host the Application on a Free Platform: The candidate needs to host the Spring
Boot application on a free hosting platform. They can choose platforms like Heroku,
AWS Free Tier, or any other suitable platform. The application should be accessible and
functional after deployment.

Validations and error handling will also be checked for every api route.

Please read instruction "5." carefully if not followed your Assignment will be rejected.

Feel free to use ChatGPT 😜😜!!!!

You might also like