Navigate to your htdocs directory (or your web server's root directory):
cd /path/to/htdocsClone the repository and directly checkout the UserAuth branch:
git clone --branch UserAuth https://github.com/ennonn/admin.gitOpen phpMyAdmin in your browser (e.g., http://localhost/phpmyadmin).
Create a new database called ecommerce_db.
Import the SQL file ecommerce_db_updated.sql from the cloned repository.
Copy the .env.example file and rename it to .env:
Open the .env file and configure it with your local environment settings, including database connection, base URL, and Mailtrap credentials.
BASE_URL=http://localhost:8888/admin/api.php
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=ecommerce_db
DB_USERNAME=root
DB_PASSWORD=
JWT_SECRET=your_jwt_secret_here
MAILTRAP_USERNAME=your_mailtrap_username
MAILTRAP_PASSWORD=your_mailtrap_passwordLog in to Mailtrap to handle the email functionality.
The Mailtrap credentials are already included in the .env file.
Navigate to your project directory and install dependencies using Composer:
composer installEnsure your local server (e.g., XAMPP or MAMP) is running, then access the app in your browser at:
You can find the full API documentation here: API Documentation