Skip to content

vedantlahane/ShoeMarkNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ShoeMarkNet πŸ‘Ÿ

A modern, full-stack e-commerce platform for premium footwear with advanced features and beautiful UI

License: MIT Node.js React Express MongoDB Vite

🌟 Overview

ShoeMarkNet is a comprehensive e-commerce platform designed specifically for footwear retail. Built with modern technologies and featuring a sleek, responsive design, it provides both customers and administrators with an exceptional experience.

✨ Key Features

  • 🎨 Modern UI/UX: Beautiful gradient designs with glass-morphism effects
  • πŸ“± Fully Responsive: Optimized for all devices and screen sizes
  • πŸ” Advanced Authentication: Secure JWT-based user authentication
  • πŸ›’ Shopping Cart: Persistent cart with real-time updates
  • ❀️ Wishlist System: Save favorite products for later
  • πŸ“Š Admin Dashboard: Comprehensive analytics and management tools
  • πŸ” Smart Search: Advanced product search with filters
  • ⭐ Review System: Customer reviews and ratings
  • πŸ“ˆ Lead Scoring: AI-powered customer behavior analysis
  • 🎯 Campaign Management: Marketing campaigns and promotions
  • πŸ“¦ Order Management: Complete order lifecycle tracking
  • πŸ“¬ Contact Center: Unified inbox with SLA tracking for customer inquiries
  • πŸŒ™ Dark Mode: Beautiful dark theme support

πŸ—οΈ Technology Stack

Frontend

  • React 19 - Modern component-based UI library
  • Redux Toolkit - State management
  • React Router Dom v7 - Client-side routing
  • Tailwind CSS v4 - Utility-first CSS framework
  • Vite 7 - Next-generation build tool and development server
  • Axios - HTTP client for API calls
  • TanStack Query - Server state management
  • React Hot Toast - Beautiful notifications
  • Framer Motion - Animation library
  • Chart.js - Data visualization
  • Lucide React & Heroicons - Icon libraries
  • React Intersection Observer - Intersection detection
  • date-fns - Date utility library

Backend

  • Node.js - JavaScript runtime
  • Express.js v5 - Web application framework
  • MongoDB - NoSQL database
  • Mongoose v8 - MongoDB object modeling
  • JWT - JSON Web Tokens for authentication
  • Bcrypt - Password hashing
  • Nodemailer - Email sending
  • Express Rate Limit - API rate limiting
  • Express Validator - Input validation
  • Helmet - Security middleware
  • UUID - Unique identifier generation
  • Slugify - URL-friendly string generation
  • Compression - Response compression
  • Morgan - HTTP request logger

Development Tools

  • ESLint v9 - Code linting with modern flat config
  • Vite 7 - Next-generation build tool with HMR
  • Tailwind CSS v4 - Latest utility-first CSS framework
  • Nodemon - Development server auto-restart
  • TanStack Query DevTools - Query debugging

πŸš€ Quick Start

Prerequisites

  • Node.js (v20 or higher)
  • MongoDB (v8 or higher)
  • npm or yarn package manager

Installation

  1. Clone the repository
git clone https://github.com/vedantlahane/ShoeMarkNet.git
cd ShoeMarkNet
  1. Backend Setup
cd backend
npm install

# Create environment file
cp .env.example .env
# Configure your environment variables in .env
  1. Frontend Setup
cd ../frontend
npm install

# Create environment file
cp .env.example .env
# Configure your environment variables in .env
  1. Environment Variables

Backend .env:

NODE_ENV=development
PORT=5000
MONGODB_URI=mongodb://localhost:27017/shoemarknet
JWT_SECRET=your_jwt_secret_key
REFRESH_TOKEN_SECRET=your_refresh_token_secret
JWT_EXPIRE=30d
REFRESH_TOKEN_EXPIRE=7d

# Email Configuration (SMTP)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email@gmail.com
SMTP_PASSWORD=your_app_password
FROM_NAME=ShoeMarkNet
FROM_EMAIL=noreply@shoemarknet.com

# Optional: Realtime metrics interval (milliseconds)
REALTIME_METRICS_INTERVAL=15000

Frontend .env:

VITE_API_URL=http://localhost:5000/api
VITE_API_TIMEOUT=15000

# Optional: WebSocket configuration for real-time features
# VITE_WS_BASE_URL=ws://localhost:5000
# VITE_WS_ENABLED=true

# Optional: Analytics and tracking
# VITE_GA_MEASUREMENT_ID=your_google_analytics_id
# VITE_MIXPANEL_TOKEN=your_mixpanel_token
  1. Start Development Servers

Backend:

cd backend
npm run dev

Frontend (in new terminal):

cd frontend
npm run dev

Seed Default Accounts

Need ready-to-use credentials for testing? Run the backend seeding script after configuring your .env:

cd backend
npm run seed:accounts

This command creates or updates two accounts:

  • Admin β€” admin@shoemarknet.test / Admin@123!
  • User β€” user@shoemarknet.test / User@123!

The script is idempotent: rerunning it refreshes the passwords without duplicating users.

Seed Sample Catalog, Coupons & Promotions

Want products, coupons, and promotions ready to demo? Run the sample data seeder after default accounts:

cd backend
npm run seed:sample

This populates featured categories, products, a WELCOME10 coupon, a public promotion banner, and a few admin notifications.

  1. Access the Application

πŸ“ Project Structure

ShoeMarkNet/
β”œβ”€β”€ backend/                    # Backend API server
β”‚   β”œβ”€β”€ controllers/           # Route controllers (15 controllers)
β”‚   β”œβ”€β”€ models/                # Database models (16 models)
β”‚   β”œβ”€β”€ routes/                # API routes (14 route files)
β”‚   β”œβ”€β”€ middleware/            # Custom middleware (auth, error, rate limit, validation)
β”‚   β”œβ”€β”€ services/              # Business logic services
β”‚   β”œβ”€β”€ utils/                 # Utility functions (API response, database, file upload, etc.)
β”‚   β”œβ”€β”€ scripts/               # Database seeding scripts
β”‚   β”œβ”€β”€ docs/                  # API documentation
β”‚   └── public/                # Static files
β”œβ”€β”€ frontend/                   # React frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ admin/            # Admin dashboard components
β”‚   β”‚   β”œβ”€β”€ components/       # Reusable UI components (organized by feature)
β”‚   β”‚   β”œβ”€β”€ pages/            # Page components
β”‚   β”‚   β”œβ”€β”€ redux/            # Redux store & slices
β”‚   β”‚   β”œβ”€β”€ services/         # API service functions
β”‚   β”‚   β”œβ”€β”€ hooks/            # Custom React hooks
β”‚   β”‚   β”œβ”€β”€ routes/           # Route configurations
β”‚   β”‚   β”œβ”€β”€ lib/              # Library configurations
β”‚   β”‚   β”œβ”€β”€ utils/            # Utility functions
β”‚   β”‚   └── assets/           # Static assets
β”‚   └── public/               # Public static files
└── README.md                  # Project documentation

🎯 Features Deep Dive

User Features

  • Authentication: Secure login/register with JWT tokens, password reset, email verification
  • Product Browsing: Browse products with advanced filtering (category, brand, price, gender, etc.)
  • Shopping Cart: Add/remove items with quantity management and persistence
  • Wishlist: Save favorite products for later
  • Checkout Process: Complete checkout flow with billing, shipping, and payment forms
  • Order Management: Track order status and history with detailed order views
  • User Profile: Manage personal information, addresses, and preferences
  • Product Reviews: Leave product reviews and ratings
  • Search Functionality: Advanced product search with filters
  • Contact Support: Submit support tickets with file attachments
  • Responsive Design: Mobile-first design that works on all devices

Admin Features

  • Dashboard Analytics: Comprehensive sales, revenue, and user metrics with charts
  • Product Management: Full CRUD operations for products with image uploads
  • Order Management: Process and track orders with status updates
  • User Management: View and manage customer accounts
  • Category Management: Organize products with categories
  • Campaign Management: Create and manage promotional campaigns
  • Coupon System: Create and monitor discount codes with usage limits
  • Lead Scoring: Track customer engagement and behavior metrics
  • Contact Center: Triage, assign, and close customer support tickets with SLA tracking
  • Notification Center: Manage operational alerts and notifications
  • Realtime Dashboard: Live statistics with auto-refresh capabilities
  • Settings Panel: Configure application settings
  • Analytics Panel: Detailed analytics and reporting

Technical Features

  • Responsive Design: Mobile-first approach
  • API Rate Limiting: Prevent abuse and ensure stability
  • Error Handling: Comprehensive error management
  • Data Validation: Input validation on both frontend and backend
  • Security: CORS, Helmet, and input sanitization
  • Performance: Image optimization and lazy loading
  • SEO Friendly: Meta tags and semantic HTML
  • Service Desk Ready: API endpoints for contact submissions, status updates, and analytics

πŸ› οΈ API Endpoints

Authentication

  • POST /api/auth/register - User registration
  • POST /api/auth/login - User login
  • POST /api/auth/logout - User logout
  • POST /api/auth/forgot-password - Request password reset
  • POST /api/auth/reset-password/:token - Reset password with token
  • GET /api/auth/verify-email/:token - Verify email address
  • POST /api/auth/refresh-token - Refresh access token
  • GET /api/auth/profile - Get user profile
  • PUT /api/auth/profile - Update user profile

Products

  • GET /api/products - Get all products (with filters)
  • GET /api/products/:id - Get product by ID
  • POST /api/products - Create product (Admin)
  • PUT /api/products/:id - Update product (Admin)
  • DELETE /api/products/:id - Delete product (Admin)

Categories

  • GET /api/categories - Get all categories
  • GET /api/categories/:id - Get category by ID
  • POST /api/categories - Create category (Admin)
  • PUT /api/categories/:id - Update category (Admin)
  • DELETE /api/categories/:id - Delete category (Admin)

Orders

  • GET /api/orders - Get user orders
  • POST /api/orders - Create new order
  • GET /api/orders/:id - Get order by ID
  • PUT /api/orders/:id - Update order status (Admin)

Cart & Wishlist

  • GET /api/cart - Get user cart
  • POST /api/cart - Add item to cart
  • PUT /api/cart/:itemId - Update cart item
  • DELETE /api/cart/:itemId - Remove item from cart
  • GET /api/wishlist - Get user wishlist
  • POST /api/wishlist - Add item to wishlist
  • DELETE /api/wishlist/:productId - Remove item from wishlist

Reviews

  • GET /api/reviews/:productId - Get product reviews
  • POST /api/reviews - Create review
  • PUT /api/reviews/:id - Update review
  • DELETE /api/reviews/:id - Delete review

Contact Center

  • POST /api/contact - Submit a support request (public)
  • GET /api/admin/contacts - List contact tickets with filters (Admin)
  • GET /api/admin/contacts/:id - View a specific ticket (Admin)
  • PATCH /api/admin/contacts/:id/status - Update ticket status or assignment (Admin)
  • POST /api/admin/contacts/:id/respond - Record responses and timeline events (Admin)
  • DELETE /api/admin/contacts/:id - Remove a ticket (Admin)
  • GET /api/admin/contacts/stats - Retrieve SLA and workload analytics (Admin)

Admin Dashboard

  • GET /api/admin/dashboard/stats - Get dashboard statistics
  • GET /api/admin/users - Get all users
  • GET /api/admin/orders - Get all orders
  • GET /api/admin/products - Get all products for admin
  • GET /api/admin/campaigns - Get marketing campaigns
  • POST /api/admin/campaigns - Create campaign
  • GET /api/admin/coupons - Get discount coupons
  • POST /api/admin/coupons - Create coupon

πŸ”§ Environment Setup

Database Setup

  1. Install MongoDB locally or use MongoDB Atlas
  2. Create a new database named shoemarknet
  3. Update the MONGODB_URI in your backend .env file

Email Configuration

Configure email settings in your backend .env file for:

  • User registration confirmation
  • Password reset functionality
  • Order confirmation emails

πŸš€ Deployment

Backend Deployment (Heroku/Railway)

  1. Set up production environment variables
  2. Configure MongoDB Atlas connection
  3. Deploy using Git or Docker

Frontend Deployment (Vercel/Netlify)

  1. Build the production bundle: npm run build
  2. Deploy the dist folder
  3. Configure environment variables

🀝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/new-feature
  3. Commit changes: git commit -am 'Add new feature'
  4. Push to branch: git push origin feature/new-feature
  5. Submit a pull request

Development Guidelines

  • Follow the existing code style
  • Write descriptive commit messages
  • Add tests for new features
  • Update documentation as needed

πŸ“ License

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

πŸ‘¨β€πŸ’» Author

Vedant Lahane

Last updated: December 2025

πŸ™ Acknowledgments

  • React.js community for excellent documentation
  • Tailwind CSS for the amazing utility framework
  • MongoDB team for the robust database solution
  • All contributors who helped improve this project

πŸ“š Documentation

For detailed documentation, please visit:

Additional documentation files are available in the respective directories.

πŸ› Support & Issues

Common Issues & Solutions

CORS Errors: Ensure your frontend URL is added to the allowed origins in backend/app.js

Database Connection: Verify your MongoDB URI is correct and the database is running

Environment Variables: Double-check all required environment variables are set

Port Conflicts: Make sure ports 5000 and 5173 are available

Noisy Vite Dev Logs: The frontend development server now filters repetitive [vite] HMR connection messages. If you need the original verbosity, remove or adjust the noisyLogPatterns array in frontend/vite.config.js.

WebSocket Console Errors: Real-time dashboard updates are disabled unless VITE_WS_BASE_URL is set. Configure the variable (and optionally VITE_WS_ENABLED=true) once a WebSocket backend is available to avoid repeated connection warnings during development.

If you encounter any issues or have questions:

  1. Check the Issues page
  2. Create a new issue with detailed description
  3. Contact the maintainers

πŸ“ˆ Roadmap

βœ… Completed Features

  • Complete e-commerce platform with user and admin functionality
  • Advanced authentication with email verification and password reset
  • Comprehensive product catalog with categories and reviews
  • Shopping cart and wishlist functionality
  • Full checkout process with order management
  • Admin dashboard with analytics and management tools
  • Contact center with ticket management
  • Real-time features and notifications
  • Responsive design with dark mode support
  • API documentation and comprehensive testing

🚧 In Progress

  • Payment gateway integration (Stripe, PayPal, Razorpay)
  • Real-time chat support system
  • Advanced inventory management
  • Multi-language support (i18n)

πŸ“‹ Planned Features

  • Mobile application (React Native)
  • Advanced analytics and reporting
  • Social media integration
  • AI-powered product recommendations
  • Loyalty program and rewards system
  • Advanced search with AI-powered suggestions
  • Email marketing campaigns
  • Integration with shipping providers
  • Product comparison feature
  • Wishlist sharing functionality

Made with ❀️ by Vedant Lahane

⭐ Star this repo if you found it helpful!

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •