A comprehensive SaaS e-commerce platform for 24julex, a fast-fashion jewelry brand based in Salem, Tamil Nadu. This platform serves both B2C customers and B2B resellers with a hybrid architecture featuring role-based access control, dual pricing, and modern Gen-Z aesthetics.
- Frontend: Next.js 15 with TypeScript, Tailwind CSS 4, shadcn/ui
- Backend: Node.js with Express.js, TypeScript
- Database: SQLite with Prisma ORM (easily migratable to PostgreSQL)
- Authentication: JWT with Role-Based Access Control (RBAC)
- Payment: Razorpay Integration
- Communication: WhatsApp Business API Integration
- State Management: Zustand for client state
- π¨ Gen-Z Aesthetic: Modern, golden-finish design with neon accents
- π Dual Interface: Separate experiences for B2C and B2B users
- π° Dynamic Pricing: Different pricing based on user role (customer vs reseller)
- π‘οΈ Anti-Tarnish & Waterproof: Product attributes for jewelry specifications
- π± WhatsApp Integration: Direct ordering and customer support
- π³ Razorpay Payments: Secure payment processing
- π Reseller Dashboard: Analytics and order management for B2B users
24julex/
βββ src/
β βββ app/ # Next.js App Router
β β βββ api/ # API Routes
β β β βββ auth/ # Authentication endpoints
β β β βββ products/ # Product management
β β β βββ orders/ # Order processing
β β β βββ cart/ # Shopping cart
β β β βββ payments/ # Razorpay integration
β β β βββ placeholder/ # Image placeholder service
β β βββ login/ # Login page
β β βββ register/ # Registration page
β β βββ reseller/ # B2B reseller portal
β β βββ layout.tsx # Root layout
β β βββ page.tsx # Homepage
β βββ components/ # React components
β β βββ ui/ # shadcn/ui components
β β βββ Navbar.tsx # Navigation bar
β β βββ ProductCard.tsx # Product display card
β β βββ ProductGrid.tsx # Product listing with filters
β β βββ RazorpayPayment.tsx # Payment component
β βββ lib/ # Utility libraries
β βββ db.ts # Database client
β βββ auth.ts # Authentication utilities
β βββ store.ts # Zustand stores
β βββ whatsapp.ts # WhatsApp integration
βββ prisma/
β βββ schema.prisma # Database schema
βββ public/ # Static assets
βββ package.json # Dependencies
- Node.js 18+
- Bun package manager
- Git
-
Clone the repository
git clone <repository-url> cd 24julex
-
Install dependencies
bun install
-
Set up environment variables
cp .env.example .env
Configure the following variables:
DATABASE_URL="file:./dev.db" JWT_SECRET="your-super-secret-jwt-key" RAZORPAY_KEY_ID="rzp_test_your_key_id" RAZORPAY_KEY_SECRET="your_razorpay_secret" NEXT_PUBLIC_RAZORPAY_KEY_ID="rzp_test_your_key_id"
-
Initialize database
bun run db:push bun run db:generate
-
Start development server
bun run dev
The application will be available at http://localhost:3000.
- User: Basic user information with role (customer/reseller/admin)
- Reseller: Extended profile for B2B users with GST and business details
- Category: Product categorization
- Product: Jewelry items with anti-tarnish, waterproof attributes, dual pricing
- Order: Orders with B2C/B2B type differentiation
- OrderItem: Line items within orders
- CartItem: Shopping cart management
- WishlistItem: Product wishlist functionality
- Role-Based Access: Customer, Reseller, Admin roles
- Dual Pricing:
priceB2cfor retail,priceB2bfor wholesale - Product Attributes:
isAntiTarnish,isWaterproof,material,weight - Order Types: Automatic B2C/B2B classification based on user role
- Primary: Golden finish (
#FACC15to#EAB308) - Background: Clean white (
#FFFFFF) - Text: Deep black (
#0F0F0F) - Accent: Neon pink (
#FF10F0) for Gen-Z appeal - Secondary: Holographic silver tones
- Display: Poppins (headings, bold statements)
- Body: Inter (readable text, UI elements)
- Cards: Rounded corners, golden shadows on hover
- Buttons: Gradient backgrounds, bold typography
- Badges: Feature highlights (Anti-Tarnish, Waterproof)
- Responsive: Mobile-first design approach
- Customer: Standard B2C shopping experience
- Reseller: B2B wholesale access with special pricing
- Admin: Full platform management (to be implemented)
- User registers/logs in via
/api/auth/registeror/api/auth/login - Server returns JWT token with user role
- Client stores token and includes in API requests
- Middleware verifies token and extracts user context
/reseller- Only accessible to verified resellers- API endpoints require
Authorization: Bearer <token>header
- Create Razorpay account and get API keys
- Configure environment variables
- Payment flow:
- Create order via
/api/payments/create-order - Initialize Razorpay checkout
- Verify payment via
/api/payments/verify - Update order status in database
- Create order via
- Secure payment processing
- Automatic order status updates
- Error handling and retry mechanisms
- Mobile-optimized checkout experience
- Product Inquiries: Pre-filled messages for specific products
- Order Confirmation: Automatic order details sharing
- Bulk Inquiries: Reseller bulk ordering via WhatsApp
- Customer Support: Direct support channel
- WhatsApp Business API integration
- Pre-formatted message templates
- Product URL sharing
- Customer information pre-filling
- Standard shopping cart and checkout
- Product browsing with filters
- Wishlist functionality
- Order tracking
- Wholesale pricing display
- Bulk ordering capabilities
- Order history and analytics
- Business information management
- Credit limit logic (framework ready)
- Anti-tarnish and waterproof attributes
- Material and weight specifications
- Image management
- Stock tracking
- Category organization
- Optimized for mobile devices (Gen-Z primary usage)
- Touch-friendly interface elements
- Progressive enhancement for desktop
- Consistent experience across devices
- Mobile: Default styles
- Tablet:
sm:(640px+) - Desktop:
md:(768px+) - Large:
lg:(1024px+) - Extra Large:
xl:(1280px+)
- TypeScript for type safety
- ESLint for code consistency
- Component-based architecture
- Proper error handling
- Loading states and user feedback
- RESTful design principles
- Consistent response formats
- Proper HTTP status codes
- JWT authentication
- Input validation
- Zustand for client-side state
- Server state via API calls
- Persistent auth state
- Shopping cart persistence
- Production Database: Configure PostgreSQL connection
- Environment Variables: Set all production secrets
- Build: Run
bun run build - Start: Run
bun run start
- Database migrations for schema updates
- SSL certificates for secure payments
- CDN for static assets
- Monitoring and logging setup
- Create feature branch from main
- Implement changes with proper testing
- Run
bun run lintfor code quality - Test all user flows
- Submit pull request with detailed description
- Follow existing code patterns
- Use TypeScript strictly
- Implement proper error boundaries
- Add loading states for async operations
- Maintain responsive design principles
- Admin dashboard for platform management
- Advanced analytics and reporting
- Email marketing integration
- Social media sharing features
- Product recommendation engine
- Multi-currency support
- Advanced inventory management
- Customer reviews and ratings
- PostgreSQL migration
- Redis caching layer
- Advanced search with Elasticsearch
- Image optimization CDN
- Progressive Web App (PWA) features
For technical support or questions:
- WhatsApp: +91 9876543210
- Email: [email protected]
- Documentation: Check inline code comments
Built with β€οΈ in Salem, Tamil Nadu for the modern Gen-Z jewelry enthusiast.