8000 GitHub - davidyell/ShopSeeker: A small Laravel application to find shops near to your UK post code
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

A small Laravel application to find shops near to your UK post code

License

Notifications You must be signed in to change notification settings

davidyell/ShopSeeker

Repository files navigation

Shop Seeker

An example application in Larvel to find shops near to a UK postal code.

  • Created using Laravel Breeze as a base.
  • Uses Laravel Sail for Docker.
  • Created in collaboration with Github Copilot.

Requirements

  • Docker
  • PHP
  • Composer

Install & Setup

  • Clone the repo
  • composer install
  • ./vendor/bin/sail up -d
  • ./vendor/bin/sail npm ci
  • ./vendor/bin/sail npm run dev

Visit http://localhost

Login

Visit http://localhost/login and use admin@example.com and password to login.

Api

Visit http://localhost/api/shops?postcode=TA1%203LP&open in your favourite api application.

Things to do

  • [TODO] Complete the Postcode artisan command

Improvements

  • [DEVOPS] Wrap all the setup commands into a neat bash script.
  • [DEVOPS] Organise the generated Github Workflows
  • [DEVOPS] Could add a workflow to validate the OpenAPI schema.
  • [DEVOPS] Ensure the php-zip extension is installed into the container from Pecl.
  • [REFACTOR] Break up the Postcodes artisan command into smaller methods so it's easier to test.
  • [REFACTOR] Improve the download file cleanup in the Postcode artisan command by checking if the filename in the remote has changed before deleting the downloads, so we don't re-download over and over.
  • [AUTH] Add capabilities to the web guard so only some users can create new shops.
  • [REFACTOR] Move postcode command out of the app so it can run as a scheduled AWS Lambda for instance to allow it to clean up afterwards, run on a schedule, leverage faster downloads on AWS and remove the need for the Zip PHP extension in the Docker container.
  • [AUTH] Implement Laravel Sanctum to add JSON web token API authentication and authorisation.
  • [API] Add the Spatie Query Builder package for sorting and filtering in admin and api.
  • [API] Add the PHPLeague Fractal package if complex JSON API output is needed.
  • [API] Add api rate limiting middleware.
  • [API] Could add an OpenAPI schema and writes tests against it.
  • [DATA] Investigate MySQL GIS, https://dev.mysql.com/doc/refman/8.4/en/spatial-types.html

Timesheet

About 6 hours

About

A small Laravel application to find shops near to your UK post code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0