These instructions will help you set up and run the project on your local machine.
-
Clone the repository:
git clone cd mobiTyresTest
-
Install Composer Dependencies:
composer install
-
Create a Copy of the .env File:
cp .env.example .env
Update the
.env
file with your configuration..env APP_NAME=Laravel APP_ENV=local APP_KEY= APP_DEBUG=true APP_URL=http://localhost FRONTEND_URL=http://localhost:5173 SESSION_DOMAIN=localhost SANCTUM_STATEFUL_DOMAINS=localhost:5173 # ... (other configurations)
The critical configurations to update are:
DB_CONNECTION, DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, DB_PASSWORD for database connection details. FRONTEND_URL, SESSION_DOMAIN, SANCTUM_STATEFUL_DOMAINS for frontend-related URLs.
The rest of the configurations can be left as is unless necessary.
-
Generate Application Key:
php artisan key:generate
-
Database Migration:
php artisan migrate
-
Run the Application:
php artisan serve
Visit http://localhost:8000
in your browser.
The frontend of the application is located in the /frontend directory. Follow these steps to run the frontend app:
Navigate to the frontend directory in your terminal. Run the following commands:
npm install
npm run dev
After that, you can open the app on the specified port.
Happy coding!