Skip to content

Blusia/toby

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

He's watching you

Toby

HR software you love to hate

Architecture

Directory structure little differs from a standard Laravel tree. We decided to refactor main app directory to better suit our needs. All classes are grouped in four major categories:

  • app/Architecture for all framework-related stuff like service providers, exception handler and more;
  • app/Domain for all framework-agnostic services related to the business logic of the application;
  • app/Eloquent for all database/ORM-related classes like models, observers and scopes;
  • app/Infrastructure for entry points to the application: CLI, HTTP and async ones.

Local setup

Prerequisites

  • make
  • docker and docker compose v2
cp .env.example .env
make init
make shell
  # inside container
  npm run dev

Check Makefile for available commands.

Available containers (local)

  • app - nginx HTTP server + php-fpm + node
  • database - Postgres database for local development
  • mailpit - for emails preview
  • selenium - for automated tests
  • redis - for session/cache store

Shell in app container

make shell
make shell-root

Queue worker

make queue

Running tests

make test

Code style check

make cs
make fix

Xdebug

Xdebug is enabled and installed by default.

You can set DOCKER_INSTALL_XDEBUG to false in .env file, to not install it.
Then rebuild app container make build && make run.

Disable Xdebug

CLI:

XDEBUG_MODE=off php artisan test

Docker container:

docker compose run --rm -e XDEBUG_MODE=off php php artisan test

Encrypt/Decrypt envs

Beta

  • set BETA_ENV_KEY in .env file, which will be used to encrypt/decrypt

decrypt:

# this will decrypt .env.beta.encrypted and create/override .env.beta file
make decrypt-beta-env

encrypt:

# this will encrypt .env.beta file and create/override .env.beta.encrypted file
make encrypt-beta-env

Files are in ./environment/prod/deployment/beta


Production

  • set PROD_ENV_KEY in .env file, which will be used to encrypt/decrypt

decrypt:

# this will decrypt .env.prod.encrypted and create/override .env.prod file
make decrypt-prod-env

encrypt:

# this will encrypt .env.prod file and create/override .env.prod.encrypted file
make encrypt-prod-env

Files are in ./environment/prod/deployment/prod

About

HR software you love to hate

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 52.6%
  • Vue 42.9%
  • JavaScript 1.8%
  • Makefile 0.8%
  • Shell 0.7%
  • Dockerfile 0.7%
  • Other 0.5%