Coder Social home page Coder Social logo

php-skills-assessment's Introduction

Guidelines

Questionnaire

Spanish / Español

Quotes App

Skill Assessment

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.

Attention Programmers

Please read the following instructions carefully before beginning the skill test:

  1. Repository: The project must be contained in the same repository adn application, both frontend and backend.

  2. Complete All Tasks: Each task is crucial and must be fully completed. Partial completion will not be considered.

  3. Attention to Detail: Pay close attention to the specifications and requirements for each task. Accuracy and adherence to instructions are key.

  4. Quality of Work: We are looking for clean, efficient, and well-documented code. Quality is as important as completion.

  5. Bonus Features: Implementing additional features or enhancements not listed in the tasks will earn you extra points. Creativity and innovation are highly valued.

  6. Time Management: We do not expect all tasks to be completed in one sitting.

  7. Submission: Once you have completed all tasks, submit your work as instructed.

The application must have the following features

  1. User authentication and profile update page
  2. A separate composer package located in ./packages/quotes that handles all quote-related functionality:
    1. A facade that fetches a number of random quotes from the API
    2. 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
    3. An API route should be registered in the package to fetch a specified number of random quotes
    4. An API route should be registered in the package to fetch your favorites quotes
    5. An API route should be registered in the package to delete a quote from your favorites
    6. All API routes should be customizable from the main application (prefix, middleware, etc.)
    7. Above features are to be tested with Feature tests inside the package
  3. Separate admin authentication for moderating saved user quotes and banning users
  4. Frontend should be done with Vue.js and optionally Inertia.js
    1. Typescript should be used for any frontend functionality
    2. UI should be responsive
  5. All API route should be secured with an user token
  6. Above features are to be tested with Feature tests

Extra Credit

  • Use composition API and setup script for Vue components
  • Use inertia to connect backend and frontend
  • Provide a separate file with documentation

Developer

Name: Joel Suarez
Email: [email protected]

Instructions

DO NOT START A NEW LARAVEL APP, USE THIS BOILERPLATE INSTEAD

Cloning the repository

  1. 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
  2. Create a new repository on GitHub.

  3. 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
  4. Delete the bare clone created in step 1.

    cd ..
    rm -rf skill-assessment-quotes.git
  5. 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

Getting Started

  1. Create a copy of the .env.example file as .env

    cp .env.example .env
  2. Install dependencies:

a. Docker (Recommended)
  1. 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
  2. Start the container (Sail):

    ./vendor/bin/sail up -d
  3. Generate a new secret key:

    ./vendor/bin/sail artisan key:generate
b. Without Docker (Not recommended)
  1. Install all required dependencies

    composer install
  2. Generate a new secret key:

    php artisan key:generate

‼️ Note: Docker is recommended as you have all the external dependecies needed are already present in the provided container. Without docker you may need to install some external dependencies like MySQL or some extra PHP extensions required by the project

Your first commit (IMPORTANT)

  1. Edit the README.md file and add your name and email.

    - Name: `<your name>` <br/>
    - Email: `<your email>` <br/>
    + Name: Jhon Doe <br/>
    + Email: [email protected] <br/>
  2. 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

Executing Commands

Docker/Sail

PHP Commands

./vendor/bin/sail php --version
 
./vendor/bin/sail php script.php

Composer Commands

./vendor/bin/sail composer require laravel/sanctum

Artisan Commands

./vendor/bin/sail artisan queue:work

Node / NPM Commands

./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

Running Tests

./vendor/bin/sail test

./vendor/bin/sail test --group orders
Without Docker

Artisan Commands

php artisan serve
php artisan list

Node / NPM Commands

npm run dev
// or
npm run build

Running Tests

composer test

php-skills-assessment's People

Contributors

viicslen avatar link4042022 avatar alonzd1 avatar renovate[bot] avatar

Watchers

Joel Suarez avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.