Installation Guide

Follow these steps to set up the API:

Step 1: Clone the Repository

First, clone the repository to your local machine:

git clone https://github.com/Africas-Pocket/ap-investement-platform-api.git
cd ap-investement-platform-api

Step 2: Install Dependencies

Install the necessary dependencies using Composer:

composer install

Step 3: Set Up Environment Variables

Copy the .env.example file to create your .env file:

cp .env.example .env

Edit the .env file to configure your environment variables, such as database connection settings.

Step 4: Import the PostgreSQL Database

Run the following command to import the PostgreSQL database:

psql -U your_username -d production -f /path/to/dump.sql

Step 5: Build and Start Docker Containers

Use Docker Compose to build and start the containers:

docker-compose up --build

Step 6: Set Up Sail

Laravel Sail provides a simple command-line interface for interacting with Laravel's default Docker configuration. Run the following command to install Sail:

php artisan sail:install

Then, start the Sail environment:

./vendor/bin/sail up

Step 7: Install Telescope

Laravel Telescope is a debugging assistant for the Laravel framework. Install it using Composer:

composer require laravel/telescope

Publish the Telescope assets:

php artisan telescope:install
php artisan migrate

Step 8: Verify the Installation

Visit http://127.0.0.1:8080 in your web browser. If you see the Laravel landing page, the installation was successful.

To access Telescope, visit http://127.0.0.1:8080/telescope in your web browser.

Congratulations! Your API is now set up and ready to use.