This document provides instructions for setting up and deploying a live demo of the DiscountMart e-commerce application.
# Clone or fork the repository
git clone https://github.com/yourusername/discountmart.git
cd discountmart
# Install dependencies
npm installFor demo purposes, you can use a free PostgreSQL database:
- Visit neon.tech
- Sign up for free account
- Create new project: "discountmart-demo"
- Copy connection string
- Set as DATABASE_URL environment variable
- Visit supabase.com
- Create new project: "discountmart-demo"
- Go to Settings → Database
- Copy connection string
- Set as DATABASE_URL environment variable
# Copy example environment file
cp .env.example .env
# Edit .env file with your database URL
DATABASE_URL=your_postgresql_connection_string_here
NODE_ENV=production
PORT=5000# Push database schema
npm run db:push
# This will create all necessary tables:
# - categories, products, cart_items, orders, order_items, newsletters# Start the application
npm run dev
# Application will be available at:
# http://localhost:5000# Install Vercel CLI
npm i -g vercel
# Deploy
vercel
# Follow prompts:
# - Link to existing project or create new
# - Set environment variables when prompted
# - Deploy- Connect GitHub repository to Railway
- Add DATABASE_URL environment variable
- Deploy automatically
- Connect GitHub repository to Render
- Set build command:
npm run build - Set start command:
npm run start - Add DATABASE_URL environment variable
- Deploy
-
Browse Products
- Visit homepage to see featured products
- Navigate through categories (Electronics, Clothing, etc.)
- Use search functionality
-
Shopping Cart
- Add items to cart (note set-based pricing)
- View cart with RWF currency conversion
- Update quantities
- Remove items
-
Checkout Process
- Enter customer information
- Review order with 18% tax
- Complete order (generates order ID)
-
Order Tracking
- Use order ID to track status
- View order details and items
-
Additional Features
- Add items to wishlist
- View recently browsed products
- Subscribe to newsletter
-
Order Management
- Visit
/admin/orders/manage - View all orders
- Update order statuses (pending → processing → shipped → delivered)
- Visit
-
Newsletter Management
- View subscriber list
- Monitor subscription growth
The application includes sample data for demonstration:
- Electronics: Wireless Headphones, Bluetooth Speaker, etc.
- Clothing: Blue Linen Shirt, Cotton T-Shirt, etc.
- Home & Garden: Ceramic Plate Set, Coffee Maker, etc.
- Sports: Yoga Mat, Dumbbells, etc.
- Books: Various titles
- Electronics
- Clothing
- Home & Garden
- Sports
- Books
- Order #1 with multiple items
- Various order statuses for demonstration
Update theme.json for custom colors:
{
"primary": "#3B82F6",
"variant": "professional",
"appearance": "light",
"radius": 0.5
}Replace generated-icon.png with your logo
Update store details in components for your location
The demo showcases:
- Fast Loading: < 2 seconds initial load
- Responsive Design: Works on mobile, tablet, desktop
- Real-time Updates: Cart and order status updates
- Database Performance: Optimized queries with indexing
- Monitor database usage (stay within free tier limits)
- Check application logs for errors
- Test core functionality weekly
- Update sample data as needed
- Database connection limits
- Storage usage
- Bandwidth limits
- Concurrent user limits
- Product browsing and search
- Cart functionality with RWF pricing
- Order placement and tracking
- Admin dashboard operations
- Newsletter subscriptions
- Responsive design on all devices
- Page load time < 3 seconds
- Database queries < 100ms
- No console errors
- Mobile-friendly interface
After deployment, your demo will be available at:
- Vercel:
https://discountmart-demo.vercel.app - Railway:
https://discountmart-demo.railway.app - Render:
https://discountmart-demo.onrender.com
/- Homepage with featured products/categories/electronics- Category browsing/products/wireless-headphones- Product details/checkout- Shopping cart and checkout/order-status- Order tracking/admin/orders/manage- Admin dashboard
For demo-related issues:
- Check deployment platform logs
- Verify database connectivity
- Test in different browsers
- Check mobile responsiveness
After successful demo deployment:
- Share demo URL with stakeholders
- Gather user feedback
- Monitor usage analytics
- Plan production deployment
- Implement additional features based on feedback
Live Demo Status: Ready for Deployment ✅