Skip to content

arvind-4/E-Commerce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Arvind-4
Jan 3, 2023
0bff5ff · Jan 3, 2023
Dec 19, 2022
May 4, 2022
Dec 19, 2022
Dec 19, 2022
Dec 19, 2022
May 4, 2022
Jan 3, 2023
Dec 19, 2022
Dec 19, 2022
Jan 19, 2022
May 6, 2022
Jan 3, 2023
Dec 19, 2022
Dec 19, 2022
Jan 19, 2022
Dec 19, 2022
Dec 19, 2022
Dec 19, 2022
Dec 19, 2022
Dec 19, 2022
May 1, 2022
Jan 3, 2023

Repository files navigation

E-commerce

A Simple E-commerce build on Django 4, Solid js, and TailWind! .

Stack

  • Solid Js - A Reactive JavaScript Library.
  • Django - Django makes it easier to build better web apps more quickly and with less code.
  • Vite - Next Generation Frontend Tooling.
  • Typescript - JavaScript with syntax for types.
  • Tailwind 3 - Rapidly build modern websites without ever leaving your HTML.
  • CockroachDB - A distributed SQL database designed for speed, scale, and survival.

Project structure

$PROJECT_ROOT
│  
├── apps/web  # Django Backend
│  
├── apps/www  # Solid js App
│   
├── apps/templates # Django Templates
│   
├── apps/web/apps/ accounts, carts, category, products, pages # Django Apps
│   
├── requirements # Python Requirements
│
├── testing # Jupyter Notebook for Testing
│
├── data/products.json # Sample Data
│
├── app.py # Entry Point for Django Backend
│
├── vercel.json # Vercel Config file
│
├── manage.py # Run Django Commands
│
├── package.json # npm commands.

Get the Code

  • Clone Repo
mkdir django_ecommerce
cd django_ecommerce
git clone https://github.com/Arvind-4/E-Commerce-.git .
  • Create Virtual Environment for Python
pip install virtualenv
python -m venv .
  • Activate Virtual Environment
source Scripts/activate

Window Users use: .\Scripts\activate

  • Install Dependencies
pip install -r requirements.txt
  • Make Migrations
python manage.py makemigrations
python manage.py migrate

For Frontend

  • Install Dependencies
npm run i
  • Run Dev Server
npm run dev
  • Now for Bundling Your Frontend + Django static
npm run production

Run Both Django and Vite Server for Hot Reload in Your Project Root

Open localhost:8000 in Your Browser.


NOTE: Add Products by Navigating Admin Page.
Admin url => admin/