Skip to content

This eCommerce project leverages the power of the MERN stack, combined with Redux for efficient state management.

Notifications You must be signed in to change notification settings

ArjanaaTernava/eCommerce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eCommerce Project - eBlej

This eCommerce project leverages the power of the MERN stack, combined with Redux for efficient state management. It utilizes React,a JavaScript library for building user interfaces, along with Create React App for compiling and bundling the frontend code. MongoDB, a flexible NoSQL database, is employed to handle the storage of product catalogs, user profiles, orders, and other essential data. Node.js, a server-side runtime environment, works in tandem with Express.js, a web application framework, to handle backend logic, routing, and communication with the MongoDB database. For interacting with MongoDB in a Node.js environment, the project integrates Mongoose, an Object-Relational Mapping (ORM) library, which simplifies the process of defining schemas, creating models, and performing database operations.

Node.js Express.js MongoDB Mongoose React Redux ESLint Prettier

 

Getting Started

To get a local copy up and running follow these simple example steps.

 

Prerequisites

Before getting started, make sure you have the following software installed:

  • MongoDB Server - Download and install MongoDB Server for your operating system.
  • MongoDB Compass - Download and install MongoDB Compass, a visual interface for working with MongoDB.
  • Node.js - Download and install Node.js, which includes npm, the package manager for Node.js modules.

Recommended:

  • node : >=18.16.0.
  • MongoDB Server : >=6.0.6 and MongoDB Compass GUI : 1.37.0 - Stable.
  • MongoDB Compass GUI it is preferred but not necessary, if you are familiar with writing commands in MongoDB.

 

Directory Structure in the frontend folder

Name Description
public/ Static assets (images).
src/components React components that are used for specific pages.
src/actions Indicate what can possibly be done to the states.
src/reducers Indicate transformations of the states.
src/constants Provide a way to define and manage fixed values in a central location.

 

Directory Structure in the backend folder

Name Description
config Configuration of the environment variables and database connection.
controllers Managing back end pages and responding directly to HTTP requests.
models Connecting them to database and using them in controllers.
middlewares Intercepting and processing requests and responses.
tests Unit tests and integration tests for testing the functionality and reliability of the backend code.
routes Route handlers and endpoint definitions for the backend API.
utils Reusable functionality and assist in various tasks throughout the backend application.

 

Setup

  • Clone the repository.
 git clone https://github.com/ArjanaaTernava/eCommerce.git 
 
 or

 git clone git@github.com:ArjanaaTernava/eCommerce.git
  • Install all dependencies at the root folder using:
npm install
  • Navigate to the frontend directory with the cd frontend command and install all dependencies using:
cd frontend

npm install

Env Variables

  • Remember to add config variables values in the config.env file in backend/config folder.

Start dev server

npm run dev

Start frontend

npm start

Seed the database

npm run seeder

 

Testing with Mocha

We have used the Mocha framework for testing our application. Mocha is a popular JavaScript testing framework that provides a clean and easy-to-use interface for writing test cases.

Running tests

To run the tests, follow these steps:

  • Make sure you have all the dependencies installed by running:
npm install
  • Execute the tests using the command:
npm test

Mocha will then run the test suites and display the results in the terminal.

 

Documentation with Swagger

We have used Swagger for documenting our API endpoints and models. Swagger provides a standardized way to describe and visualize APIs, making it easier for developers to understand and interact with the endpoints.

Authors:

About

This eCommerce project leverages the power of the MERN stack, combined with Redux for efficient state management.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •