Guide to Install investra on Mac
This guide will help you to install investra on your Mac machine. investra has a backend which is built using Laravel. The backend handles the database and API requests.
To install investra on your Mac machine, you will need to follow these steps:
- Install Homebrew
- Install Composer
- Install PHP
- Install MySQL
- Install Our Admin Project
- Configure Environment Variables
- Start the Backend Server
Prerequisites
Before you start, make sure you have the following installed on your Mac machine:
Please follow the below steps,
- Extract the investra package that you download from CodeCanyon.
- After that you see two zip files called 'core.zip', 'deployment.zip' and 2 folders local_deployment, documentation.
- Now extract the core.zip file to the core folder.
- now you'll get the
admin.zipfile on core folder.
As You can see the folder structure like below,
investra
├── documentation
├── core
│ └── admin.zip
├── local_deployment
└── deployment.Zip
Step 1: Install Homebrew
- Open a terminal window.
- Run the following command to install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Follow the on-screen instructions to complete the installation.
Step 2: Install Composer
- Open a terminal window.
- Run the following command to install Composer:
brew install composer
- Verify the installation by running the following command:
composer --version
Step 3: Install PHP
- Open a terminal window.
- Run the following command to install PHP:
brew install php
- Verify the installation by running the following command:
php --version
Step 4: Install MySQL
- Open a terminal window.
- Run the following command to install MySQL:
brew install mysql
- Start the MySQL service by running the following command:
brew services start mysql
- Verify the installation by running the following command:
mysql --version
- Create a new MySQL database for your Laravel project:
- Open a terminal window.
- Run the following command to log in to MySQL:
mysql -u root -p
- Enter your MySQL root password when prompted.
- Create a new database Laravel project:
CREATE DATABASE investra_db;
- Create a new user:
CREATE USER 'investra_user'@'localhost' IDENTIFIED BY 'password';
- Grant the user all privileges on the database:
GRANT ALL PRIVILEGES ON investra_db.* TO 'investra_user'@'localhost';
- Flush the privileges to ensure that the changes take effect:
FLUSH PRIVILEGES;
- Exit the MySQL shell by running the following command:
EXIT;
Step 5: Set Up Our Admin Project
Note: If you are a developer please follow the below steps to install our Laravel project. If you are not a developer please don't use the below steps, only follow GUI steps.
- Extract our project files to the directory then in this folder have 2 folder documentation and core zip file. Extract core zip file to core folder. Than will see admin.zip file. Extract admin zip file to admin folder.
cd ~/Downloads/investra-project
- Comment the below line on
/public/index.phpfile:
if (! file_exists(__DIR__.'/../storage/installed')) {
header('Location: /installer/index.php');
exit;
}
// to
// if (! file_exists(__DIR__.'/../storage/installed')) {
// header('Location: /installer/index.php');
// exit;
// }
- Install the project dependencies using Composer:
composer install
- Create a copy of the
.env.examplefile and rename it to.env:
cp .env.example .env
- Configure your .env file with the correct database credentials.
- Generate an application key by running the following command:
php artisan key:generate
- Run the following command to migrate the database:
php artisan migrate
- Generate the application storage link by running the following command:
php artisan storage:link
- Generate dummy data by running the following command:
php artisan db:seed
- Run the following command to start the Laravel development server:
php artisan serve
- Start vite by running the following command:
npm run dev
Alternative: Using Laravel Valet
If you want a more seamless local development experience, install Laravel Valet:
composer global require laravel/valet
valet install
cd ~/Projects/my-laravel-app
valet link
valet open
Now you can open your project in your browser using the valet open command.
Open a web browser and navigate to http://localhost:8000 to view your investra Admin project.
Conclusion
Congratulations! You have successfully installed investra on your Mac. You can now start customizing your application. If you have any questions, feel free to reach out to our support team. 🚀