We are interested in your skills as a developer. As part of our assessment, we want to see your code.
In this repo, you'll find two files, Workbook2.csv and Workbook2.prn. These files need to be converted to a HTML format by the code you deliver. Please consider your work as a proof of concept for a system that can keep track of credit limits from several sources.
This repository is created specially for you, so you can push anything you like. Please update this README to provide instructions, notes and/or comments for us.
Please complete the test within 5 business days. Use either Java, Scala or Kotlin. Use any libs / tools you like.
If you have any questions please send an email to [email protected].
Please send an email to [email protected] let us know you're done.
Good Luck!
The assignment is to implement a system that can keep track of credit limits from several sources. The Credit limit tracker system will receive input file in CSV and PRN format from several sources.
-
The Credit limit tracker system will receive N numbers of input files.
Where, N >= 1 and,
Supported file format :CSV
andPRN
-
Each file should have credit limit records. Each record will contain Name, Address, Postcode, Phone, Credit Limit and Birthday as single line record.
-
Credit Limit attribute from each file either will be in
EURO
orCENT
. -
If we are receiving same records from different files then we can perform credit limit inequality check on those records to verify the credit conflicts.
Given two sample input files are:
Workbook2.csv
Workbook2.prn
- It's built for SpringBoot 2.4.2
- Java 11
- Spring Boot
- Maven
- Swagger API Documentation
- Build the project by running
mvn clean package
inside root directory. - Once successfully built, run the service by using the following command:
Before running app, ensure that port 8090 is free. One can use server.port
system property in application.yml
to override default 8090 port
Go into repo BeTest_Vikash_Kumar
root and run:
./mvnw spring-boot:run
The command downloads maven(if required, only first time), builds and runs workbook web-app. If everything goes well, last line in the console will be
INFO 8407 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8090 (http)
INFO 8407 --- [ main] com.marktplaats.assignment.AssignmentApplication : Started AssignmentApplication in 2.272 seconds (JVM running for 4.669)
You can also run the application by using below command from root:
java -jar target/CreditLimitTracker-0.0.1-SNAPSHOT.jar
To use API by running it locally you can use Postman
and attached postman collection. You can find postman collection file inside root directory.
Credit Limit Tracker.postman_collection.json
Steps-
- Open Postman
- Use attached postman collection or use below mentioned rest end points.
- Attach input file in form data as shown in
REST APIs Endpoints
images. - Make the request and to view the response in proper html format select
preview
as shown in below screenshot.
- Upload files and convert it to HTML
POST https://localhost:8090/convertToHtml
Accept: */*
Content-Type: multipart/form-data
- Upload files, convert to html and find conflicts
POST https://localhost:8090/findConflicts
Accept: */*
Content-Type: multipart/form-data
- If line in any input files could not be parsed, it is logged and ignored.
- If a file resource could not be loaded, it is logged and ignored. Loading of other resources will not impacted.
https://localhost:8090/actuator/health
Run the server and browse to - https://localhost:8090/swagger-ui.html#/Credit_Limit_Tracker_System
Copyright (C) 2001 - 2021 by Marktplaats BV an Ebay company. All rights reserved.