Skip to content

alikiny/fullstack-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages