Giter Site home page Giter Site logo

user-availability-system's Introduction

User Availability Management System

Introduction

This project is a simplified system for managing user availability in a service marketplace. Each user provides services and sets their availability based on weekdays, and buyers can view this availability in their local timezone.

Installation

  1. Clone the repository:

    git clone <repository-url>
  2. Navigate to the project directory:

    cd <project-directory>
  3. Install the dependencies:

    composer install
  4. Set up the environment file:

    cp .env.example .env
  5. Generate the application key:

    php artisan key:generate
     php artisan key:generate --env=testing
  6. Set up your database credentials in the phpunit.xml file.

  7. Run the test case:

    php artisan test

Usage

Setting Availability

To set a user's weekly availability, make a POST request to /api/availability with the following JSON payload:

{
    "availability": [
        {
            "day": "monday",
            "start": "09:00",
            "end": "12:00"
        },
        {
            "day": "monday",
            "start": "13:00",
            "end": "17:00"
        },
        {
            "day": "tuesday",
            "start": "10:00",
            "end": "14:00"
        }
    ]
}

Additional Recommendations:

  • Environment Setup: Ensure the environment variables for the test database in phpunit.xml match your local test database setup.
  • Database: Make sure to create a separate test database and configure it accordingly in the phpunit.xml file to avoid any data conflicts.

This should cover all necessary instructions for running the tests along with your project's setup and usage details.

user-availability-system's People

Contributors

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