Giter Site home page Giter Site logo

designatives-backend-challenge's Introduction

Backend Developer Entry Test Task

Objective:
To assess your skills in Laravel 10, we have prepared a series of tasks for you to complete. Please fork the specified repository, complete the tasks, and grant access to the 'designatives' organization upon completion.

Instructions:

  1. Fork the Repository:
    Fork the provided repository to begin your task.

  2. Service Model and Database Migration:

    • Create a Service model.
    • Define the following fields in your database migration:
      • id: Unique identifier for the service.
      • name: A descriptive name for the service.
      • monthlyPrice: The monthly price of the service.
  3. Database Seeder:

    • Develop a seeder to populate the Service model.
    • Generate 50 random services with varying names.
    • Ensure the monthlyPrice is set between 10 and 50.
  4. API Endpoints:

    • Develop two API endpoints.
    • Both endpoints should accept three required parameters, validated for type: startDate, endDate, and serviceId.
    • Utilize the App\Classes\BasePriceCalculator abstract class as the base for your service price calculation logic.

    First Endpoint (Full Month Calculation):

    • Calculate the price of the service between the given dates.
    • Count full months only (e.g., Jan 12 to Mar 28 should be calculated from Jan 1 to Mar 31).

    Second Endpoint (Daily Price Calculation):

    • Calculate the price of the service between the given dates on a daily basis.
    • Daily price calculation formula: (monthly price * 12) / 365.
  5. Unit Tests (Optional):

    • Write unit tests for both endpoints to ensure accurate calculations.

Best Practices:
Please adhere to Laravel's best practices throughout your work. This will be a key aspect of the evaluation.

Submission:
Upon completion, grant access to the 'designatives' organization to your forked repository for review.

designatives-backend-challenge's People

Contributors

gaborreszler avatar norbert-berenyi avatar

Watchers

 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.