Skip to content

Latest commit

Β 

History

1,106 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Kreathief

The world's most advanced AI-native creative engine.

Kreathief is a professional-grade, browser-based design tool that replaces Figma, Canva, Photoshop, and mockup tools with one unified platform. Powered by AI, built for speed, and designed to work offline.

License Vite React TypeScript Supabase


✨ Features

πŸ€– AI-Native Design

  • Editable Vector Generation β€” AI creates fully editable layers, not locked templates
  • Multi-Agent Orchestration β€” Specialized AI agents for layout, color, typography, and mockups
  • Intent Inference β€” AI understands design context and suggests relevant improvements

🎨 Professional Editing

  • Pen Tool with full bezier curve control
  • Boolean Operations β€” Union, subtract, intersect, exclude
  • Variable Stroke Widths with pressure sensitivity and velocity-based smoothing
  • CMYK Color Support with gamut warnings and print-ready PDF export
  • Layer Management β€” Groups, masks, blend modes, and constraints

πŸ“± One-Click Mockups

  • Perspective-correct device and surface mapping
  • Automatic lighting and distortion adjustment
  • 100+ built-in mockup templates

πŸ“΄ Offline-First Architecture

  • Full editing capabilities without internet connection
  • Local IndexedDB storage with automatic cloud sync
  • AI request queuing for offline generation
  • Conflict resolution for multi-device workflows

πŸ’Ύ Universal Export

  • PNG, SVG, PDF, PSD (layered Photoshop files)
  • CMYK color profiles for print production
  • Bleed and crop marks for professional printing

πŸ› οΈ Tech Stack

Category Technology
Frontend React 18, TypeScript, Vite 5
State Management Zustand, Reselect
Styling Tailwind CSS, PostCSS
Animations Framer Motion
Backend Supabase (Auth, DB, Real-time, Storage)
AI Google Gemini API, Custom Multi-Agent Pipeline
Storage IndexedDB (offline), Supabase (cloud)
Testing Vitest, React Testing Library, Playwright
CI/CD GitHub Actions, Husky, Lint-Staged
Deployment Vercel

πŸ“¦ Installation

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Supabase account (for backend features)
  • Google Gemini API key (for AI features)

Quick Start

# Clone the repository
git clone https://github.com/lanryweezy/Kreathief.git
cd Kreathief

# Install dependencies
npm install

# Set up environment variables
cp .env.example .env.local
# Edit .env.local with your API keys

# Start development server
npm run dev

Open http://localhost:5173 in your browser.


πŸ”‘ Environment Variables

Create a .env.local file with the following:

# Supabase Configuration
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key

# Google Gemini API Key
VITE_GEMINI_API_KEY=your_gemini_api_key

# Optional: External APIs
VITE_UNSPLASH_ACCESS_KEY=your_unsplash_key
VITE_VECTEEZY_API_KEY=your_vecteezy_key
VITE_ICONSCOUT_CLIENT_ID=your_iconscout_client_id
VITE_ICONSCOUT_SECRET_KEY=your_iconscout_secret_key

# Development Mode (set to 'true' to bypass auth)
VITE_USE_QA_BYPASS=false

πŸš€ Available Scripts

Command Description
npm run dev Start development server with HMR
npm run build Build for production
npm run preview Preview production build locally
npm run test Run unit tests with Vitest
npm run test:ui Run tests with Vitest UI
npm run test:e2e Run end-to-end tests with Playwright
npm run lint Run ESLint
npm run lint:fix Fix ESLint issues automatically
npm run format Format code with Prettier
npm run type-check Run TypeScript type checking

πŸ—οΈ Project Structure

kreathief/
β”œβ”€β”€ components/           # React components
β”‚   β”œβ”€β”€ canvas/          # Canvas rendering engine
β”‚   β”œβ”€β”€ panels/          # Side panels (Layers, Assets, AI, etc.)
β”‚   β”œβ”€β”€ modals/          # Modal dialogs
β”‚   β”œβ”€β”€ landing/         # Landing page sections
β”‚   └── toolbar/         # Top toolbar components
β”œβ”€β”€ store/               # Zustand state management
β”‚   └── slices/          # Modular state slices
β”œβ”€β”€ services/            # Business logic & API integrations
β”œβ”€β”€ utils/               # Utility functions
β”œβ”€β”€ hooks/               # Custom React hooks
β”œβ”€β”€ workers/             # Web Workers for heavy computation
β”œβ”€β”€ config/              # Application configuration
β”œβ”€β”€ types.ts             # TypeScript type definitions
β”œβ”€β”€ constants.ts         # Application constants
└── public/              # Static assets

πŸ§ͺ Testing

# Run all tests
npm test

# Run tests in watch mode
npm run test:ui

# Run end-to-end tests
npm run test:e2e

# Generate coverage report
npm test -- --coverage

🌐 Deployment

Vercel (Recommended)

  1. Connect your GitHub repository to Vercel
  2. Set environment variables in Vercel dashboard
  3. Deploy automatically on push to main

The project includes a vercel.json configuration for optimal deployment:

  • SPA routing rewrites
  • Asset caching headers
  • API route handling

Manual Build

npm run build
# Output: ./dist directory

πŸ›οΈ Architecture

Canvas Engine

Kreathief uses a custom DOM-based rendering engine optimized for 1000+ layers at 60fps:

  • Viewport Culling β€” Only renders visible layers
  • Layer Caching β€” O(1) lookups via Map with automatic invalidation
  • Web Workers β€” Offloads heavy operations (background removal, vectorization)
  • Error Isolation β€” Per-layer error boundaries prevent canvas crashes

State Management

Modular Zustand store with 8 focused slices:

  • UISlice β€” Modals, toasts, panels
  • CanvasSlice β€” Zoom, size, background
  • LayerSlice β€” Layer CRUD, grouping, ordering
  • HistorySlice β€” Undo/redo with JSON patches
  • AISlice β€” AI generation state
  • ProjectSlice β€” Save/load projects
  • BrandSlice β€” Brand kits and style guides
  • AgentSlice β€” Multi-agent orchestration

Offline Sync

Hybrid storage with IndexedDB (local) and Supabase (cloud):

  • Automatic offline detection
  • Pending operation queue
  • Conflict resolution on reconnect
  • Background sync when online

🀝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Code Style

  • ESLint + Prettier enforced
  • Husky pre-commit hooks
  • TypeScript strict mode
  • Conventional commits preferred

πŸ“„ License

This project is proprietary software. All rights reserved.

Unauthorized copying, distribution, or modification of this file, via any medium, is strictly prohibited.


πŸ™ Acknowledgments

Built with love and obsession for:

  • Designers who deserve better tools
  • Developers who believe in offline-first
  • AI that assists, not replaces

πŸ“ž Support


Made with ❀️ by the Kreathief Team

Releases

Packages

Contributors

Languages