This project is an example of a payroll timesheet calculation
PHP >= 7.3
Apache or NginX
Composer
1️⃣ Clone repository
2️⃣ Duplicate the .env.example file and rename it just to .env
3️⃣ Run this command php artisan key:generate
4️⃣ Start the artisan server: php artisan serve
5️⃣ You can import this postman collection with the request: Postman File
Or use CURL in your terminal:
curl --location --request POST 'http://127.0.0.1:8000/api/payroll/calculate' <br>
--form 'file=@/absolute/path/to/your/file/TimeSheetData.json'
6️⃣ You will see the JSON response with the expected information
My thinking is that the API could be installed in a EC2 instance with a LEMP stack Configure the file storage with a bucket in AWS S3 Configure the domain or subdomain with Route 53 to get a special endpoint
Amazon allows to configure the inbound and outbound rules to set one layer of security about the origin of requests ip
There is no need to a database, because its all about to retrieve the calculation and response with the JSON
But to keep information saved, I leave every json file stored in the project