JAVA PROGRAMMING TASK - MongoDB, REST API, Spring Boot(latest version).

Job ID: 32977160

Budget: ₹1,500 – ₹12,500 INR

Problem description 1:
Design and develop rest api, follow the system constraints stated in below section.
REST API:
a. Save a Caterer (when a new caterer is persisted in the db-mongodb, also send a
message/event to a broker topic; you can use any broker of your choice)
b. Get a Caterer by name/id
c. List Caterers by city name (paginated result, make the page size configurable and,
Consider implementing using hateos for discoverable api so that the list
resources/caterers can be discoverable via id/name)
Domain model:
Caterer:
o Id(auto-generated by the db)
o Name
o Location
o City name (must not contain digits or special characters)
o Street name and number
o Postal code (optional)
o Capacity
o minimum number of guests (must not be blank and contains only positive
integer value)
o maximum number of guests (must not be blank and contains only positive
integer value and should not be less than min number of guests)
o
o Contact info
o Phone number (optional)
o Mobile number
o Email address(validate the input that it is valid email address)
System Constraints:
o Technologies: Java 11, Lombok, Spring Boot(latest version), Swagger/JsonDoc,
Bitbucket, Yml(app properties), MongoDB

Testing: Write functional unit tests. Write also integration tests for (Data persistence
layer, and rest api layer etc.) Consider using AssertJ, Mockito and Spring Boot Test
lib(webmvc) or powermock etc.
o REST API consumes/produces json data, Document the swagger api model and
response and also Validate the request payload.
o Logging: Log requests and responses payload
o Error handling: consider implementing nice exception handling for persistence layer
or API layer etc. Check the best practices for REST API exception handling and error
codes that should be returned in case of exception/error.
o Caching: Implement data cache layer to improve performance for read queries.
o Request payload validation: Validate the request payload…check the domain model
fields constraints.
Problem description 2:
Write a Kubernetes deployment script to deploy the application on the K8 cluster. Make the
system configuration props like database server, cache server, message broker configurable
so that it can be configured for different environments.
Problem description 3:
Write a frontend client using ReactJs that consumes the rest api.