... | ... | @@ -8,11 +8,11 @@ This Challenge is designed to test your abilities building backend web projects |
|
|
## Assignment
|
|
|
The objective of this challenge is to create a REST API application that the user can use to track the value of stocks in the stock market. The base application presented here uses a simple implementation of [Slim Framework](https://www.slimframework.com/docs/v3/)
|
|
|
|
|
|
You may use the [Stooq](https://stooq.com/q/l/?s={stock_code}&f=sd2t2ohlcvn&h&e=csv) API service.
|
|
|
You may use the [Stooq](https://stooq.com/q/l/?s={stock_code}&f=sd2t2ohlcvn&h&e=csv) API service to get latest stock market values.
|
|
|
|
|
|
## Mandatory Features
|
|
|
- The application must use a SQL database to store users and record logs of past requests. Check out the Slim documentation if you would like to use [Eloquent](https://www.slimframework.com/docs/v3/cookbook/database-eloquent.html), [Doctrine](https://www.slimframework.com/docs/v3/cookbook/database-doctrine.html) or [Atlas](https://www.slimframework.com/docs/v3/cookbook/database-atlas.html).
|
|
|
- The application must be able to authenticate registered users.
|
|
|
- The application must be able to authenticate registered users. There's a basic example of authentication used for 1 endpoint, you may need to modify it accordingly based on the requirements. (See: [routes.php](https://git.jobsity.com/jobsity/php-challenge/-/blob/master/app/routes.php))
|
|
|
|
|
|
The application must have these three endpoints:
|
|
|
|
... | ... | @@ -32,7 +32,7 @@ The application must have these three endpoints: |
|
|
}
|
|
|
```
|
|
|
|
|
|
The same endpoint must additionally send an email with the same information to the user who requested the quote. To send the email, you may use [SwiftMailer](https://swiftmailer.symfony.com/docs/introduction.html) with [the wrapper included](https://git.jobsity.com/jobsity/php-challenge/-/blob/b0893f75fd2fda74c1bbf1f862d57293cb4c2347/app/services.php), as we detail in [this example](https://git.jobsity.com/jobsity/php-challenge/-/wikis/Usage-of-the-Mailer-service-(SwiftMailer)), or use your own implementation.
|
|
|
The same endpoint must additionally send an email with the same information to the user who requested the quote. To send the email, you may use [SwiftMailer](https://swiftmailer.symfony.com/docs/introduction.html) with [the wrapper included](https://git.jobsity.com/jobsity/php-challenge/-/blob/master/app/services.php), as we detail in [this example](https://git.jobsity.com/jobsity/php-challenge/-/wikis/Usage-of-the-Mailer-service-(SwiftMailer)), or use your own implementation.
|
|
|
- An endpoint to retrieve the history of queries made to the API service by that user. The endpoint should return the list of entries saved in the database, showing the latest entries first:
|
|
|
|
|
|
`GET /history`
|
... | ... | @@ -56,4 +56,14 @@ The following features are optional to implement, but if you do, you'll be ranke |
|
|
## Considerations
|
|
|
- Focus only on the backend. We will not review any frontend functionality for this project.
|
|
|
- Provide any and all information our evaluators may need. Use seeders instead of SQL dumps if we need any predetermined database information.
|
|
|
- Provide a detailed Readme with instructions on how to install, use, etc. |
|
|
\ No newline at end of file |
|
|
- Provide a detailed Readme with instructions on how to install, use, etc.
|
|
|
|
|
|
## Base project
|
|
|
You can find some bootstrap for the challenge with some endpoints, basic setup, and tests. This project uses composer as a package manager, so in order to run the project for the first time you need to follow these next steps:
|
|
|
|
|
|
- Run `composer install`, this will install dependencies
|
|
|
- Copy the `.env.sample` file into `.env` and modify its contents to match your current settings.
|
|
|
- Run `composer start` and you should be able to check the project running on `http://localhost:8080`
|
|
|
|
|
|
Optional:
|
|
|
- Run `composer test` to see the test suite result |