Basically a walk-in clinic appointment reservation web app.
composer
executableyarn
&npm
, ps: we'll use yarn- A MySQL DB & Apache. Use any XAMPP like service I recommended
laragon
on pc orvalet
/valet
on mac - PHP >= 7.1.3, preferable 7.2
- PHP extensions you might not have be default:
bcmath
xdebug
is always a plus
- once you clone the repo run
composer reset
, it will run a batch of the starter commands. - Open the
.env
and configure it to work with what you need, namely the DB connection - Create a mysql database matching the connection details in your
.env
- Create the db schema and seed it with random values with
composer mfs
- verify your setup is functional with alias
composer diag
or the actual commandphp artisan self-diagnosis
- Access the web app through your preferred local web server setup (I like valet on macs & laragon on PC, ghetto way: php artisan serve manual MySQL install)
- When you see DB issues run
php artisan migrate:fresh --seed
(composer mfs
for short) to quickly recreate the db tables and seed it with random data - If you just need more random data in the db run
php artisan db:seed
. - When everything goes to hell run
composer fix
orcomposer install:hard
if you don't want to rerun migrations - Regenerate the frontend resources with
composer frontend
(requires yarn) if you're working with vue or scss yarn dev
oryarn watch
for frontend dev build, watcher will recompile when files are changed.
Open the site, select one of the different login types. (Only Doc/Nurse work for now)
Look at the api
route group in the routes/web.php
file for a quick view of whats available at the moment.
I heavily use Postman
since I haven't redone much UI yet, holler at me if you want a copy of my half-baked collection.
Tinker is the primary tool for testing queries, php logic, and debugging weird code, basically your best friend.
Open with php artisan tinx
. Its an interactive repl php shell that makes it easy to test stuff like
observer creation rules without having to build out the Resource/Model Controller.
Currently best way to test CRUD functionality for Milestone#1 features
Accidentally found book on laravel design patterns.
- Builder Pattern ex: Database Manager aka driver support
- Factory Pattern
- Repository Pattern
- Publisher/Subscriber Pattern
- Dispatcher Pattern
- Strategy Pattern ex: config loader, encrypt/decrypt, session
- Provider Pattern ex: Auth or App where we register observers
- Iterator Pattern Collections
- Facade Pattern
- Singleton Pattern
- Observer pattern
- Dispatcher Pattern events system
- Inversion Of Control / Dependency Injection Patterns ex: we use it to automatically find models in controllers
- Command Pattern ex: migrations
- SOLID patterns
- MVC pattern
- Factory Pattern exposed to dev, used by our seeders, view()
- Provider Pattern ex: Auth or App where we register observers
- Observer pattern ex: appointment on save rules
- Dispatcher Pattern ex: email notification code
- Command pattern setup command to check appointments and set to complete if end time has passed
- SOLID Patterns (just need to give examples)
- Domain Driven Design
- Builder Pattern extend Support/Manager
- Repository Pattern easy to implement, abstract eloquent models
- Service Pattern ex: we can make a booking engine service
- Facade Pattern ex: provided by laravel for easy service access
We'll be using laravel and vue.js for this project and a good place to start learning all of this scary new tech is Laracasts, specifically the laravel from scratch series & Vue 2 Step by step Here are some more resources you might want to take a look at :
- https://www.youtube.com/watch?v=U3rPtLW5iuI
- https://www.youtube.com/watch?v=EU7PRmCpx-0&list=PLillGF-RfqbYhQsN5WMXy6VsDMKGadrJ-
- Vue
- Remind me to add more if you need any
- Best Practices summary site
- Laravel team on Laravel 4 patterns Presentation Talk
- Design Patterns in Laravel Book
- Code examples of patterns
- Here's a video if you don't like reading
- Adapter, Straregy & Factory Patterns in Laravel w/ examples prepare to 2x speed and hit the left key 8x a sec
- Design Patterns in PHP and Laravel by Kelt Dockins, ISBN:9781484224502 link on gdrive coming soon