Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Laravel Logo


Laravel E-Commerce API

A RESTful E-Commerce API built with Laravel, designed to handle core online store functionalities such as products, categories, users, and orders.
This project serves as a backend API that can be consumed by web or mobile applications.


📑 Table of Contents


📘 Introduction

This Laravel E-Commerce API provides backend functionality for an online store.
It exposes RESTful endpoints to manage users, products, categories, and orders, making it suitable for frontend frameworks such as Vue, React, Angular, or mobile apps.


✨ Features

  • User authentication
  • Product management (CRUD)
  • Category management
  • Order processing
  • RESTful API endpoints
  • Database schema included
  • Postman collection for API testing

🛠 Technology Stack

  • PHP (Laravel Framework)
  • MySQL (or compatible relational database)
  • Composer (Dependency Manager)
  • Postman (API Testing)

🚀 Installation

1. Clone the repository

git clone https://github.com/Aking16/laravel-ecommerce-api.git
cd laravel-ecommerce-api

2. Install dependencies

composer install

3. Copy environment file

cp .env.example .env

4. Generate application key

php artisan key:generate

⚙️ Environment Configuration

Edit the .env file and configure your database:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel_ecommerce
DB_USERNAME=root
DB_PASSWORD=

🗄 Database

Run migrations to create database tables:

php artisan migrate

A visual database schema is provided in the project:

db-schema.png

📬 API Documentation

A Postman collection is included for testing all available endpoints:

postman_collection.json

Import Steps:

  1. Open Postman
  2. Click Import
  3. Select postman_collection.json
  4. Configure your base URL (e.g. http://127.0.0.1:8000/api)

Or visit

http://127.0.0.1:8000/docs

▶️ Usage

Start the Laravel development server:

php artisan serve

API will be available at:

http://127.0.0.1:8000/api

📝 Admin panel

Create an admin user

php artisan filament:make-user

Then login with the created account

http://127.0.01:8000/admin/login

📁 Project Structure

laravel-ecommerce-api/
├── app/              # Application logic
├── database/         # Migrations & seeders
├── routes/           # API routes
├── public/           # Public assets
├── postman_collection.json
├── db-schema.png
└── README.md

🧪 Testing

If tests are included, you can run them using:

php artisan test

🛠 Troubleshooting

  • Ensure Composer is installed and up to date
  • Verify database credentials in .env
  • Run php artisan config:clear if environment changes aren’t reflected
  • Make sure required PHP extensions are enabled

👥 Contributors

  • Aking16 – Project Author

Contributions are welcome. Feel free to fork the repository and submit a pull request.


📄 License

This project is open-source and available under the MIT License.


⭐ Support

If you find this project useful, please consider giving it a ⭐ on GitHub.


About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages