Salvo Agency Technical Test | Live Demo
This is a technical test for Salvo Agency. The test is to create a simple web application that implements multi-tenancy level of authorization. The application is a simple CRUD application that allows users to create, read, update and delete a list of post. The application is built using the Laravel with Breeze scaffolding. The application is deployed on Heroku and can be accessed at Heroku.
The application has a demo account that can be used to test the application.
Role | Password | |
---|---|---|
support@demo.com | Support | password |
developer@demo.com | Developer | password |
superadmin@demo.com | Super Admin | password |
graph TD
subgraph Permissions
create_post[Create Post]
edit_post[Edit Post]
delete_post[Delete Post]
view_post[View Post]
end
subgraph Roles
developer[Developer]
support[Support]
super_admin[Super Admin]
end
subgraph Users
developer -- Has Permission --> create_post
developer -- Has Permission --> view_post
developer -- Has Permission --> edit_post
support -- Has Permission --> view_post
super_admin -- Has Permission --> create_post
super_admin -- Has Permission --> edit_post
super_admin -- Has Permission --> delete_post
super_admin -- Has Permission --> view_post
end
- Clone the repository
git clone https://github.com/hendurhance/salvo-crud.git
- Go to the project directory
cd salvo-crud
- Install the dependencies Run the script below to install the dependencies
scripts/dependencies.sh
- Create a copy of the
.env.example
file and rename it to.env
cp .env.example .env
- Generate the application key
php artisan key:generate
- Setup the database
- Create a new database
- Update the database credentials in the
.env
file
- Run the database migration
php artisan migrate
- Run the database seeder
php artisan db:seed
- Run the application
php artisan serve
- Clone the repository
git clone https://github.com/hendurhance/salvo-crud.git
- Go to the project directory
cd salvo-crud
- Create a copy of the
.env.example
file and rename it to.env
cp .env.example .env
- Build the docker image
docker-compose up -d
- Run the container
docker exec -it salvo-app-1 bash
Make sure you are inside the container before running the next commands.
cd /var/www/html
- Install the dependencies
scripts/dependencies.sh
If you are getting an error, run the command below to fix the permission.
chmod +x scripts/dependencies.sh
- Run the database migration
php artisan migrate
- Run the database seeder
php artisan db:seed
- Run the test
php artisan test
The application is built using the following technologies:
- Laravel 10.10
- Laravel Breeze 1.23
- Spatie Laravel Permissions 5.11
- Heroku
- MySQL
- Docker
- Docker Compose
- PHP 8.1
- Composer
- NPM
- Tailwind CSS
- Alpine JS
The application has the following features:
- Multi-tenancy level of authorization
- CRUD Post
- User Management
- User Profile
The application has the following tests:
- Unit Test
- Feature Test
A complete list of 40 tests assertion can be found in the
tests
directory.