Appearance
Installation
Our JetShip uses the TALL Stack (Tailwind CSS, Alpine.js, Livewire, Laravel). Follow these steps to install the JetShip on your system:
Tech Stack
- PHP 8.2+.
- Laravel 11.
- Tailwind CSS.
- Any database you like (MySQL, Postgres, etc)
- Redis. (optional for faster caching)
Local development environment
To run our JetShip, you need a local development environment. You can opt for any of the following options:
Laravel Herd (Recommended)
Herd is a blazing-fast, native Laravel and PHP development environment for Windows and macOS. It includes everything you need to get started with Laravel development, including PHP and nginx. Once you install Herd, you're ready to start developing with Laravel.
Laravel sail
Laravel Sail is a lightweight command-line interface for interacting with Laravel's default Docker development environment. Sail provides a great starting point for building a Laravel application using PHP, MySQL, and Redis without requiring prior Docker experience.
Manual
To manually run our JetShip, you need to manually install PHP, Composer, and a database (such as MySQL, Postgres, SQLite, etc.) on your system. Follow the installation steps below to run the project.
Guide
Open the terminal in your root directory & to install the composer packages, run the following command:
shcomposer install
Run the following command only if you are using the Docker environment (Sail only):
sh./vendor/bin/sail up -d
However, instead of repeatedly typing vendor/bin/sail to execute Sail commands, you may wish to configure a shell alias that allows you to execute Sail's commands more easily (Sail only):
shalias sail='sh $([ -f sail ] && echo sail || echo vendor/bin/sail)'
To make sure this is always available, you may add this to your shell configuration file in your home directory, such as ~/.zshrc or ~/.bashrc, and then restart your shell.
In the root directory, you will find a file named .env.example rename the given file name to .env and run the following command to generate the key (You can also edit your database credentials here)
bashphp artisan key:generate
bashsail artisan key:generate
By running the following command, you will be able to get all the dependencies in your node_modules folder:
bashpnpm install // npm npm install // yarn yarn
bashsail pnpm install // npm sail npm install // yarn sail yarn
You need to set up your database in the .env file. You can choose any database supported by Laravel. For testing purposes, you may use SQLite.
bashDB_CONNECTION=sqlite # DB_URL= # DB_HOST= # DB_PORT= # DB_DATABASE= # DB_USERNAME= # DB_PASSWORD=
By running the command below, you will create all the migration tables in the database:
bashphp artisan migrate
bashsail artisan migrate
Run the following command to populate your database with initial data using seeders:
bashphp artisan db:seed
bashsail artisan db:seed
Run the following command to create a symbolic link from the storage folder to the public folder, allowing you to access stored files:
bashphp artisan storage:link
bashsail artisan storage:link
You can run the development server via the dev command, which is useful while developing locally. The development server will automatically detect changes to your files and instantly reflect them in any open browser windows.
bashpnpm run dev // npm npm run dev // yarn yarn dev
bashsail pnpm run dev // npm sail npm run dev // yarn sail yarn dev
To serve the application you need to run the following command in the project directory.
Herd: If you are using Herd, you can access the project in your browser by using the folder name followed by the .test domain.
sh# Project Path: ~/herd/jetship # type below url in your browser http://jetship.test
Sail: If you are using Laravel Sail, you can access the project at "http://localhost/"
Manual: To serve the template, run below command:
shphp artisan serve
Building for Production: Running the build command will version and bundle your application's assets and get them ready for you to deploy to production:
bashpnpm run build // npm npm run build // yarn yarn build
bashsail pnpm run build // npm sail npm run build // yarn sail yarn build
Creating an Admin User
You can create an admin user by running the below command:
bash
php artisan app:create-admin-user
bash
sail artisan app:create-admin-user
With that use you can access the admin panel by going to /admin
and logging in with the credentials you just created.