This repository contains the code for the Mercura coding test. Below are the setup instructions and assumptions made during development.
Before you begin, ensure you have met the following requirements:
- Docker Desktop: Download Docker
- Windows 10 Home/Pro/Enterprise with WSL 2 or macOS or Linux.
- Docker installation documentation: Docker installation using sail
- Sail documentation: Sail documentation
To set up and run the project locally using Laravel Sail, follow these steps:
-
Clone the repository:
git clone https://github.com/JoniSchimansky/Mercura_coding_test.git
-
Navigate to the project directory:
cd mercura-coding-test
-
Install dependencies and set up Sail:
composer require laravel/sail --dev php artisan sail:install
-
Copy the
.env
file:cp .env.example .env
-
Start the development environment with Laravel Sail:
./vendor/bin/sail up
-
Run migrations and seed the database:
./vendor/bin/sail artisan migrate --seed
-
Access the application:
- Web: http://localhost
- API: http://localhost/api
-
Run PHPUnit tests (optional):
./vendor/bin/sail test
- Laravel Sail is used as the development environment.
- The application assumes a MySQL database connection.
- PHP version compatible with Laravel Sail requirements is installed locally.
- Composer is installed locally for dependency management.
- The application is accessed via a web browser at
http://localhost
and API endpoints are available athttp://localhost/api
.