need Laravel and linux guy to do this small assignment
The end result will be a public app (no login or authentication needed) that helps to split the bill payments among a group of friends.
Every evening set of friends goes to a bar and end of the drinks one friend will settle the bill for all. Another day another friend will pay the bill etc. After few days they will use this app (website) to split the amount they spent. They will input a JSON like follows:
amount = total bill for the day
paid_by = name of the user who paid the bill and this will be unique
friends = names of the friends who came to the bar on the given day (name will appear multiple times if a friend bring another friend of him who is not in this group)
Either copy and paste the JSON in the text area of the website OR upload a .txt file that contains the JSON
A page that displays:
Total number of days
Total amount spent by all friends
How much each friend has spent. (If I bring someone outside of the circle, then it comes under my account )
How much each user owes. (If there are minus values ignore them)
Automatically generated a settlement combination.
Sample settlement combination
Tanu->kasun = 100
Liam->kasun = 20
Use the Laravel framework for backend
For the front end, you can use CSS framework (Like bootstrap). But if you are confident about your CSS skills then feel free to write your own CSS without a framework.
The app will have one home page with one textarea input OR input to upload a file.
If a user uploads the file then it should allow only to upload .txt files and in the backend, it should read the file and validate the json.
Unit tests for the calculations.
Setup instructions to host the app with docker or instructions to host on a server that has LAMP stack.
Assume we want to deploy this app as an actual product to the general public. What will be the challenges and suggest possible solutions and workarounds if any? (You don't need to implement those. Just write them down)
Example for a possible challenge: What if someone keeps spamming the site with random JSON file or use a script to input a JSON continuously.