Giter VIP home page Giter VIP logo

fullstack-mern-foodstore's Introduction

  • image
  • image
  • image
  • image

Server side

  • NodeJs
  • passport-local
  • passport
  • mongoose
  • mongodb Database
  • jsonwebtoken , JWT aunthentication and otoritation
  • express framework
  • cors
  • cookie-parser
  • bcrypt
  • multer untuk membaca type form data dari client

entitas

image

API Spect :

Product.

Get Product:

Request :

  • Method : GET
  • Endpoint : /products/

Create Product:

Request :

  • Method : POST
  • Endpoint : /products/

Edit Product:

Request :

  • Method : PUT
  • Endpoint : /products/:id

DELETE Product:

Request :

  • Method : POST
  • Endpoint : /products/:id

Category

Get Category:

Request :

  • Method : GET
  • Endpoint : /categories/

Create Category:

Request :

  • Method : POST
  • Endpoint : /categories/

Edit Category:

Request :

  • Method : PUT
  • Endpoint : /categories/:id

Delete Category:

Request :

  • Method : DELETE
  • Endpoint : /categories/:id

Tag

Get TAG:

Request :

  • Method : GET
  • Endpoint : /tags/

create TAG:

Request :

  • Method : POST
  • Endpoint : /tags/

edit TAG:

Request :

  • Method : PUT
  • Endpoint : /tags/:id

Delete TAG:

Request :

  • Method : DELETE
  • Endpoint : /tags/:id

DeliveryAddress

Get DeliveryAddress:

Request :

  • Method : GET
  • Endpoint : /delivery-addresses/

Create DeliveryAddress:

Request :

  • Method : POST
  • Endpoint : /delivery-addresses/

EDIT DeliveryAddress:

Request :

  • Method : PUT
  • Endpoint : /delivery-addresses/:id

DELETE DeliveryAddress:

Request :

  • Method : DELETE
  • Endpoint : /delivery-addresses/:id

Order

Get orders:

Request :

  • Method : GET
  • Endpoint : /orders/

Post orders:

Request :

  • Method : POST
  • Endpoint : /orders/

CartItem

Get CartItem:

Request :

  • Method : GET
  • Endpoint : /carts/

Edit CartItem:

Request :

  • Method : GET
  • Endpoint : /orders/:id

Client Side using react

stacks

  • ReactJs from client side
  • React Redux
  • Context Api
  • tailwindcss from css framework
  • redux-thunk middleware
  • react-router-dom router
  • react-hook-form input users
  • axios fetching api
  • Styled component and composition

Fitur

  • Fitur-fitur utama yang akan kita bangun antara lain:
  • Daftar makanan
  • Pencarian makanan berdasarkan keyword
  • Filter makanan berdasarkan kategori
  • Filter makanan berdasarkan tags
  • Login & register user
  • Keranjang belanja (cart)
  • Checkout
  • Riwayat pemesanan
  • Kelola daftar alamat pengiriman
add .env foodstore-server

PORT = 3000 SERVICE_NAME=foodstore-service DB_HOST=localhost

DB_PORT=27017

SESUAIKAN dengan username mongo di mesinmu

DB_USER=

SESUAIKAN dengan password user di mesinmu

DB_PASS=

SESUAIKAN dengan nama database yang sudah kamu buat

DB_NAME=foodstore

SECRET_KEY=

fullstack-mern-foodstore's People

Contributors

anggawikanugraha avatar

Stargazers

 avatar  avatar

Watchers

 avatar

fullstack-mern-foodstore's Issues

Relasi product dengan category

relasi one to one
dummy product

code ๐Ÿ’ฏ

let productWithCategory = await Product.findOne({_id: '4jlksjf245kjh5l245k2' }).populate('category');

{
_id: ObjectId('4jlksjf245kjh5l245k2'),
name: "Burger Cheese",
price: 20000,
description: "Burger keju enak kenyang",
category: {
_id: ObjectId('erelkjio39h34arf343jh'),
name: 'Utama',
}
}

Relasi product dengan tag one to many

await Product
.find({_id: 'p123'})
.populate('category')
.populate('tags') // <---

{
_id: ObjectId('p123'),
name: 'Hot Americano',
price: 25000,
description: 'Hot black coffee',
category: {
_id: ObjectId('abc'),
name: 'Minuman'
},
tags: [
{ _id: ObjectId('123'), name: 'Coffee'},
{ _id: ObjectId('345'), name: 'Hot'}
]
}

Api pengiriman

alamat pengiriman yang digunakan untuk mengelola data almat
pengiriman pengguna

/api/delivery-addresses

Cartitem

endpoint cart untuk menyimpan cartitem ..

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.