Simple phonebook app that demonstrates usage of repository pattern in Laravel 5 and Vue.js 2.
- Register and login with email
- Search Contacts
- Filter Contacts (
all
/favorite
) - Add Contact
- First name
- Last name
- Avatar
- Favorite [boolean]
- Phones
- Number (e.g. 023 3923 3939)
- Label (e.g. Work)
API
-
MySQL
Frontend
Docker submodule: Init
git submodule update --init --recursive
Docker Environment: Start
cd ./docker/
docker-compose up -d nginx workspace mysql
cd ../
Initialize environment
npm install
cd ./docker/
docker-compose exec workspace bash
composer install
composer dumpautoload
php artisan key:generate
php artisan migrate:refresh --seed
php artisan passport:keys --force
php artisan storage:link
Run php artisan db:seed
- PassportSeeder
- Creates default Passport client for testing purposes
- Client id: 1,
- Client secret:
config('auth.POSTMAN_CLIENT_SECRET', 'PostmanNDC6Of0XbmHHTcZIi34PFuwbyTQegfyd0')
- Creates default Passport client for testing purposes
- UsersSeeder
- Creates default user
- First name:
config('users.test.USER_FIRST_NAME', 'John')
, - Last name:
config('users.test.USER_LAST_NAME', 'Smith')
, - Email:
config('users.test.USER_EMAIL', 'test@phonebook.marionovak.online')
, - Password:
config('users.test.USER_PASSWORD', 'secret')
- First name:
- Creates default user
cd public/
sw-precache --maximum-file-size-to-cache-in-bytes 8097152 --config sw-config.js
Run ./vendor/bin/phpunit
Run Tests
envoy run test --server=local
Deploy
envoy run deploy --server=['local', 'staging'] [--install] [--reset]
LOCAL_SERVER=vagrant@phonebook.test
STAGING_SERVER=vagrant@staging.test
- Frontend
- Refactor
- Vuex
MIT