An E-Commerce application
- Mongoose (NoSql Database)
- MySql (Sql database)
- Reactjs
- Bootstrap
- Nodejs
- Expressjs
Link : https://dbdiagram.io/d/644369c76b3194705102483c
- Nodejs and node package manager
- 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>
- Open mySql and create a schema named "e-commerce" and inside it a table named "payment_card".
- The attributes for the table should be as shown in the figure below
- 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>");
});
- 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",
});
- Clone the repository.
- Go the the root directory and type
cd client
npm i
cd ../server
npm i
- 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
Video link - https://drive.google.com/file/d/1i6ZaNkTCh7dS9kf73Nh__gqq39Jc1eR7/view?usp=sharing
- Database Normalization
- Both Sql and noSql databases
- Protected Routing System
- Extendable design
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