Skip to content

rosendolu/canvas-studio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

78 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Canvas Studio

A powerful open-source canvas editor for building live streaming rooms and video editing experiences.

License: Commercial GitHub Stars

δΈ­ζ–‡ζ–‡ζ‘£ | English


🌐 Live Demo

πŸ‘‰ https://draw.rosendo.fun


✨ Features

Feature Description
πŸ–ΌοΈ Static Image Elements Background, sticker, and product image rendering via react-konva
🎭 Avatar with Mask Digital human elements with circular clip mask, draggable & resizable
πŸ’¬ Bubble Text Inline double-click editing with Konva Group + Text overlay
✨ APNG Animation Frame-by-frame APNG playback using apng-js + Konva.Animation
πŸ”„ Seamless Carousel Canvas 2D + requestAnimationFrame infinite scroll (H/V configurable)
🎴 Slideshow Multi-image switching with easeInOut slide transition
πŸ”§ Transformer Controls 8-anchor drag / scale / rotate with keepRatio
πŸ“Š Timeline Ruler Canvas 2D ruler with frame/second/minute unit auto-switching
πŸŒ™ Theme Toggle Mantine light/dark theme with custom brand color
πŸ“€ Image Export Export canvas as DataURL or Blob via Konva Stage

πŸ—οΈ Tech Stack

Layer Technology
Frontend Framework React 18 + TypeScript
Build Tool Vite 5
UI Component Library Mantine 7 (light/dark theme support)
Canvas Rendering Konva + react-konva
State Management Zustand + Immer
Data Fetching TanStack Query v5
Backend Framework NestJS 10
Database MongoDB + Mongoose
API Documentation Swagger (/api/docs)
Package Manager npm Workspaces (Monorepo)

πŸ“ Project Structure

canvas-studio/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ web/                        # React frontend
β”‚   β”‚   └── src/
β”‚   β”‚       β”œβ”€β”€ components/
β”‚   β”‚       β”‚   β”œβ”€β”€ CanvasPlayer/   # Adaptive canvas container + Konva Stage
β”‚   β”‚       β”‚   β”œβ”€β”€ CanvasElements/ # All element type components
β”‚   β”‚       β”‚   β”œβ”€β”€ Timeline/       # Timeline ruler
β”‚   β”‚       β”‚   β”œβ”€β”€ ElementMenu/    # Asset panel
β”‚   β”‚       β”‚   └── Layout/         # AppLayout + theme toggle
β”‚   β”‚       β”œβ”€β”€ pages/
β”‚   β”‚       β”‚   β”œβ”€β”€ home/           # Homepage
β”‚   β”‚       β”‚   β”œβ”€β”€ editor/         # Video editor (timeline mode)
β”‚   β”‚       β”‚   └── live/           # Live room (real-time editing)
β”‚   β”‚       └── store/
β”‚   β”‚           β”œβ”€β”€ editorStore.ts  # Video editor state
β”‚   β”‚           └── liveStore.ts    # Live room state
β”‚   └── server/                     # NestJS backend
β”‚       └── src/
β”‚           β”œβ”€β”€ canvas/             # Canvas CRUD API
β”‚           β”œβ”€β”€ project/            # Project CRUD API
β”‚           └── app.module.ts
└── packages/
    └── canvas-core/                # Shared types + utilities
        └── src/
            β”œβ”€β”€ types.ts
            └── utils/
                β”œβ”€β”€ element.ts      # Position / scale / orientation utils
                β”œβ”€β”€ timeline.ts     # Timeline ruler drawing
                └── canvas.ts       # Konva image export

πŸš€ Quick Start

Prerequisites

  • Node.js >= 18
  • MongoDB (local or Atlas)

Install

git clone https://github.com/rosendolu/canvas-studio.git
cd canvas-studio
npm install

Development

# Start both frontend and backend
npm run dev

# Frontend only β€” http://localhost:5173
npm run dev:web

# Backend only β€” http://localhost:3000
npm run dev:server

Environment Variables

Create apps/server/.env:

MONGODB_URI=mongodb://localhost:27017/canvas-studio
PORT=3000

API Documentation

Once the server is running, visit: http://localhost:3000/api/docs


πŸ“‘ REST API

Canvas API

Method Path Description
POST /api/canvas Create canvas
GET /api/canvas List canvases
GET /api/canvas/:id Get single canvas
PATCH /api/canvas/:id Update canvas info
PUT /api/canvas/:id/pages Save live room state
PUT /api/canvas/:id/track Save editor track state
POST /api/canvas/:id/duplicate Duplicate canvas
DELETE /api/canvas/:id Delete canvas

Project API

Method Path Description
POST /api/project Create project
GET /api/project List projects
PATCH /api/project/:id Update project
DELETE /api/project/:id Delete project

πŸ“œ License

This software is licensed under a Commercial License.
Free for personal and non-commercial use only.
Commercial use requires a paid license. See LICENSE for details.


🀝 Contact

For licensing inquiries or commercial use, please contact the repository owner via GitHub.

About

🎨 Open-source Canvas editor for live streaming rooms and video editing β€” React + Vite + Mantine + NestJS + MongoDB

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages