MCPcopy Index your code
hub / github.com/AsadiAhmad/Online-Shop

github.com/AsadiAhmad/Online-Shop @V1.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release V1.1.0 ↗ · + Follow
21 symbols 28 edges 27 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Online-Shop

An online shop with user comments

Tech :hammer_and_wrench: Languages and Tools :

HTML  CSS  JS  JQuery  nodejs  MongoDB 

Tutorial

Step1 : Install Nodejs

Online Shop uses Nodejs as Backend Language

Download and install Nodejs with this link : ```sh[ https://nodejs.org/en/download


### Step2 : Install MongoDB
Online Shop uses MongoDB so install MongoDB
```sh
https://www.mongodb.com/docs/manual/installation/

Step3 : Clone GitHub Repo

Goto your IDE (I usually use Vscode and Webstorm) and clone the src

https://github.com/AsadiAhmad/Online-Shop.git

Step4 : set your Nodejs Application

the src does'nt have any Nodejs configuration file

create New file named package.json in root of src with this lines :

{
  "name": "untitled",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "ejs": "^3.1.9",
    "express": "^4.19.2",
    "jquery": "^3.7.1",
    "jsonwebtoken": "^9.0.2",
    "mongodb": "^6.5.0",
    "mongoose": "^8.3.0",
    "multer": "^1.4.5-lts.1",
    "path": "^0.12.7"
  }
}

Goto your IDE terminall and type

npm install

with this command nodejs will install package-lock.json and set the configurations

Step5 : Install necessary Packages

Install all of the Packages with npm command

npm install ejs
npm install express
npm install jquery
npm install jsonwebtoken
npm install mongodb
npm install mongoose
npm install multer
npm install path

for checking installed packages you can run this command :

npm list

Step6 : Create Connection to MongoDB

I have gitignore my connection so you need create new connection file :

Create a Floder named Connection in /root/public/JS/BackEnd path

Create js file named connection.js like this :

const { MongoClient } = require('mongodb');
const uri = 'mongodb+srv://<user>:<password>@cluster-0-130.81jyjqx.mongodb.net/';
const dbName = 'OnlineShop';

let db;

async function connection() {
    if (!db) {
        const client = new MongoClient(uri, { useUnifiedTopology: true });
        await client.connect();
        db = client.db(dbName);
    }
    return db;
}

module.exports = connection;

Dont forget to replcae your username and password of your Mongo database here

if you have another formate of connection string you can replace it into uri

Step7 : Create MongoDB Datbase and collections :

create datbase named OnlineShop

commands used in MongoDB shell :

use OnlineShop

and Create these three collections :

use OnlineShop
db.createCollection("Comments")
db.createCollection("Products")
db.createCollection("users")

Step8 : Run the project :

Goto root path run this:

npm app.js

View

Core symbols most depended-on inside this repo

sortNewest
called by 6
public/JS/BackEnd/Aggregations/productAggregations.js
sortOldest
called by 6
public/JS/BackEnd/Aggregations/productAggregations.js
sortMostExpensive
called by 6
public/JS/BackEnd/Aggregations/productAggregations.js
sortCheapest
called by 6
public/JS/BackEnd/Aggregations/productAggregations.js
sortMostPopular
called by 6
public/JS/BackEnd/Aggregations/productAggregations.js
sortMostHated
called by 6
public/JS/BackEnd/Aggregations/productAggregations.js
showSlides
called by 1
public/JS/FrontEnd/Slide/Slide.js
logout
called by 0
public/JS/FrontEnd/Token/LogOut.js

Shape

Function 21

Languages

TypeScript100%

Modules by API surface

public/JS/BackEnd/Aggregations/productAggregations.js6 symbols
public/JS/BackEnd/API/ProductAPI.js2 symbols
public/JS/BackEnd/API/LoginAPI.js2 symbols
public/JS/FrontEnd/Visibility/passwordVisibility.js1 symbols
public/JS/FrontEnd/Token/LogOut.js1 symbols
public/JS/FrontEnd/Slide/Slide.js1 symbols
public/JS/FrontEnd/Ajax/GroupTab/GroupTab.js1 symbols
public/JS/BackEnd/Product/addProduct.js1 symbols
public/JS/BackEnd/Product/SortProduct.js1 symbols
public/JS/BackEnd/Login/signUp.js1 symbols
public/JS/BackEnd/Login/login.js1 symbols
public/JS/BackEnd/Login/JWT/Authorization.js1 symbols

Datastores touched

(mongodb)Database · 1 repos

For agents

$ claude mcp add Online-Shop \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page