Skip to content

Bandana84/Finalproject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

E-commerce Project

A full-stack e-commerce application built with Django (backend) and React (frontend).

Project Structure

project/
├── backend/          # Django backend
│   ├── products/     # Products app
│   ├── carts/        # Cart functionality
│   ├── User/         # User authentication
│   └── backend/      # Django project settings
└── frontend/         # React frontend
    ├── src/
    │   ├── components/
    │   ├── context/
    │   ├── pages/
    │   └── App.jsx
    └── package.json

Prerequisites

  • Python 3.8+
  • Node.js 14+
  • npm or yarn
  • PostgreSQL (optional, SQLite is used by default)

Backend Setup

  1. Create and activate a virtual environment:
cd backend
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Run migrations:
python manage.py migrate
  1. Create a superuser:
python manage.py createsuperuser
  1. Run the development server:
python manage.py runserver

Frontend Setup

  1. Install dependencies:
cd frontend
npm install
  1. Start the development server:
npm run dev

Environment Variables

Create a .env file in the backend directory with:

SECRET_KEY=your_secret_key
DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1

Features

  • User authentication (login/register)
  • Product browsing and search
  • Shopping cart functionality
  • Product categories
  • Responsive design

API Endpoints

  • /api/products/ - List and create products
  • /api/carts/ - Cart operations
  • /api/login/ - User login
  • /api/register/ - User registration

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors