Skip to content

DigitalRavagers/Iris-co

Repository files navigation

IRIS & CO. - E-Commerce Platform

Effortless Elegance - Premium adjustable kaftans for the modern woman

Status Version Platform


🌐 Live URLs


📋 Table of Contents


🎯 Project Overview

IRIS & CO. is a global e-commerce platform specializing in premium, adjustable kaftans. Positioned as "The Fourth Cultural Option" alongside traditional attire, the brand targets modern women across:

  • 🇺🇸 United States
  • 🇬🇧 United Kingdom
  • 🇦🇪 UAE & Middle East
  • 🇧🇷 Brazil
  • 🇮🇳 India
  • 🌍 Other global markets

Brand Identity

  • Colors: Fuchsia (#FF1493) + Sea Green (#2E8B57)
  • Tagline: "Effortless Elegance"
  • USP: Adjustable kaftans - One dress, multiple moods
  • Philosophy: Body-positive, globally-positioned, versatile fashion

✅ Features Completed

🛒 E-Commerce Core

  • 15 Premium Products across 3 collections
    • Festival Fusion (Rich, Embellished)
    • Resort Elegance (Breezy, Vacation)
    • Urban Chic (Minimalist, Sophisticated)
  • Product Catalog with filtering by collection, price, features
  • Shopping Cart with session management
  • Checkout Flow with address capture
  • Order Management with tracking numbers

💳 Payment Integration

  • Stripe (primary for US, UK, EU, Brazil)
  • Razorpay (India, UAE, Middle East)
  • Multi-Currency Support (USD, EUR, GBP, AED, INR, BRL, CAD, AUD)
  • Auto-detection based on shipping country

🚚 Shipping & Fulfillment

  • 5 Global Shipping Zones
    • North America
    • Europe
    • Middle East
    • Asia Pacific
    • South America
  • Dynamic Shipping Calculation
  • Free Shipping Thresholds by region

📊 Database & API

  • Cloudflare D1 (SQLite) production database
  • RESTful API endpoints for all operations
  • Full CRUD for products, orders, cart, reviews
  • Type-Safe with TypeScript interfaces

🎨 SEO/AEO/GEO Optimization

  • Structured Data (Product, Organization, Breadcrumb schemas)
  • Meta Tags (Open Graph, Twitter Cards)
  • Sitemap auto-generation
  • Robots.txt configuration
  • Semantic HTML5 structure

🔐 Security & Validation

  • JWT-ready authentication structure
  • CORS configuration
  • Input validation with Zod (prepared)
  • Payment verification hooks

🛠️ Technology Stack

Backend

  • Framework: Hono (lightweight, fast)
  • Runtime: Cloudflare Workers
  • Database: Cloudflare D1 (globally distributed SQLite)
  • Language: TypeScript

Frontend

  • Styling: TailwindCSS (CDN)
  • Icons: Font Awesome
  • HTTP Client: Axios

Infrastructure

  • Platform: Cloudflare Pages
  • CDN: Cloudflare global network
  • DNS: Cloudflare
  • SSL: Automatic (Cloudflare)

Development Tools

  • Package Manager: npm
  • Build Tool: Vite
  • Process Manager: PM2 (sandbox)
  • Version Control: Git

🗄️ Data Architecture

Core Tables

Products

- id, sku, name, slug, description
- price, compare_at_price, currency
- collection (festival-fusion, resort-elegance, urban-chic)
- fabric, care_instructions
- adjustable, belt_included
- stock_quantity, is_featured, is_bestseller, is_new_arrival

Product Images

- id, product_id, url, alt_text
- is_primary, sort_order

Orders

- id, order_number, guest_email
- status (pending, processing, shipped, delivered)
- payment_status, payment_method, payment_intent_id
- subtotal, shipping_cost, tax, discount, total
- shipping_address_json, billing_address_json

Cart

- id, session_id, product_id, variant_id
- quantity

Reviews

- id, product_id, rating, title, comment
- reviewer_name, verified_purchase

Shipping Zones

- id, name, countries (JSON)
- base_rate, per_kg_rate, free_shipping_threshold
- estimated_days_min, estimated_days_max

🚀 API Documentation

Base URL

Development: http://localhost:3000
Sandbox: https://3000-i2wv8aoofg0b9rhsirrak-cc2fbc16.sandbox.novita.ai
Production: https://your-domain.com

Product Endpoints

Get All Products

GET /api/products
Query Params:
  - collection: string (festival-fusion, resort-elegance, urban-chic)
  - featured: boolean
  - bestseller: boolean
  - new: boolean
  - search: string

Response: {
  success: true,
  data: Product[]
}

Get Single Product

GET /api/products/:slug

Response: {
  success: true,
  data: {
    product: Product,
    reviews: Review[]
  }
}

Cart Endpoints

Get Cart

GET /api/cart/:sessionId

Response: {
  success: true,
  data: CartItemWithProduct[]
}

Add to Cart

POST /api/cart
Body: {
  sessionId: string,
  productId: number,
  variantId?: number,
  quantity: number
}

Update Cart Item

PUT /api/cart/:itemId
Body: {
  quantity: number
}

Remove from Cart

DELETE /api/cart/:itemId

Order Endpoints

Create Order

POST /api/orders
Body: {
  sessionId: string,
  customer_email: string,
  shipping_address: Address,
  billing_address: Address,
  discount_code?: string
}

Response: {
  success: true,
  data: {
    order_id: number,
    order_number: string,
    total: number,
    currency: string
  }
}

Get Order

GET /api/orders/:orderNumber

Response: {
  success: true,
  data: {
    order: Order,
    items: OrderItem[]
  }
}

Payment Endpoints

Create Payment Intent

POST /api/payment/create-intent
Body: {
  order_id: number,
  payment_method: 'stripe' | 'razorpay'
}

Response: {
  success: true,
  data: {
    client_secret: string,
    payment_intent_id: string
  }
}

Confirm Payment

POST /api/payment/confirm
Body: {
  order_id: number,
  payment_intent_id: string,
  payment_method: string
}

Shipping Endpoints

Get Shipping Cost

GET /api/shipping/:country?total=100

Response: {
  success: true,
  data: {
    cost: number,
    free_threshold: number,
    estimated_days: string
  }
}

🚀 Getting Started

Prerequisites

  • Node.js 18+
  • npm
  • Wrangler CLI (Cloudflare)
  • PM2 (for local dev)

Installation

# Clone repository
git clone <repository-url>
cd webapp

# Install dependencies
npm install

# Initialize database
npm run db:migrate:local
npm run db:seed

# Build project
npm run build

# Start development server
npm run dev:d1
# or with PM2
pm2 start ecosystem.config.cjs

Environment Variables

Create .dev.vars file:

STRIPE_SECRET_KEY=sk_test_your_key
RAZORPAY_KEY_ID=rzp_test_your_key
RAZORPAY_KEY_SECRET=your_secret

🌐 Deployment

Cloudflare Pages Deployment

  1. Setup Cloudflare API Key
# Setup authentication (REQUIRED)
setup_cloudflare_api_key

# Verify
npx wrangler whoami
  1. Create Production Database
# Create D1 database
npx wrangler d1 create webapp-production

# Copy database_id to wrangler.jsonc
# Update the "database_id" field
  1. Apply Migrations
# Production database
npm run db:migrate:prod
  1. Create Cloudflare Pages Project
npx wrangler pages project create iris-co \
  --production-branch main \
  --compatibility-date 2025-10-19
  1. Deploy
npm run deploy:prod
  1. Set Environment Variables
npx wrangler pages secret put STRIPE_SECRET_KEY --project-name iris-co
npx wrangler pages secret put RAZORPAY_KEY_ID --project-name iris-co
npx wrangler pages secret put RAZORPAY_KEY_SECRET --project-name iris-co

📈 Next Steps

Immediate (Week 1-2)

  • Build complete product detail pages
  • Create shopping cart UI
  • Build checkout flow UI
  • Integrate Stripe Elements
  • Add product image galleries
  • Build size guide modal
  • Create customer account pages

Short-term (Week 3-4)

  • Admin Dashboard
    • Product management (CRUD)
    • Order management
    • Inventory tracking
    • Analytics dashboard
  • Email notifications (order confirmations)
  • Mobile responsive refinement
  • Performance optimization

Medium-term (Month 2)

  • Customer reviews system
  • Wishlist functionality
  • Related products recommendations
  • Advanced filtering
  • Search functionality with Algolia
  • Blog/content marketing

Long-term (Month 3+)

  • AI-powered size recommendations
  • Virtual try-on
  • Loyalty program
  • Multi-language support
  • Advanced analytics
  • Marketing automation

📊 Current Product Catalog

15 Premium Kaftans Across 3 Collections:

Festival Fusion (5 products)

  1. Emerald Empire Kaftan - $149
  2. Fuchsia Dream Kaftan - $145
  3. Burgundy Royale Kaftan - $155
  4. Royal Fuchsia Evening Kaftan - $165
  5. Teal Majesty Kaftan - $152

Resort Elegance (5 products)

  1. Sea Breeze Kaftan - $125 (Bestseller)
  2. Azure Vacation Kaftan - $115
  3. Sage Garden Kaftan - $110
  4. Mint Serenity Kaftan - $120
  5. Lavender Lounge Kaftan - $105

Urban Chic (5 products)

  1. Midnight Navy Kaftan - $130
  2. Champagne Gold Kaftan - $158
  3. Ivory Minimalist Kaftan - $118 (Bestseller)
  4. Blush Pink Kaftan - $112
  5. Crimson Statement Kaftan - $142

🎯 Target Revenue Goals

  • Year 1: ₹1 Crore ($120K USD)
  • Year 2: ₹2.5 Crore ($300K USD)
  • Year 3: ₹4 Crore ($480K USD)

📝 Development Notes

Database Management

# Local database reset
npm run db:reset

# Query local database
npm run db:console:local

# Query production database
npm run db:console:prod

Git Workflow

# Check status
npm run git:status

# Add and commit
npm run git:commit "Your message"

# View history
npm run git:log

PM2 Management

# List services
pm2 list

# View logs
pm2 logs iris-co-shop --nostream

# Restart
pm2 restart iris-co-shop

# Stop
pm2 stop iris-co-shop

# Delete
pm2 delete iris-co-shop

🔧 Troubleshooting

Port Already in Use

npm run clean-port

Database Issues

# Reset local database
npm run db:reset

# Re-apply migrations
npm run db:migrate:local
npm run db:seed

Build Errors

# Clean and rebuild
rm -rf dist node_modules .wrangler
npm install
npm run build

📞 Support

For issues or questions:


📄 License

© 2025 IRIS & CO. All rights reserved.


Built with ❤️ using Hono, Cloudflare Workers, and modern web technologies.

Last Updated: October 19, 2025

About

Project for iris & co for the website.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published