A Laravel application with Inertia.js and Vue (TypeScript).
Before you begin, ensure you have the following installed on your system:
- PHP 8.2 or higher
- Composer
- Node.js 18.x or higher and npm
- MySQL or PostgreSQL database
- Git
Follow these steps to set up the project locally:
git clone https://github.com/K-John/LostCity-Market.git
cd LostCity-Marketcomposer installnpm installCopy the example environment file and configure your environment variables:
cp .env.example .envOpen .env and update the following variables:
- Database Configuration:
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=lostcity_market DB_USERNAME=your_database_username DB_PASSWORD=your_database_password
php artisan key:generateCreate a new database for the application:
mysql -u root -p
CREATE DATABASE lostcity_markets;
exit;php artisan migrateIf you want to populate the database with sample data:
php artisan db:seedFor development:
npm run devFor production:
npm run buildIn a separate terminal, start the Laravel development server:
php artisan serveThe application should now be running at http://localhost:8000.
-
Start the Laravel server:
php artisan serve
-
In a separate terminal, run the Vite dev server for hot module replacement:
npm run dev
For quick access during development, you can use the development login route:
Visit http://localhost:8000/dev/login to automatically log in with the development account.
If you encounter issues, try clearing the application cache:
php artisan cache:clear
php artisan config:clear
php artisan route:clear
php artisan view:clear