A full-stack e-commerce platform built with Vue.js, Express.js, PostgreSQL, and Stripe integration.
- 🛍️ Product browsing with advanced filtering and search
- 🛒 Shopping cart with real-time updates
- ❤️ Wishlist functionality
- 👤 User authentication and profile management
- 📦 Order tracking and history
- 💳 Secure payment processing with Stripe
- 🤖 AI-powered chatbot support
- 👔 Virtual try-on for wearable products
- 📊 Comprehensive dashboard with analytics
- 📦 Product management (CRUD operations)
- 📋 Inventory management with stock alerts
- 🔄 Order management and fulfillment
- 👥 User management
- 📈 Sales analytics and reporting
- Vue.js 3 - Composition API
- Vite - Build tool and dev server
- Pinia - State management
- Vue Router - Client-side routing
- Tailwind CSS - Styling
- Axios - HTTP client
- Express.js - Node.js framework
- PostgreSQL - Database
- JWT - Authentication
- Bcrypt - Password hashing
- Stripe - Payment processing
- Helmet - Security middleware
- CORS - Cross-origin resource sharing
- Node.js 18+ installed
- PostgreSQL database (automatically configured on Replit)
- Stripe account for payment processing
The following environment variables are required (managed through Replit Secrets):
# Stripe API Keys (get from https://dashboard.stripe.com/apikeys)
VITE_STRIPE_PUBLIC_KEY=pk_test_...
STRIPE_SECRET_KEY=sk_test_...
# JWT Secret (optional, defaults to a development key)
JWT_SECRET=your-secret-key- Install dependencies:
npm install-
The database will be automatically initialized on first run with:
- Database schema creation
- Sample categories
- Sample products
- Admin user (email: admin@shophub.com, password: admin123)
-
Start the development server:
npm run devThis will start both:
- Frontend on http://localhost:5000
- Backend API on http://localhost:3000
- Email: admin@shophub.com
- Password: admin123
Important: Change the admin password after first login!
POST /api/auth/register- Register new userPOST /api/auth/login- User loginGET /api/auth/profile- Get user profilePUT /api/auth/profile- Update profilePUT /api/auth/change-password- Change password
GET /api/products- Get all products (with filters)GET /api/products/:id- Get product by IDPOST /api/products- Create product (admin)PUT /api/products/:id- Update product (admin)DELETE /api/products/:id- Delete product (admin)
GET /api/categories- Get all categoriesGET /api/categories/:id- Get category by IDPOST /api/categories- Create category (admin)PUT /api/categories/:id- Update category (admin)
GET /api/cart- Get user cartPOST /api/cart- Add item to cartPUT /api/cart/:product_id- Update cart item quantityDELETE /api/cart/:product_id- Remove item from cartDELETE /api/cart- Clear cart
GET /api/wishlist- Get user wishlistPOST /api/wishlist- Add item to wishlistDELETE /api/wishlist/:product_id- Remove item from wishlistGET /api/wishlist/check/:product_id- Check if product is in wishlistDELETE /api/wishlist- Clear wishlist
POST /api/reviews- Create product reviewGET /api/reviews/product/:product_id- Get product reviewsGET /api/reviews/my-reviews- Get user's reviewsPUT /api/reviews/:id- Update reviewDELETE /api/reviews/:id- Delete review
POST /api/orders- Create orderGET /api/orders/my-orders- Get user ordersGET /api/orders/:id- Get order by IDGET /api/orders- Get all orders (admin)PUT /api/orders/:id/status- Update order status (admin)PUT /api/orders/:id/payment- Update payment status (admin)
POST /api/payment/create-payment-intent- Create Stripe payment intentGET /api/payment/payment-intent/:id- Get payment intent statusPOST /api/payment/refund- Create refund (admin)
GET /api/admin/dashboard/stats- Get dashboard statisticsGET /api/admin/dashboard/analytics- Get sales analyticsGET /api/admin/users- Get all usersPUT /api/admin/users/:id/status- Update user statusPUT /api/admin/users/:id/role- Update user role
├── src/ # Frontend Vue.js application
│ ├── components/ # Reusable Vue components
│ ├── views/ # Page components
│ ├── stores/ # Pinia state management
│ ├── router/ # Vue Router configuration
│ ├── config/ # Configuration files
│ └── layouts/ # Layout components
│
├── server/ # Backend Express.js application
│ ├── config/ # Database and configuration
│ ├── controllers/ # Route controllers
│ ├── middleware/ # Custom middleware
│ ├── models/ # Database models
│ ├── routes/ # API routes
│ └── utils/ # Utility functions
│
└── attached_assets/ # Static assets
- ✅ Password hashing with bcrypt
- ✅ JWT-based authentication
- ✅ Role-based access control
- ✅ SQL injection prevention
- ✅ Rate limiting
- ✅ CORS protection
- ✅ Helmet security headers
- ✅ Input validation
The application is configured for deployment on Replit with:
- Automatic database initialization
- Environment variable management
- Built-in PostgreSQL database
- Secure secrets management
For issues or questions, please contact support or check the documentation.
This project is proprietary and confidential.