Skip to main content

Installation

Before getting started with Peak, make sure your development environment meets the following requirements.

Requirements

  • PHP >= 8.2
  • Composer >= 2.5
  • Node.js >= 18
  • NPM >= 9 (or Yarn / PNPM)
  • MySQL >= 8.0 (or any database supported by Laravel)
  • Redis (optional, recommended for cache and queue)
  • A web server like Nginx or Apache
  • Git installed (for cloning the project)

Additional recommended services:

  • Stripe or Paddle accounts (for SaaS billing features)
  • Mail service provider (like Postmark, Mailgun, or Amazon SES)

Tip: You can use Laravel Sail or Laravel Herd if you want a preconfigured local environment.

To install Peak on your server, you need a servers that can run PHP application, with the database of your choice (MySQL or Postgres), and Redis.

You can get affordable servers from DigitalOceanVultrHetznerLinodeAWSGoogle CloudAzure, etc.

Installation Steps

Follow these steps to install and run Peak locally:

1. Clone the Repository

git clone https://github.com/qoraiche/peak
cd peak

2. Install PHP Dependencies

composer install

3. Install Node.js Dependencies

npm install

4. Set Up Environment Variables

cp .env.example .env

Update your .env with your database credentials.

5. Generate Application Key

php artisan key:generate

6. Set Up Database

php artisan migrate --seed
php artisan storage:link

8. Build Frontend Assets

Wave utilizes the Laravel Vite plugin for compiling assets and enabling hot-reloading.

Start your Asset Watcher

npm run dev

This will start your asset watcher, which listens for any changes made to your codebase. When a change is detected, it refreshes the current page and dynamically injects the necessary Tailwind CSS classes.

Building Assets for Production

When you are ready to build your assets and push your code to production you will want to run:

npm run build

8. Optimizing Laravel for Production

When you are ready to deploy your application to production, you should optimize your Laravel application on your production server. You can do this by running:

php artisan optimize

9. Creating an Admin User

Peak provides a convenient artisan command to quickly create a new admin user from the terminal:

php artisan peak:create-user 

This command accepts several optional parameters (—name, —email, —username, —password, —roles) to set up the user details and assign roles at creation time.

Creating an admin user with all details specified:

php artisan peak:create-user --name="John Doe" [--email="[email protected]](mailto:--email=%[email protected])" --username="johndoe" --password="secret123" --roles="admin"