Skip to content

Express.js and Typescript-powered E-commerce API using MySQL and Sequelize as our ORM, with secure JWT authentication for user account management, shopping carts, favorites, and product purchases.

Notifications You must be signed in to change notification settings

yusufmsabeh/E-commerce-API

 
 

Repository files navigation

E-commerce API

Our E-commerce API is constructed using Express.js and Typescript. It leverages the power of Sequelize to efficiently handle interactions and management of our primary MySQL database. To ensure secure user authentication, we implement JWT tokens. This robust authentication system enables users to seamlessly create accounts, manage their shopping carts and favorites, and make purchases for the wide range of products available on our platform.

✨Getting Started

🛠️ Installation

git clone https://github.com/JSD-0423/backend-final-2.git
cd backend-final-2
npm install
npm run dev

🔧 Configuration

To configure the application, you must create a .env file in the root directory of the project. The following variables must be defined in the .env file:

# Random value to use as JWT key
SECRET_KEY=

And Also you should configure Seqeulize by installing sequelize-cli and running sequlize-cli init

seqeulize-cli init

Once you've made the necessary adjustments to the config/config.json file to align with your database configuration, proceed to execute the seeders.

seqeulize-cli db:seed:all

🌟 Features

E-commerce API provides the following:

  • Fetching Products: Receive a JSON response with the specified categories [new arrivals, handpicked, discounts, popular].
  • User Registration/Login: By creating an account, you gain the capability to add items to your cart and favorites, as well as complete product purchases.

📊 Database Schema

schema

📎 API Documentation

Documentation

🎨 Design

Design

About

Express.js and Typescript-powered E-commerce API using MySQL and Sequelize as our ORM, with secure JWT authentication for user account management, shopping carts, favorites, and product purchases.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 56.8%
  • JavaScript 43.1%
  • Shell 0.1%