Git Product home page Git Product logo

aquadic-ecommerce-api-task's Introduction

Aquadic E-commerce API Task

Welcome to my repository for Aquadic task implemented using Laravel version 10.

This is an API of essential e-commerce functionalities, providing features such as user authentication (Login, Register, Logout) based on token authentication, order placement, and email notifications upon ordering. The product requirement mandated support for multiple colors and discount options. 1-Minute Preview Video on Youtube

Getting Started

Note: Before you begin, make sure you have the following prerequisites installed on your system:

These tools are essential for setting up and running the application. If you don't have them installed, you can download and install them from the provided links.

Once the prerequisites are in place, follow the installation steps below to set up the project locally.

  1. Clone the repository:

    git clone https://github.com/edriso/aquadic-ecommerce-api-task.git
  2. Navigate to the project directory:

    cd aquadic-ecommerce-api-task
  3. Install PHP dependencies using Composer:

    composer install
  4. Copy the example environment file

    cp .env.example .env
  5. Configure your mail service provider environment variables:

    Open the .env file in a text editor and locate the mail-related configuration section. Update the following environment variables with your mail service provider's credentials:

    MAIL_MAILER=smtp
    MAIL_HOST=your-mail-host
    MAIL_PORT=your-mail-port
    MAIL_USERNAME=your-mail-username
    MAIL_PASSWORD=your-mail-password
    MAIL_ENCRYPTION=your-mail-encryption
    MAIL_FROM_ADDRESS=[email protected]
    MAIL_FROM_NAME="${APP_NAME}"

    Ensure that you replace placeholders like your-mail-host, your-mail-port, your-mail-username, your-mail-password, and your-mail-encryption with the actual values provided by your mail service provider.

    If you are using a testing service like Mailtrap during development, replace the values accordingly. For production, update these settings based on the mail service you are using.

    Save the changes to the .env file.

  6. Run database migrations to set up the necessary tables:

    php artisan migrate
  7. Start the Laravel development server:

    php artisan serve
  8. In a separate terminal, run the following command to start the queue worker (necessary for email notifications to clients when placing an order):

    php artisan queue:work

    This command ensures that the notification tasks, including sending emails to affected clients, are handled in the background, providing a seamless and responsive experience for clients. Keep the queue worker running to continually process queued jobs and deliver timely notifications.

Postman

  1. Database Setup:

    Run database migrations and seed data to populate the database:

    php artisan migrate --seed
  2. API Testing:

    Open Postman, and import the provided collection (located in readme-files/aquadic-ecommerce-api.postman_collection.json). The collection includes a set of pre-configured API endpoints for testing various features of the e-commerce application. Utilize this tool to simulate requests, inspect responses, and ensure the proper functioning of your API.

    Download Postman Collection

  3. Authentication:

    • Login or Register: Start with the Login or Register request from the collection. Copy the token from the response.

    • Bearer Token: Paste the copied token in the Authorization header as a bearer token for subsequent requests.

Database Schema

Database Schema

Future Roadmap

  • Implement Filament for the admin dashboard to manage and insert products.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.