Giter Site home page Giter Site logo

cartsailor's Introduction

CartSailor

About

An E-Commerce application

Tech-Stack

Database

  1. Mongoose (NoSql Database)
  2. MySql (Sql database)

Frontend

  1. Reactjs
  2. Bootstrap

Backend

  1. Nodejs
  2. Expressjs

DB Diagram

image

Link : https://dbdiagram.io/d/644369c76b3194705102483c

Prerequisites

  1. Nodejs and node package manager
  2. Crate .env as follows:
    Client folder .env file :
REACT_APP_API = <server_port>

Let us say we are running server at http://localhost:3001 then -

REACT_APP_API = http://localhost:3001

Server folder .env file :

MONGO_URL = <mongo_url_of_your_cluster>
JWT_SECRET = <you_jwt_secret>
PORT = <server_port>
  1. Open mySql and create a schema named "e-commerce" and inside it a table named "payment_card".
  2. The attributes for the table should be as shown in the figure below image
  3. Add details by hitting the endpoint
http://localhost:3001/insertOnce

Change the data inside server/index.js appropriately

// Inserting into local db
app.get("/insertOnce", (req, res) => {
  const sqlInsert =
    "INSERT INTO payment_card (card_number,cvv,name,bank_id,balance) VALUES ('1111222233334442','822','John Doe','SBIN001',400000)";

  db.query(sqlInsert, (err, result) => {
    console.log("error", err);
    console.log("result", result);
  });
  res.send("<h1>Data Inserted</h1>");
});

image

  1. Change the details inside server/index.js with your mySql details
const db = mysql.createPool({
  host: "localhost",
  user: "root",
  password: <your_password>,
  database: "e-commerce",
});

Instructions to run

  1. Clone the repository.
  2. Go the the root directory and type
cd client
npm i
cd ../server
npm i
  1. Now you are at the server folder,in order to start both server and client concurrently type
npm run dev

4.The frontend application will start at

http://localhost:3000

Demonstration

Video link - https://drive.google.com/file/d/1i6ZaNkTCh7dS9kf73Nh__gqq39Jc1eR7/view?usp=sharing

Major functionalities :

  • Database Normalization
  • Both Sql and noSql databases
  • Protected Routing System
  • Extendable design

Features of the project

Customer side

  • Search for products
  • View details of products
  • Filter by category
  • Add item to the cart
  • Modify the cart
  • Destination address
  • View Orders
  • Pay for the items (Payment Interface)
  • May have multiple bank account
  • Exception handling when balance is low
  • View status of each order(Tracking system)
  • User Dashboard

Admin side

  • CRUD operation on products
  • CRUD operation on categories (filter)
  • Update order status
  • Admin Dashboard

Common functionalites

  • User registration
  • Password hashing using bcrypt
  • JWT authentication

cartsailor's People

Contributors

harmitsb2122 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.