Skip to content

Eikichi-GTO/e_commerce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Forum Ecommerce

Full-stack ecommerce app with a React frontend and an Express/MongoDB backend.

Features

  • User authentication with JWT
  • Product and category browsing
  • Cart and order workflows
  • Admin endpoints for management
  • File uploads served from /uploads

Tech Stack

  • Frontend: React (Create React App), React Router, Axios, Bootstrap
  • Backend: Node.js, Express, MongoDB, Mongoose, Multer

Project Structure

  • backend/ Express API and MongoDB models
  • frontend/ React app

Requirements

  • Node.js and npm
  • MongoDB instance (local or hosted)

Setup

Backend

cd backend
npm install

Create a .env file in backend/:

MONGO_URI=mongodb://localhost:27017/forum_ecommerce
JWT_SECRET=your_jwt_secret
PORT=5000

Run the API:

npm run dev

Optional seed data (creates an admin user and sample data):

npm run seed

Frontend

cd frontend
npm install

Optional .env in frontend/:

REACT_APP_API_URL=http://localhost:5000

Run the app:

npm start

Environment Variables

Backend (backend/.env):

  • MONGO_URI (required) MongoDB connection string
  • JWT_SECRET (required) JWT signing secret
  • PORT (optional) API port (default 5000)
  • ADMIN_NAME (optional) seed admin name
  • ADMIN_EMAIL (optional) seed admin email
  • ADMIN_PASSWORD (optional) seed admin password

Frontend (frontend/.env):

  • REACT_APP_API_URL (optional) API base URL (default http://localhost:5000)

Notes

  • Uploaded files are stored in backend/uploads/ and served at /uploads.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors