A sophisticated mobile-first web application that combines canvas-based design tools with AI-powered content generation and direct Instagram publishing, specifically designed for fashion boutiques.
- AI-Powered Content Generation: GPT-4 for fashion-specific captions and DALL-E 3 for lifestyle images
- Mobile-Optimized Canvas Editor: Fabric.js with touch gestures and responsive design
- Direct Instagram Publishing: Instagram Graph API integration with publishing queue
- Fashion-Focused Templates: 15+ professionally designed templates for boutiques
- Real-time Auto-save: Project persistence with 30-second intervals
- PWA Capabilities: Offline functionality and mobile app experience
- Next.js 14 with App Router and TypeScript
- Supabase for database, authentication, storage, and Edge Functions
- Fabric.js for HTML5 canvas manipulation with mobile optimization
- Tailwind CSS for responsive, mobile-first design
- Zustand for state management with persistence
- React Query for server state management
Frontend (Next.js 14)
βββ Canvas Editor (Fabric.js)
βββ AI Integration (OpenAI)
βββ Mobile-First UI (Tailwind)
βββ PWA Features
Backend (Supabase)
βββ PostgreSQL Database
βββ Authentication & RLS
βββ File Storage
βββ Edge Functions
βββ Real-time Subscriptions
External APIs
βββ OpenAI (GPT-4, DALL-E 3)
βββ Instagram Graph API
βββ Cloudinary (Image optimization)
- Node.js 20+
- Supabase account
- OpenAI API account
- Instagram Developer account
-
Clone the repository
git clone <repository-url> cd bloomly-io
-
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env.local # Fill in your API keys and configuration -
Set up Supabase database
-- Run the SQL schema from the planning document -- Set up Row Level Security policies -- Create storage buckets for images
-
Run the development server
npm run dev
-
Open in browser
http://localhost:3000
The application is designed mobile-first with:
- Touch-optimized canvas controls
- Responsive breakpoints (320px - 2560px)
- Progressive Web App features
- Offline canvas editing capabilities
- Touch gestures (pinch, zoom, rotate, drag)
- Performance Optimizations: Tiered optimization system (10+, 20+, 50+, 100+ objects)
- Advanced Rendering: Object pooling, selective rendering, throttled updates at 60fps
- Memory Management: Viewport virtualization and dirty object tracking
- Mobile Touch Handling: Custom gesture recognition and multi-touch support
- Layer Management: Z-index controls, grouping, lock/unlock functionality
- Undo/Redo: 20-step history with command pattern implementation
- Text: Custom fonts, styling, effects, alignment
- Images: Upload, resize, crop, filters, opacity
- Shapes: Rectangles, circles, triangles with styling
- Backgrounds: Solid colors, gradients, images, patterns
- Fashion Captions: Brand voice-aware caption generation
- Hashtag Optimization: Engagement-optimized hashtag suggestions
- Image Generation: DALL-E 3 for lifestyle and product scenes
- Style Transfer: AI-powered style application
- Response caching (24-hour TTL)
- Prompt optimization for token efficiency
- Usage limits by subscription tier
- Quality scoring with retry logic
- Image Optimization: Instagram format optimization (1080x1080, 1080x1350)
- API Rate Limiting: Queue system with exponential backoff
- Status Tracking: Real-time publishing status updates
- Error Recovery: Automatic retry with fallback options
- Instagram Business Account
- Approved Instagram App
- Valid access tokens with publishing permissions
Key tables:
users: User profiles and subscription managementprojects: Canvas state and project metadatatemplates: Fashion-focused template libraryinstagram_accounts: Connected Instagram accountsai_generations: AI usage tracking and resultspublished_posts: Published content with engagement data
src/
βββ app/ # Next.js App Router pages
βββ components/ # React components
β βββ ui/ # Reusable UI components
β βββ canvas/ # Canvas-specific components
β βββ auth/ # Authentication components
β βββ dashboard/ # Dashboard components
β βββ landing/ # Landing page components
βββ lib/ # Utility libraries
βββ stores/ # Zustand state stores
βββ types/ # TypeScript type definitions
βββ hooks/ # Custom React hooks
βββ styles/ # Global styles and Tailwind config
Bloomly supports both standalone frontend development and fullstack development with the custom Express backend:
# Start both frontend (port 3060) and backend (auto-detected port 3401-3410)
npm run dev:fullstack
# Or start services individually:
npm run dev:frontend # Next.js dev server only (port 3060)
npm run dev:backend # Express API server only (auto-detected port)Create .env.local from the template:
cp .env.local.template .env.localBackend Port Range Configuration:
BACKEND_PORT_RANGE_START=3401 # Start of port range for backend
BACKEND_PORT_RANGE_END=3410 # End of port range for backend
FRONTEND_PORT=3060 # Frontend dev server portThe backend will automatically detect the first available port in the range 3401-3410. The selected port is displayed during startup.
- Single Command Startup: Start both frontend and backend with
npm run dev:fullstack - Automatic Port Detection: Backend finds available port in range 3401-3410
- Hot Reload: Frontend supports Next.js Fast Refresh
- Auto Restart: Backend auto-restarts on TypeScript file changes (~100ms with tsx)
- Health Checks: Startup script verifies backend readiness before continuing
- Graceful Shutdown: Ctrl+C cleanly stops both services with no orphaned processes
- Colored Logs: Console output color-coded by service (blue=frontend, green=backend)
Port Already in Use: If all ports in range 3401-3410 are occupied:
# Find processes using ports
lsof -i :3401-3410
# Or adjust the port range in .env.local
BACKEND_PORT_RANGE_START=3411
BACKEND_PORT_RANGE_END=3420Backend Startup Failures: If the backend fails to start:
- Verify Node.js version >= 20.0.0:
node --version - Ensure dependencies are installed:
npm install - Check
server/src/index.tsexists - Review backend logs in the console (green-prefixed output)
Module Type Errors:
If you see module type warnings, verify package.json includes:
{
"type": "module"
}npm run dev # Development server
npm run build # Production build
npm run start # Production server
npm run lint # ESLint checking
npm run test # Jest unit tests
npm run test:e2e # Playwright E2E tests
npm run type-check # TypeScript checkingnpm run test:all # Run all tests (unit + E2E)
npm run test:mobile # Mobile touch interaction tests
npm run test:accessibility # WCAG 2.2 compliance tests
npm run test:performance # Canvas performance validation
npm run test:smoke # Critical functionality smoke tests
npm run test:critical # High-priority feature tests
npm run test:report # Generate test reportsTest Coverage: 73 passing tests across 4 test suites
- Unit Tests: Jest with React Testing Library
- E2E Tests: Playwright with multi-browser support
- Accessibility: axe-playwright WCAG 2.2 validation
- Performance: Canvas optimization validation
- Mobile: Touch gesture and responsive testing
- Canvas Load Time: <2 seconds on mobile β
- AI Generation: <30 seconds completion β
- Instagram Publishing: >98% success rate β
- Mobile Lighthouse Score: >95 β
- Core Web Vitals: LCP <2.5s, FID <100ms, CLS <0.1 β
- Canvas Optimization: Enhanced performance for 10+ objects with tiered optimization
- Memory Management: Object pooling and selective rendering implemented
- Rendering Pipeline: Throttled rendering at 60fps with dirty object tracking
- Mobile Touch: Optimized touch handlers and gesture recognition
- 5 AI generations/month
- 3 projects
- Basic templates
- 1 Instagram account
- 100 AI generations/month
- 50 projects
- Premium templates
- 3 Instagram accounts
- Brand kits
- Analytics
- Unlimited AI generations
- Unlimited projects
- All features
- Team collaboration
- API access
The application is designed for deployment on:
- Frontend: Vercel (recommended) or Netlify
- Backend: Supabase (managed)
- CDN: Cloudinary for image optimization
- Monitoring: Vercel Analytics or similar
- WCAG 2.2 Level AA accessibility compliance
- GDPR/CCPA privacy compliance
- OWASP Top 10 security standards
- SOC 2 Type II ready architecture
- Row Level Security (RLS) for data protection
This is a commercial project. For development guidelines and contribution information, please contact the development team.
Proprietary - All rights reserved. This software is the intellectual property of Bloomly.io and is protected by copyright laws.
For technical support or questions:
- Email: support@bloomly.io
- Documentation: docs.bloomly.io
Built with β€οΈ for fashion boutiques worldwide