Giter VIP home page Giter VIP logo

soen344's Introduction

Bon Matin - SOEN 344

Basically a walk-in clinic appointment reservation web app.

Installation

Pre-requisites

  • composer executable
  • yarn & npm, ps: we'll use yarn
  • A MySQL DB & Apache. Use any XAMPP like service I recommended laragon on pc or valet/valet+ on mac
  • PHP >= 7.1.3, preferable 7.2
  • PHP extensions you might not have be default: bcmath
  • xdebug is always a plus

First Setup Steps

  1. once you clone the repo run composer reset, it will run a batch of the starter commands.
  2. Open the .env and configure it to work with what you need, namely the DB connection
  3. Create a mysql database matching the connection details in your .env
  4. Create the db schema and seed it with random values with composer mfs
  5. verify your setup is functional with alias composer diag or the actual command php artisan self-diagnosis
  6. 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)

Bonus Commands

  • 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 or composer 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 or yarn watch for frontend dev build, watcher will recompile when files are changed.

Usage

Website

Open the site, select one of the different login types. (Only Doc/Nurse work for now)

API

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.

Console

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

Design Patterns

Laravel Patterns (aka stuff we mostly use but didn't write)

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

Patterns we implemented on our own

  • 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

Resources

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 :

Documentation

Get good at laravel

Vue.js

  • Vue
  • Remind me to add more if you need any

Architecture and Design Inspiration

Laravel Best Practices and Design Pattern Resources

Bonus

soen344's People

Contributors

a-drew avatar ajmersingh7537 avatar alex-hayeur avatar alexstojda avatar cyberunner23 avatar evandime avatar nicochampagne avatar philippelorange avatar siamaksamie 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.