Skip to content

A basic B2B e-commerce web application focusing on security, real-time updates, and role-based functionality. This is a full-stack application using modern technologies while adhering to best practices.

License

Notifications You must be signed in to change notification settings

shenoy-anurag/b2b-ecommerce

Repository files navigation

b2b-ecommerce

A basic B2B e-commerce web application focusing on security, real-time updates, and role-based functionality. This is a full-stack application using modern technologies while adhering to best practices.

Demo

Product

Demo Screenshot: View Product

Storefront

Demo Screenshot: Storefront

Admin Product Management

Demo Screenshot: Admin Product Management

Admin Audit Logs

Demo Screenshot: Admin Audit Logs

Signin and Signup

Check out more images in the docs/images folder!

Design Pattern:

This project follows the MVC design pattern for the backend.

Stack

Backend

  • Python
  • Flask
  • SQLite

Frontend

  • Typescript
  • React
  • Next.js

Prerequisites

  1. Python version 3.12.8
  2. SQLite (no setup required, db file included)
  3. Node version v22.13.0

Setup Backend

  1. Change directory to server/.
  2. Create a virtual environment virtualenv .venv. Install virtualenv is you haven't yet. Install with pip install virtualenv and check your installation virtualenv --version.
  3. Activate the virtual environment source .venv/bin/activate (for Mac) and .\.venv\Scripts\Activate (for Windows).
  4. Once the virtualenv has been activated, run pip install -r requirements.txt.
  5. Rename server/secrets-sample.env to server/secrets.env.
  6. Change directory to project root b2b-ecommerce.
  7. Run wsgi.py with the command python3 wsgi.py.

Virtualenv

If you are having trouble with virtualenv, check out the README-Create-Virtualenv.md file in the root directory of this project.

Setup Frontend

  1. Change directory to frontend/.
  2. Install all packages with npm install.
  3. Rename sample.env.local to .env.local.
  4. Run the development server using npm run dev.
  5. Go to http://localhost:3000/ to see the UI.

Automated setup

If you have a Mac, I've created bash files to setup the backend and frontend for you.

Just run setup_backend.sh and setup_frontend.sh in two separate terminal instances/tabs/windows.

bash setup_backend.sh

bash setup_frontend.sh

About

A basic B2B e-commerce web application focusing on security, real-time updates, and role-based functionality. This is a full-stack application using modern technologies while adhering to best practices.

Topics

Resources

License

Stars

Watchers

Forks