Code Monkey home page Code Monkey logo

fullstack-example's Introduction

EPO Seconhand Shop

This project use MERN stack to build a secondhand platform, where users can register as sellers and trade their belogings. Site is managed by admins, guests only can sign up as either "seller" or "buyer".

Main stack

React React-Redux SASS react-hook-form Nodejs Express Passport Jest Stripe SendGrid mongoose

Project structure

  1. api folder - backend
├── global.d.ts
├── jest.config.js
├── package.json
├── src
│   ├── app.ts
│   ├── config
│   ├── features
│   │   ├── carts
│   │   ├── categories
│   │   ├── cities
│   │   ├── images
│   │   ├── mails
│   │   ├── productReviews
│   │   ├── products
│   │   ├── stripe
│   │   ├── userReviews
│   │   └── users
│   ├── fixtures
│   ├── helpers
│   ├── middlewares
│   ├── server.ts
│   └── util
├── tsconfig.json
  1. client folder - frontend
├── package.json
├── public
├── src
│   ├── App.tsx
│   ├── axios
│   ├── components
│   ├── hooks
│   ├── index.tsx
│   ├── react-app-env.d.ts
│   ├── redux
│   ├── reportWebVitals.ts
│   ├── router
│   ├── setupTests.ts
│   ├── styles
│   └── types
├── test
└── tsconfig.json

Key features

  • Common features for all users
    • Login
    • Register
    • Buy products / Update products in cart
    • Modify account info (except email)
    • Delete own account
  • Typical features for sellers
    • CRUD operations for own products
  • Typical features for admins
    • Manage all products, users, carts, and other information

How to use

git clone Clone the repo into your all local machine

  • In each folder, run npm install to add all the independencies. Check other scripts in the package.json files.
  • In api folder, create .env file with the key-pair values
    • MONGODB_URI MongoDB database
    • JWT_SECRET jwt secret string to encrypt/decrypt data
    • STRIPE_API_SECRET_TEST stripe api to enable payment service
    • STRIPE_WEBHOOK stripe webhook to listen to payment event
    • SENDGRID_API_KEY sengrid api key to send email
    • SENDER sender email in sendgrid
    • GOOGLE_CLIENT_ID Google client id to verify login with google
    • GOOGLE_CLIENT_SECRET Google client secret to verify login with google
    • PORT port to run express server locally

fullstack-example's People

Contributors

alikiny avatar

Stargazers

Cuong Vu avatar

Watchers

 avatar

Forkers

cuongvu3009

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.