프로젝트
GitHub에서 보기
ashraf-kabir/mern-ecommerce
소개
MERN Stack ecommerce site
비즈니스 및 금융측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalmern-ecommerce
Frontend-> Vite JS (React JS)
Backend-> Node JS & Express JS
Database-> MongoDB
Installation process
clone the repo using this command
git clone https://github.com/ashraf-kabir/mern-ecommerce.gitinstall npm packages
- install backend packages
cd mern-ecommerce npm install- install frontend packages
cd frontend npm installgo to the parent folder of mern-ecommerce & create .env for connection, JWT_SECRET, BRAINTREE_MERCHANT_ID, BRAINTREE_PUBLIC_KEY and BRAINTREE_PRIVATE_KEY.
cd mern-ecommerce sudo nano .env(ctrl+x to save & nano follow instruction there)
sample code for backend .env
MONGODB_URI=YOUR_MONGODB_URI JWT_SECRET=YOUR_JWT_SECRET BRAINTREE_MERCHANT_ID=YOUR_BRAINTREE_MERCHANT_ID BRAINTREE_PUBLIC_KEY=YOUR_BRAINTREE_PUBLIC_KEY BRAINTREE_PRIVATE_KEY=YOUR_BRAINTREE_PRIVATE_KEYFrontend config.js
cd mern-ecommerce/frontend sudo nano config.jssample code for frontend config.js
export const API = 'http://localhost:5000/api';Instructions:
- for mongodb atlas database creation follow this tutorial->https://www.youtube.com/watch?v=KKyag6t98g8
- you can use any random string as JWTSECRET
- if your backend server is on a different port or domain, update the API URL in config.js accordingly
note: add .env on .gitignore
- for server deployment use secrets directly
deploy this project on your local server by using this command
cd mern-ecommerce npm run devnote: both backend & frontend server will start at once with the above command.
Database Structure: (Schema)
- categories: _id, name, createdAt, updatedAt;
- orders: _id, status, products (Array), transaction_id, amount, address, user (Object), createdAt, updatedAt
- products: _id, photo (Object), sold, name, description, price, category, shipping, quantity, createdAt, updatedAt
- users: _id, role, history (Array), name, email, salt, hashed_password, createdAt, updatedAt
App Description:
1. user can view all products
2. user can view single product
3. user can search products and view products by category and price range
4. user can add to cart checkout products using credit card info
5. user can register & sign in
6. admin can create, edit, update & delete products
7. admin can create categories
8. admin can view ordered products
9. admin can change the status of a product (processing, shipped, delivered, etc.)
10. FRONTEND URL: http://localhost:5173/
11. Project demo will be added soon...
- Deployed on: (No longer available due to heroku free dyno plan has deprecated)
https://ecommerce-ak.herokuapp.com/ - raise a star to support me
관련 프로젝트 살펴보기
불러오는 중…