An open-source design-to-code platform that bridges Figma's visual design capabilities with intelligent code generation and synchronization.
git clone <repository-url>
cd canvas-studio
npm install
cp .env.example .env
# Edit .env with your configuration
# Start PostgreSQL and Redis
npm run docker:up
# Run database migrations
npm run migrate:up
# Start both backend and frontend
npm run dev
# Or start individually
npm run dev:backend
npm run dev:frontend
The application will be available at:
canvas-studio/
├── packages/
│ ├── backend/ # Node.js/Express backend
│ │ ├── src/
│ │ ├── migrations/ # Database migrations
│ │ └── tests/
│ └── frontend/ # React/Vite frontend
│ ├── src/
│ └── tests/
├── docker-compose.yml # Infrastructure services
└── package.json # Monorepo root
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch --workspace=packages/backend
# Lint all workspaces
npm run lint
# Format code
npm run format
The backend uses node-pg-migrate for database schema management.
# Validate migration structure
npm run migrate:validate --workspace=packages/backend
# Run all pending migrations
npm run migrate:up --workspace=packages/backend
# Rollback the last migration
npm run migrate:down --workspace=packages/backend
# Check migration status (dry run)
npm run migrate:status --workspace=packages/backend
# Create a new migration
npm run migrate:create <migration-name> --workspace=packages/backend
See packages/backend/migrations/README.md for detailed migration documentation.
# Build and start all services
docker-compose --profile production up -d
# Stop services
docker-compose down
See .env.example for all available configuration options.
Key variables:
DATABASE_URL: PostgreSQL connection stringREDIS_URL: Redis connection stringFIGMA_ACCESS_TOKEN: Figma API access tokenOLLAMA_BASE_URL: Ollama API endpointJWT_SECRET: Secret for JWT token generationCanvas Studio follows a client-server architecture:
Contributions are welcome! Please read our contributing guidelines before submitting PRs.
MIT License - see LICENSE file for details