Skip to content

Halimmsbah/EcommerceHalim

Repository files navigation

E-commerce app

Description

simple E-commerce API.

Technologies

JavaScript NodeJS Express.js JWT Nodemon NPM

Key Features:

  • User Authentication: Secure user authentication endpoints using JWT tokens.
  • Cart Option: Create, retrieve, update, delete and ensure stock is available.
  • User Profiles: Fetch and update user profiles,fetch all users,including profile pictures,and contact information.
  • Order Option: Fetch all orders to user, make online payment with Stripe, make COD order.
  • Coupon: Fetch all Coupuns,specific coupon,update and delete.
  • Brand: Fetch all Brands,specific Brand,add with image or no,update and delete.
  • Category: Fetch all Categories,specific Category,add,update and delete.
  • SubCategory: Fetch all Subcategories,specific subcategory,add,update and delete.
  • Product: Fetch all Products,specific Product,add with image,update and delete.
  • Rewiew: Fetch all Reviews,add,update and delete.
  • Upload Images: Upload and manage images to be included in Product or Brands.
  • Pagination: Paginate large data sets for efficient retrieval and presentation.
  • Search: Field that you want to search by it.

Installation

  1. Clone the Repository: Use the git clone command to clone the GitHub repository to your local machine.
    git clone  https://github.com/Halimmsbah/EcommerceHalim
  2. Initialize a Package.json File (if not already done): If your project doesn't already have a package.json file, you can create one by running:
    npm init
    # or
    yarn init
  3. Install depends
       npm install
  4. Setting up env variables
    • Please first specifiy your database engine
    ## PORT
    PORT=number 
    
    ## Prisma URI
    DB_STRING=connection-string   
    
    ## JWT access token
    SECRET=secret string
    SALT=number
    
    ## CLOUD CONFIG
    CLOUDINARY_CLOUD_NAME=cloud name
    CLOUDINARY_API_KEY=cloud-api-key
    CLOUDINARY_API_SECRET=cloud-api-secret
    MODE=""
    
    ## STRIPE
    STRIPE_SECRET=stripe-sekret-key
    STRIPE_WEBHOOK_SECRET=STRIPE_WEBHOOK_SECRET

Project Structure

c:/Users/Halim/Desktop/study/e_comm/
 ├─ database/
 │  ├─ models/
 │  │  ├─ brand.model.js
 │  │  ├─ cart.model.js
 │  │  ├─ category.model.js
 │  │  ├─ coupon.model.js
 │  │  ├─ order.model.js
 │  │  ├─ product.model.js
 │  │  ├─ review.model.js
 │  │  ├─ subcategory.model.js
 │  │  └─ user.model.js
 │  └─ dbConnection.js
 ├─]node_modules/ (ignored)
 ├─ src/
 │  ├─ middleware/
 │  │  ├─ catchError.js
 │  │  ├─ emailExist.js
 │  │  ├─ globalError.js
 │  │  └─ validation.js
 │  ├─ modules/
 │  │  ├─ address/
 │  │  │  ├─ address.controller.js
 │  │  │  ├─ address.routes.js
 │  │  │  └─ address.validation.js
 │  │  ├─ auth/
 │  │  │  ├─ auth.controller.js
 │  │  │  ├─ auth.routes.js
 │  │  │  └─ auth.validation.js
 │  │  ├─ brand/
 │  │  │  ├─ brand.controller.js
 │  │  │  ├─ brand.routes.js
 │  │  │  └─ brand.validation.js
 │  │  ├─ cart/
 │  │  │  ├─ cart.controller.js
 │  │  │  ├─ cart.routes.js
 │  │  │  └─ cart.validation.js
 │  │  ├─ category/
 │  │  │  ├─ category.controller.js
 │  │  │  ├─ category.routes.js
 │  │  │  └─ category.validation.js
 │  │  ├─ coupon/
 │  │  │  ├─ coupon.controller.js
 │  │  │  ├─ coupon.routes.js
 │  │  │  └─ coupon.validation.js
 │  │  ├─ handlers/
 │  │  │  └─ handler.js
 │  │  ├─ order/
 │  │  │  ├─ order.controller.js
 │  │  │  ├─ order.routes.js
 │  │  │  └─ order.validation.js
 │  │  ├─ product/
 │  │  │  ├─ product.controller.js
 │  │  │  ├─ product.routes.js
 │  │  │  └─ product.validation.js
 │  │  ├─ review/
 │  │  │  ├─ review.controller.js
 │  │  │  ├─ review.routes.js
 │  │  │  └─ review.validation.js
 │  │  ├─ subcategory/
 │  │  │  ├─ subcategory.controller.js
 │  │  │  ├─ subcategory.routes.js
 │  │  │  └─ subcategory.validation.js
 │  │  ├─ user/
 │  │  │  ├─ user.controller.js
 │  │  │  ├─ user.routes.js
 │  │  │  └─ user.validation.js
 │  │  ├─ wishlist/
 │  │  │  ├─ wishlist.controller.js
 │  │  │  ├─ wishlist.routes.js
 │  │  │  └─ wishlist.validation.js
 │  │  └─ index.routes.js
 │  ├─ services/
 │  │  ├─ email/
 │  │  │  ├─ emailTemplete.js
 │  │  │  └─ sendEmail.js
 │  │  └─ fileUpload/
 │  │     └─ fileUpload.js
 │  └─ utils/
 │     ├─ apiFeatures.js
 │     ├─ AppError.js
 │     └─ pdf.js
 ├─].env (ignored)
 ├─ .gitignore
 ├─ demo.json
 ├─ index.js
 ├─ invoice.pdf
 ├─ package-lock.json
 ├─ package.json
 └─ README.md

EcommerceHalim

EcommerceHalim

EcommerceHalim

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors