Here is the link to the api documentation :
postman-api-docs
or import public/keda tech interview.postman_collection.json
to your postman app
Notes: make sure to check the environment variable in postman app. Some env variables are:
api_url
access_token
customer_id
There are several prerequisite apps/packages before making this project, such as:
- PHP : version that is used on this project is PHP 7.4.14
- Composer (Laravel) : version that is used on this project is Laravel Framework 8.35.1
- PostgreSQL : version that is used on this project is postgres (PostgreSQL) 13.1
Next steps are:
- From terminal run the command to clone repo : "https://github.com/ivanrivaldi191/keda_interview.git"
- Move to the cloned repo
- Composer install or update
- Open the project with a text editor Identify .env.example on the root directory Copy .env.example and copy it to .env Change the following fields in the .env file: DB_DATABASE=dbname DB_USERNAME=dbuser DB_PASSWORD=dbpassword
- php artisan key:generate
Tasks to be done are:
-
Identify and fix the problems that exist in the project (Hint: Started from migration until seeder)
Note: You are not allowed to make a new migration/seeder file for the user / user type
,the password in seeder is bcrypted goes by "dummydummy"
You must only use api.php for the "routing" -
Create Model for Customer and Controllers that support following features:
- Login
- Logout
- Message to other Customer(s)
- View own chat history
- Can report other Customer(s) or own feedback/bug to Staff
-
Create Model for Staff and Controllers that support following features:
- Login
- Logout
- View all chat history
- View all Customer + deleted Customer
- Message to other Staff(s)
- Message to other Customer(s)
- Delete Customer(s)
-
Auth on each page or feature
-
You can create own Model and controllers to support point no 2 & 3, for example Model "Messages" to support Customer and Staff.
You must not use any other packages / vendors, only from the composer or auth related are allowed which means only Laravel, Passport and JWT only. -
You are only tasked to work on the back-end side, so view is not important. Use postman for the documentation as for the testing you are allowed to use phpunittest or any php/Laravel testing.