Skip to content

GabrielMaida/Monito-Fullstack-eCommerce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Status

Monito eCommerce

A full-featured eCommerce platform for pet products with a React Frontend and a NestJS Backend, connected to MongoDB. This project demonstrates modern web development practices and architecture patterns in a complete, functional application.

🎯 Project Objective

The Monito eCommerce platform was built to create a complete online shopping experience for pet products and services. The application focuses on usability, performance, and design aesthetics while implementing best practices in software architecture and programming.

πŸš€ Technologies

Frontend

  • Framework: React with React Router
  • Build Tool: Vite
  • Language: TypeScript
  • Styling: Tailwind CSS
  • Asset Management: SVG Integration with vite-plugin-svgr
  • Package Manager: NPM

Backend

  • Framework: NestJS
  • Language: TypeScript
  • Database ODM: Mongoose
  • API Design: RESTful Architecture
  • Package Manager: NPM

Database

  • MongoDB Atlas (Cloud-hosted)

πŸ’» Key Features Implemented

  • Product Category Browsing: Filter products by type, color, size, and gender
  • Featured Products Display: Showcase of highlighted products on the homepage
  • Detailed Product View: Complete product information with multiple image display
  • Pagination System: Navigate through product listings efficiently
  • Advanced Filtering: Filter products by various attributes
  • Interactive UI Elements: Smooth animations on hover and state changes
  • Image Gallery: Dynamic selection of product images
  • Responsive Design: Works across multiple device sizes

πŸ“‘ API Documentation

The backend exposes the following REST endpoints:

Product Endpoints

GET /api

  • Description: Basic health check endpoint
  • Response: Text confirmation that API is working

GET /api/product

  • Description: Retrieve products with optional filtering
  • Query Parameters:
    • product (optional): Filter by product type (e.g., "Dog")
    • exclude (optional): Exclude specific product type (e.g., "Dog")
    • gender (optional): Filter by gender ("Male" or "Female")
    • color (optional): Filter by color
    • size (optional): Filter by size
    • page (optional, default: 1): Page number for pagination
    • limit (optional, default: 10): Number of items per page
  • Example: GET /api/product?product=Dog&gender=Female&page=1&limit=6

GET /api/product/:sku

  • Description: Retrieve a specific product by SKU
  • Path Parameters:
    • sku: The unique SKU identifier for the product
  • Example: GET /api/product/230

POST /api/product

  • Description: Create a new product (for admin use)
  • Request Body: JSON object with product details (see example in requests.http)
  • Authentication: Not implemented in demo version

πŸ“‚ Project Structure

Below is the folder structure of the Monito eCommerce project:

monito-fullstack-ecommerce/
β”œβ”€β”€ .gitignore
β”œβ”€β”€ LICENSE
β”œβ”€β”€ README.md
β”œβ”€β”€ requests.http             # API request examples
β”œβ”€β”€ BackEnd/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ main.ts           # Entry point for NestJS application
β”‚   β”‚   β”œβ”€β”€ app.module.ts     # Main application module that imports other modules
β”‚   β”‚   β”œβ”€β”€ app.controller.ts # Root controller handling base routes
β”‚   β”‚   β”œβ”€β”€ app.service.ts    # Root service providing basic application functionality
β”‚   β”‚   └── products/
β”‚   β”‚       β”œβ”€β”€ product.module.ts
β”‚   β”‚       β”œβ”€β”€ product.controller.ts
β”‚   β”‚       β”œβ”€β”€ interfaces/
β”‚   β”‚       β”‚   └── IProductEntity.ts
β”‚   β”‚       β”œβ”€β”€ repositories/
β”‚   β”‚       β”‚   └── product.repository.ts
β”‚   β”‚       β”œβ”€β”€ schemas/
β”‚   β”‚       β”‚   └── product.schema.ts
β”‚   β”‚       └── services/
β”‚   β”‚           └── product.service.ts
β”‚   β”œβ”€β”€ nest-cli.json
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ tsconfig.json
β”‚   └── tsconfig.build.json
β”œβ”€β”€ FrontEnd/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app.tsx            # Main React application
β”‚   β”‚   β”œβ”€β”€ assets/
β”‚   β”‚   β”‚   └── svgs/          # SVG assets
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ home/          # Home page components
β”‚   β”‚   β”‚   β”œβ”€β”€ product/       # Product detail components
β”‚   β”‚   β”‚   β”œβ”€β”€ products/      # Products listing components
β”‚   β”‚   β”‚   └── utils/         # Shared UI components
β”‚   β”‚   β”œβ”€β”€ interfaces/
β”‚   β”‚   β”‚   └── IProductEntity.ts
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”‚   β”œβ”€β”€ home.page.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ product.page.tsx
β”‚   β”‚   β”‚   └── products.page.tsx
β”‚   β”‚   └── styles/            # CSS styles
β”‚   β”œβ”€β”€ public/
β”‚   β”‚   β”œβ”€β”€ fonts/             # Font files
β”‚   β”‚   β”œβ”€β”€ imgs/              # Image assets
β”‚   β”‚   └── svgs/              # Public SVG files
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ vite.config.ts
β”‚   └── tsconfig.json
└── docs/                      # Documentation
    β”œβ”€β”€ folders.png
    β”œβ”€β”€ home.png
    └── product.png

πŸš€ Getting Started

Prerequisites

  • Node.js (version 18 or later)
  • npm or yarn package manager
  • Git

Installation & Setup

  1. Clone the repository:

    git clone https://github.com/yourusername/monito-fullstack-ecommerce.git
    cd monito-fullstack-ecommerce
  2. Install Frontend Dependencies:

    cd FrontEnd
    npm install
  3. Install Backend Dependencies:

    cd ../BackEnd
    npm install

Running the Application

  • Start the Backend Server:

    cd BackEnd
    npm start

    The API will be available at http://localhost:3101/api.

  • Start the Frontend Development Server (open a new terminal):

    cd FrontEnd
    npm run dev

    The frontend will be available at http://localhost:5173.

Database Access

The application is pre-configured to connect to a MongoDB Atlas database with a read-only user. No additional database setup is necessary.

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

FullStack eCommerce project with React Frontend and Node.js Backend, with TypeScript, NestJS and MongoDB.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors