Skip to content

Arvind-4/E-Commerce

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/