Tech World Express is an ecommerce website that sells tech products. Tech World Express includes a working cart system, a working checkout system. Tech World Express is built with Laravel, Vue.js (Inertia.js), and Tailwind CSS. Look at the screenshots section to see how the application looks like.
Here is the section on how to set up the project, and run it properly.
This projects requires a few things to have to be installed on your computer.
MYSQL Server
Node.js v18x (or higher)
PM2 (Node Process Manager)
To install the dependencies, run the following commands:
composer install
npm install
To set up the environment variables, we need to follow these simple steps:
- Copy the contents of the
.env.example
- Create a new file called
.env
, and paste the contents of the.env.example
into it. - Set up the database information in the
.env
file. - Create a new database with
utf8mb4_unicode_ci
as a collation. - Run
php artisan key:generate
to generate a new session key for the application.
Do not ever upload the .env
file as it contains private credentials.
To run the migration files and database seeds, run the following commands:
php artisan migrate
php artisan db:seed
To run the application in production mode, run the following commands:
npm run build
Since we are using ssr (server side rendering), we need to run the following command in the background:
node /bootstrap/ssr/ssr.js
Or we can use this command instead with pm2
:
pm2 start /bootstrap/ssr/ssr.js --watch
To run the application in development mode, run the following commands:
npm run build
Since we are using ssr (server side rendering), we need to run the following command in the background:
node /bootstrap/ssr/ssr.mjs
Then we need to run the dev command:
npm run dev
And for the last command we need to run the following command:
php artisan serve