An application made in React and C# with an API that posts csv format file and returns a payroll report of employees.
- Install the latest .NET 6 SDK
- Install the latest React-Bootstrap via
npm
oryarn
npm install react-bootstrap bootstrap
- Navigate to
EmployeePayroll
and launch the back-end project usingdotnet run
- Navigate to
EmployeePayroll > src > WebUI > ClientApp
and launch the front-end project usingnpm start
- Open Postman and make a
POST
request using the urlhttps://localhost:7150/api/timereport
- Add Body form-data key
file
as typeFile
and Value as the csv file located inEmployeePayroll > src > WebUI
time-report-x.csv wherex
is the variant report id. - The application also allows
GET
requests using the same url.
- Implemented a test case.
- Used Postman and created test scenarios of requests using the data to understand the process and how I would implement it.
- Tested alternative cases using different data types and volumes.
- Implemented the presented solution following the requirements.
- Structured the code following some clean architecture principles.
- Did a regression test to guarantee the application was working as intended.
- Add a flag variable to change from in-memory database to a real database.
- Add SQL Server or Postgres database due to the potential large data volume and to handle better performance.
- Implement limitation of requests per minute per user.
- Include logging for monitoring purposes such as log4net. Logging would be used for understanding the app usage levels, if the server needs to be scalled or the database is inappropriate.
- Add validation for users using different versions of apps that consume this api. For instance, if the request version differs, the HTTP response would be 406 Not Acceptable, requiring the user to install an updated app version.
- Add more options to increase the performance and improve user experience:
- Pagination.
- Limit data per page.
- Filters to search employees in determined Date range and/or Amount Paid range.
- Display the Name of the Employee as well since just the Id don’t tell much. I would join the Employee data using employeeId. When displaying the results, there’s a possibility to know the details of the employee using a modal screen or a tooltip.
- Allow sorting by Employee, Start Date, End Date, or Amount Paid.
- Use a Swagger page for documentation purposes.