Giter VIP home page Giter VIP logo

kika's Introduction

Kika

An e-commerce api for Kika

Kika api

A basic feature of an e-commerce service with the following features:

abeg look at the cart.md in controllers

Users can :

  • Register
  • Login
  • Logout
  • Update details
  • Update password

Usage

  • Add "config.env" file to "/src/config/" folder and update the values to your own
  • Check "/src/config/envSample.txt" for sample

Install Dependencies

npm install

Run App

# Run in dev mode
npm run dev

# Run in prod mode
npm start

run this before npm start
npm install -g win-node-env (this install node.env globally)

Routes and Payload

## Authentication

// @desc      Register user
// @route     POST /api/v1/auth/register
// @access    Public
// @payload   { name, email, password, role }

// @desc      Login user
// @route     POST /api/v1/auth/login
// @access    Public
// @payload   { email, password } 

// @desc      Log user out / clear cookie
// @route     GET /api/v1/auth/logout
// @access    Private

// @desc      Update user details
// @route     PUT /api/v1/auth/updatedetails
// @access    Private
// @payload    {name or email or name and email}

// @desc      Update password
// @route     PUT /api/v1/auth/updatepassword
// @access    Private
// @payload   {password}

## Products

// @desc      Get all products
// @route     GET /api/v1/products
// @access    Public

// @desc      Get product
// @route     GET /api/v1/products/:id
// @access    PUBLIC
// @param     :product_id

// @desc      Get products via slug
// @route     GET /api/v1/products/slug/:slug
// @access    PUBLIC
// @param     :product_slug

// @desc      Create a product
// @route     Post /api/v1/products
// @access    Private (Vendor)
// @payload   { name, image, price, category, brand, countInStock, description }

// @desc      Update a product
// @route     PATCH /api/v1/products/:id
// @access    Private
// @payload   { name, image, price, category, brand, countInStock, description }

// @desc      Delete a product
// @route     DELETE /api/v1/products/:id
// @access    Private (Vendor)
// @param     :product_id


## Reviews

// @desc      Post reviews
// @route     POST /api/v1/products/:id/reviews
// @access    Private (User and Vendors)
// @payload   {name, rating ,comment}


## Admin

// @desc      Get all Users
// @route     GET /api/v1/users
// @access    Private (Admin)

// @desc      Get a User
// @route     GET /api/v1/users/:id
// @access    Private (Admin)
// @param     {:user_id}

// @desc      Delete User
// @route     Delete /api/v1/user/:id
// @access    Private (Admin)
// @param     {:user_id}

kika's People

Contributors

iamifechi avatar aguluman avatar afej avatar dependabot[bot] avatar

Watchers

 avatar

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.