Skip to content

bisu39/Project-SS

Repository files navigation

Project-SS

An e-commerce application built with Node.js and Express, featuring product listings, shopping cart, user authentication, and admin management.

Project Structure

project-ss/
├── app.js                      # Main Express application entry point
├── errorConstants.js           # Error message constants
├── package.json                # Project dependencies and scripts
│
├── config/                     # Configuration files
│   ├── cloudinary.js          # Cloudinary image upload configuration
│   └── dbConnection.js        # Database connection setup
│
├── controllers/                # Business logic controllers
│   ├── adminController.js     # Admin panel operations
│   ├── productController.js   # Product CRUD operations
│   ├── reviewController.js    # Product review management
│   └── userController.js      # User authentication and profile
│
├── middleware/                 # Express middleware
│   ├── errorHandler.js        # Global error handling
│   ├── isAdminLoggedIn.js     # Admin authentication check
│   └── isLoggedIn.js          # User authentication check
│
├── models/                     # Database models (MongoDB/Mongoose)
│   ├── adminModel.js          # Admin user schema
│   ├── productModel.js        # Product schema
│   ├── reviewModel.js         # Review schema
│   └── userModel.js           # User schema
│
├── routes/                     # API route definitions
│   ├── adminPanelRoute.js     # Admin panel routes
│   ├── homeRoute.js           # Homepage routes
│   ├── productRoute.js        # Product routes
│   └── userRoute.js           # User authentication routes
│
├── views/                      # EJS templates
│   ├── home.ejs               # Homepage template
│   ├── listing.ejs            # Product listing page
│   ├── productDetails.ejs     # Product detail page
│   ├── buyPage.ejs            # Purchase/order page
│   ├── cart.ejs               # Shopping cart
│   ├── profile.ejs            # User profile
│   ├── userLoginForm.ejs      # User login form
│   ├── userSingupForm.ejs     # User signup form
│   ├── adminPanelLogin.ejs    # Admin login page
│   └── partials/              # Reusable template components
│       ├── head.ejs           # HTML head section
│       ├── navBar.ejs         # Navigation bar
│       └── footer.ejs         # Footer component
│
├── public/                     # Static assets
│   ├── css/                   # Stylesheets
│   │   ├── custom.css
│   │   ├── home.css
│   │   ├── listing.css
│   │   ├── productDetails.css
│   │   ├── buyPage.css
│   │   ├── cart.css
│   │   ├── profile.css
│   │   ├── userLoginForm.css
│   │   ├── userSingupForm.css
│   │   ├── adminPanelLogin.css
│   │   ├── input.css
│   │   └── notifier.css
│   ├── js/                    # Client-side scripts
│   │   ├── slider.js
│   │   ├── imageSelector.js
│   │   ├── imageToggler.js
│   │   ├── passwordShower.js
│   │   ├── btnEnabler.js
│   │   └── notifyCloser.js
│   └── assets/                # Images and media
│       ├── images/
│       └── favicons/

Getting Started

Prerequisites

  • Node.js (v14 or higher)
  • MongoDB
  • Cloudinary account (for image uploads)

Installation

  1. Clone the repository:
git clone https://github.com/bisu39/Project-SS.git
cd project-ss
  1. Install dependencies:
npm install
  1. Configure environment variables in a .env file

  2. Start the application:

npm start

Features

  • User Authentication: Sign up, login, and profile management
  • Product Management: Browse and view detailed product information
  • Shopping Cart: Add/remove items and manage cart
  • Reviews: Leave and view product reviews
  • Admin Panel: Manage products, users, and orders
  • Image Upload: Cloudinary integration for product images
  • Responsive Design: Mobile-friendly UI with EJS templating

Tech Stack

  • Backend: Node.js, Express.js
  • Database: MongoDB
  • Templating: EJS
  • Image Storage: Cloudinary
  • Frontend: HTML, CSS, JavaScript

Contributing

We welcome contributions from the community! To contribute to Project-SS, please follow these steps:

  1. Fork the repository on GitHub
  2. Clone your forked repository locally:
    git clone https://github.com/bisu39/Project-SS.git
  3. Create a new branch for your feature or bug fix:
    git checkout -b feature/your-feature-name
  4. Make your changes and test thoroughly
  5. Commit your changes with clear, descriptive messages:
    git commit -m "Add: description of your changes"
  6. Push to your fork:
    git push origin feature/your-feature-name
  7. Submit a Pull Request with a detailed description of your changes

Code Style Guidelines

  • Follow consistent naming conventions
  • Write meaningful commit messages
  • Add comments for complex logic
  • Test your code before submitting a PR
  • Update documentation as needed

License

This project is licensed under the MIT License.

You are free to:

  • Use this project for personal or commercial purposes
  • Modify the source code
  • Distribute the software

Under the condition that:

  • The above copyright notice and this license notice are included in all copies or substantial portions of the software

About

A full-stack Node.js e-commerce application for sports products, featuring secure authentication, product management, and a streamlined shopping experience.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors