Ecommerce API Project

Overview

This project is an E-commerce API developed using Node.js, Express.js, and MySQL. It is designed to provide a backend solution for e-commerce platforms, offering a range of features from product management to order processing.

Getting Started

Prerequisites

  • Node.js
  • MySQL

Installation

  1. Clone the repository to your local machine.
  2. Install the necessary packages using npm:
    npm install
    
  3. Set up your MySQL database and ensure it is running.
  4. Configure the database settings in the config directory.

Running the Application

  1. Start the server:
    node server.js
    
  2. The API will be available at http://localhost:[PORT], where [PORT] is the port number specified in the server configuration.

Project Structure

  • config: Contains configuration settings for the application, such as database configuration.
  • controllers: Holds the logic for handling requests and sending responses. Each controller typically corresponds to a specific functionality of the API.
  • helpers: Provides utility functions that support various operations within the application.
  • middlewares: Includes middleware functions for handling requests, such as authentication and error handling.
  • models: Contains data models representing the structure of the database tables and potentially methods for querying or manipulating data.
  • routers: Defines the routes for the API. Each route is linked to its corresponding controller.
  • server.js: The main entry point for the application. It initializes the Express server and sets up middleware and routes.

Features

  • Product Management: Create, read, update, and delete products.
  • Order Processing: Handle customer orders and track order status.
  • User Authentication: Register and authenticate users.

Customizing the Project

Feel free to customize and extend the project according to your requirements.

Contribution

Contributions to the project are welcome. Please ensure to follow the project's coding standards and submit pull requests for any enhancements.