An e-commerce application built with Node.js and Express, featuring product listings, shopping cart, user authentication, and admin management.
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/
- Node.js (v14 or higher)
- MongoDB
- Cloudinary account (for image uploads)
- Clone the repository:
git clone https://github.com/bisu39/Project-SS.git
cd project-ss- Install dependencies:
npm install-
Configure environment variables in a
.envfile -
Start the application:
npm start- 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
- Backend: Node.js, Express.js
- Database: MongoDB
- Templating: EJS
- Image Storage: Cloudinary
- Frontend: HTML, CSS, JavaScript
We welcome contributions from the community! To contribute to Project-SS, please follow these steps:
- Fork the repository on GitHub
- Clone your forked repository locally:
git clone https://github.com/bisu39/Project-SS.git
- Create a new branch for your feature or bug fix:
git checkout -b feature/your-feature-name
- Make your changes and test thoroughly
- Commit your changes with clear, descriptive messages:
git commit -m "Add: description of your changes" - Push to your fork:
git push origin feature/your-feature-name
- Submit a Pull Request with a detailed description of your changes
- Follow consistent naming conventions
- Write meaningful commit messages
- Add comments for complex logic
- Test your code before submitting a PR
- Update documentation as needed
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