This document will guide you through setting up and running LexiQuest, including database setup, server requirements, and development tools.
Before starting, ensure you have the following installed on your machine:
- PHP 8.x
- Composer
- XAMPP (for MySQL and phpMyAdmin)
- Node.js (for npm)
- Git (optional, for version control)
-
Clone the repository
Clone the repository to your local machine using Git or download the zip file.git clone <your-repo-url> cd <project-directory>
-
Install PHP Dependencies
Install all PHP dependencies using Composer.composer install
-
Install Node Modules
Install the required node packages.npm install npm audit fix
-
Environment Configuration
Copy the.env.examplefile to.envand configure the environment variables.cp .env.example .env
Edit the
.envfile and update the following fields to match your MySQL database setup:DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=<your-database-name> DB_USERNAME=<your-mysql-username> DB_PASSWORD=<your-mysql-password>
-
Set Up MySQL Database
- Open XAMPP and start Apache and MySQL servers.
- Access phpMyAdmin via localhost/phpmyadmin.
- Create a new MySQL database with the name specified in your
.envfile.
-
Run Migrations & Seeders
To set up the database schema and seed the necessary data, run the following Artisan commands:php artisan migrate php artisan db:seed
-
Build Frontend Assets
To compile the front-end assets (CSS, JS, etc.), run:npm run dev
-
Start the Development Server
Finally, you can start the development server by running:php artisan serve
The application will be accessible at
http://127.0.0.1:8000.
-
To run the database migrations with seeders again (resetting the database):
php artisan migrate:fresh --seed
-
To watch for file changes and recompile assets:
npm run watch
-
XAMPP MySQL not starting:
Ensure no other service is using the default MySQL port (3306). If needed, change the MySQL port in the XAMPP settings and update the.envfile accordingly. -
Permission issues:
Ensure the proper file permissions are set for the project folder, especially for directories likestorageandbootstrap/cache.
- Laravel - Official Documentation
- XAMPP - Official Documentation
- Composer - Official Documentation
This project is open-source and freely available under the MIT License.