Git Product home page Git Product logo

curacel-fullstack-php-test's Introduction

Setup

Same way you would install a typical laravel application.

composer install

npm install

php artisan serve

The UI is displayed on the root page

Don't forget to run npm run dev after modifying the vue component.

Setup With Docker

Alternatively to the regular setup above, the application can be run a more controlled environment using Docker. This is to ensure all the necessary tools needed for the development are available and to maintain environment consistency. If you are not interested in running it in docker you can skip to post setup section

Add Laradock as submodule

git pull --recurse-submodules

Navigate to laradock dir

cd laradock

Make a copy of Laradock .env

copy .env.example .env

The application is developed in php7.4 and node 16.13.2 environment, it is recommended to also run it in a similar environment to avoid dependency conflicts. These versions can be adjusted in the laradock/.env file by updating the following keys:

PHP_VERSION=7.4
WORKSPACE_NODE_VERSION=16.13.2

Create and start the containers

We need nginx, mysql and workspace containers running. The workspace container already contains necessary softwares requires to successfully run a Laravel project, e.g PHP CLI, Composer, Node, e.t.c.

docker-compose up -d nginx mysql workspace

Open workspace bash

docker-compose exec workspace bash

Continue running the following commands In the workspace bash...

Install composer dependencies

composer install

Generate application key

php artisan key:generate

Migrate database

php artisan migrate

Seed Database with HMOs

php artisan db:seed --class=HmoSeeder

Install Javascript dependencies

npm install

Compile assets

npm run dev

Update application .env

In app .env file, set the following...

DB_CONNECTION=mysql
DB_HOST=mysql
DB_DATABASE=default
DB_USERNAME=root
DB_PASSWORD=root

Post Setup

Notifications

Mailing credentials should be provided in the env for email notification to work. You can use a credential from Mailtrap for testing.

Queues

Actions such as batching orders, processing orders and sending notifications are queued, the queue worker needs to be up to pick and complete those actions.

php artisan queue:work --queue=notifications,batchers,orders

Testing

There is a feature test for creating order via api and unit tests for batching order by encounter date and by order create date.

php artisan test

For the frontend in vuejs, tests are available for the button component and widgets for submitting order using jest

npm run test

curacel-fullstack-php-test's People

Contributors

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