The challenge will contain a few core features most applications have. These include connecting to an API, basic MVC, exposing an API, and finally, writing tests.
The API we want you to connect to is https://dummyjson.com/docs/quotes. All the logic related to fetching and manipulating quotes from this API should be encapsulated within a separate composer package located in ./packages/quotes
.
Please read the following instructions carefully before beginning the skill test:
-
Repository: The project must be contained in the same repository adn application, both frontend and backend.
-
Complete All Tasks: Each task is crucial and must be fully completed. Partial completion will not be considered.
-
Attention to Detail: Pay close attention to the specifications and requirements for each task. Accuracy and adherence to instructions are key.
-
Quality of Work: We are looking for clean, efficient, and well-documented code. Quality is as important as completion.
-
Bonus Features: Implementing additional features or enhancements not listed in the tasks will earn you extra points. Creativity and innovation are highly valued.
-
Time Management: We do not expect all tasks to be completed in one sitting.
-
Submission: Once you have completed all tasks, submit your work as instructed.
- User authentication and profile update page
- A separate composer package located in
./packages/quotes
that handles all quote-related functionality:- A facade that fetches a number of random quotes from the API
- Implement rate limiting for API requests to prevent abuse. The API should be limited to 30 requests per minutes by default but should be customizable from the main application
- An API route should be registered in the package to fetch a specified number of random quotes
- An API route should be registered in the package to fetch your favorites quotes
- An API route should be registered in the package to delete a quote from your favorites
- All API routes should be customizable from the main application (prefix, middleware, etc.)
- Above features are to be tested with Feature tests inside the package
- Separate admin authentication for moderating saved user quotes and banning users
- Frontend should be done with Vue.js and optionally Inertia.js
- Typescript should be used for any frontend functionality
- UI should be responsive
- All API route should be secured with an user token
- Above features are to be tested with Feature tests
- Use composition API and setup script for Vue components
- Use inertia to connect backend and frontend
- Provide a separate file with documentation
Name: <your name>
Email: <your email>
-
Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)
git clone --bare https://github.com/FmTod2/skill-assessment.git
-
Create a new repository on GitHub.
-
Mirror-push your bare clone to your new repository.
Replace <username> with your actual Github username in the url below.
Replace <repository> with the name of your new repository.cd skill-assessment-quotes.git git push --mirror https://github.com/<username>/<repository>.git
-
Delete the bare clone created in step 1.
cd .. rm -rf skill-assessment-quotes.git
-
You can now clone your repository, where you are going to be working, on your machine (in my case in the code folder).
cd ~/code git clone https://github.com/<username>/<repository>.git
-
Create a copy of the
.env.example
file as.env
cp .env.example .env
-
Install dependencies:
a. Docker (Recommended)
-
Install composer dependecies
docker run --rm \ -u "$(id -u):$(id -g)" \ -v $(pwd):/var/www/html \ -w /var/www/html \ laravelsail/php81-composer:latest \ composer install --ignore-platform-reqs
-
Start the container (Sail):
./vendor/bin/sail up -d
-
Generate a new secret key:
./vendor/bin/sail artisan key:generate
b. Without Docker (Not recommended)
-
Install all required dependencies
composer install
-
Generate a new secret key:
php artisan key:generate
-
Edit the README.md file and add your name and email.
- Name: `<your name>` <br/> - Email: `<your email>` <br/> + Name: Jhon Doe <br/> + Email: jhondoe@exmaple.com <br/>
-
Submit your first commit with just the changes to the README.md file. Must be done before starting the assignment.
git add README.md git commit -m "Initial commit" git push
Docker/Sail
./vendor/bin/sail php --version
./vendor/bin/sail php script.php
./vendor/bin/sail composer require laravel/sanctum
./vendor/bin/sail artisan queue:work
./vendor/bin/sail node --version
./vendor/bin/sail npm run dev
If you wish, you may use Yarn instead of NPM:
./vendor/bin/sail yarn
./vendor/bin/sail test
./vendor/bin/sail test --group orders