Git Product home page Git Product logo

parking_lot's Introduction

pl-api

This is a RESTful API built with Laravel that allows users to manage a parking lot. It provides endpoints for creating new entrances, completing exits, and checking parking status.

Requirements

You will need the following technologies to continue developing in this repository.

  • Docker
  • Docker Compose

Installation

  1. Clone the repository:
git clone [email protected]:alelopez07/parking_lot.git // with ssh
cd parking-lot-api
  1. Create a .env file:
cp .env.example .env
  1. Run the genesis.sh script if you want to go back to genesis in your container system and then, run initialize.sh to initialize the docker containers:
bash ./genesis.sh
bash ./initialize.sh
  1. Install the dependencies:
docker-compose exec app composer install
  1. Initialize migrations, run migrations and seeders:
docker exec -it app php artisan migrate:install
docker exec -it app php artisan migrate
docker exec -it app php artisan migrate --seed

Usage

To start the local development server, in your web browser, visit http://localhost/ to verify that the app is running.

You can see a better detail of the API routes described below exposed in the postman document. click here to get the postman document.

Endpoints

  GET|HEAD   / .......................................

  POST       api/v1/entrance/complete ................ v1\ParkingLotController@completeEntrance
  POST       api/v1/entrance/new ..................... v1\ParkingLotController@createNewEntrance
  POST       api/v1/generateReport ................... v1\ParkingLotController@generateResidentsPaymentReport
  GET|HEAD   api/v1/initMonth ........................ v1\ParkingLotController@initMonth
  POST       api/v1/login ............................ v1\AuthController@authentication
  GET|HEAD   api/v1/logout ........................... v1\AuthController@logout
  POST       api/v1/register ......................... v1\UserController@createUser
  POST       api/v1/vehicle_type/{id} ................ v1\VehicleController@createVehicleType
  POST       api/v1/vehicle_type/{id} ................ v1\VehicleController@newVehicle
  GET|HEAD   api/v1/vehicle_types .................... JsonResponse(VehicleType::all(), Response::HTTP_OK)

Architecture

This API is structured under the following layers:

  • Models
  • Controllers
  • Repositories
  • Interfaces
  • Providers

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT © JorgeLopez

parking_lot's People

Contributors

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