A full-stack e-commerce application built with Django (backend) and React (frontend).
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
- Python 3.8+
- Node.js 14+
- npm or yarn
- PostgreSQL (optional, SQLite is used by default)
- Create and activate a virtual environment:
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Run migrations:
python manage.py migrate- Create a superuser:
python manage.py createsuperuser- Run the development server:
python manage.py runserver- Install dependencies:
cd frontend
npm install- Start the development server:
npm run devCreate a .env file in the backend directory with:
SECRET_KEY=your_secret_key
DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1
- User authentication (login/register)
- Product browsing and search
- Shopping cart functionality
- Product categories
- Responsive design
/api/products/- List and create products/api/carts/- Cart operations/api/login/- User login/api/register/- User registration
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request