# Guide to Install investra on Windows

This guide will help you to install investra on your Windows machine. investra has a backend which is built using Laravel. The backend handles the database and API requests.

To install investra on your Windows machine, you will need to follow these steps:

1. Install XAMPP
2. Install Composer
3. Install Our Admin Project
4. Configure Environment Variables
5. Start the Backend Server

## Prerequisites

Before you start, make sure you have the following installed on your Windows machine:

- XAMPP
- Composer

Please follow the below steps,

1. Extract the investra package that you download from CodeCanyon.
2. After that you see two zip files called 'core.zip', 'deployment.zip' and 2 folders local_deployment, documentation.
3. Now extract the core.zip file to the core folder.
4. now you'll get the `admin.zip` file on core folder.

As You can see the folder structure like below,

    investra
    ├── documentation
    ├── core
    │   └── admin.zip
    ├── local_deployment
    └── deployment.Zip

## Step 1: Install XAMPP

1. Download XAMPP from the official website.
2. Run the installer and follow the on-screen instructions.
3. Start the Apache and MySQL services in XAMPP.

## Step 2: Install Composer

1. Download Composer from the official website.
2. Run the installer and follow the on-screen instructions.
3. Open a command prompt and run the following command to verify the installation:

    composer --version

## Step 3: Install Our Admin Project

Note: If you are a developer please follow the below steps to install our Admin project. If you are not a developer please use the below steps only follow GUI steps.

1. Extract our project files to the directory then in this folder have 3 files 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

1. Comment the below line on `/public/index.php` file:

     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;
    // }

1. Open a command prompt (terminal) and navigate to the project directory.
2. Run the following command to install the project dependencies:

    composer install

1. Create a copy of the `.env.example` file and rename it to `.env`. Update `.env` file with database credentials (DB name, user, password, etc.) and other related information

1. Generate an application key by running the following command:

    php artisan key:generate

1. Run the following command to migrate the database:

    php artisan migrate

1. Generate the application storage link by running the following command:

    php artisan storage:link

1. Generate dummy data by running the following command:

    php artisan db:seed

1. Start the Laravel development server by running the following command:

    php artisan serve

1. Also start the npm server by running the following command:

    npm run dev

1. Open a web browser and navigate to `http://localhost:8000` to view the Laravel project.

## Conclusion

Congratulations! You have successfully installed investra on your Windows machine. You can now start customizing your application. If you have any questions, feel free to reach out to our support team. 🚀