Skip to content

floux-digital/lottie-tools

Β 
Β 

Repository files navigation

Lottie Open Studio

An open-source web-based animation editor for creating and editing Lottie animations. Import SVGs, create keyframe animations, edit existing Lottie files, and export to JSON format.

🌐 Try it Online

Launch Lottie Open Studio - Try the live version directly in your browser!

License Node

Lottie Open Studio Screenshot

🎨 Features

Current Status: 🚧 In Development (Milestone 8 Complete)

Lottie Open Studio is currently under active development.

βœ… Working Features:

  • πŸ“ SVG Import - Import and parse SVG files into layers
  • 🎨 Layer Management - View, select, hide/show, and lock layers
  • βŒ› Timeline Playback - Play/pause animations with 30 FPS playback engine
  • 🎬 Multi-Property Animation - Animate position, scale, rotation, opacity, colors, and stroke width
  • ⚑ Easing Functions - Linear, ease-in, ease-out, ease-in-out with visual feedback
  • 🎨 Color Animation - Smooth RGB interpolation for fill and stroke colors
  • πŸ“Š Property Tracks - Expandable timeline tracks showing keyframes per property
  • πŸ’Ύ Lottie Export - Export animations as standard Lottie JSON format
  • πŸ”„ Lottie Import - Import and edit existing Lottie JSON files with full round-trip support
  • πŸ“ˆ Custom Bezier Curves - Visual bezier curve editor for custom easing with draggable control points
  • πŸ‘οΈ Live Preview - Real-time canvas preview with smooth interpolated animations
  • πŸ§ͺ Test Coverage - 440 tests passing with comprehensive TDD approach
  • 🎬 Lottie Preview - Live preview with official lottie-web player (SVG/Canvas/HTML renderers)
  • πŸ–₯️ Comparison Mode - Side-by-side view of editor canvas vs Lottie preview
  • πŸ” Fullscreen Preview - Immersive preview mode with keyboard shortcuts (F/ESC)
  • βš™οΈ Quality Settings - Preview at 0.5x, 1x, or 2x quality for performance testing
  • ⚠️ Warning System - Automatic detection of performance and compatibility issues

🚧 In Progress:

  • πŸ’Ύ Project Save/Load - Persist projects to local storage with versioning
  • 🎨 Advanced Features - Text layers, gradients, masks

See PLAN.web-editor.md for the complete development roadmap.

πŸ“¦ Project Structure

This repository contains two complementary tools for working with Lottie animations:

1. Lottie Open Studio (Web Editor) - Main Project

A browser-based animation editor for creating and editing Lottie animations.

Location: web-editor/ Status: 🚧 80% Complete (8/10 milestones to MVP) Technology: React + TypeScript + Vite + Zustand Current Features: SVG import, multi-property animation, Lottie JSON import/export, custom bezier curves

2. Lottie to GIF Converter (CLI Tool)

βœ… Production Ready - Convert Lottie JSON animations to animated GIF files.

Location: lottie-to-gif/ Status: βœ… Stable Documentation: lottie-to-gif/README.md

# Quick example
cd lottie-to-gif
npm install
npm run build
node bin/lottie-to-gif examples/bond_vector.json

πŸš€ Getting Started

Quick Start (Recommended)

The easiest way to get started is using our convenience scripts:

# Clone the repository
git clone https://github.com/marciogranzotto/lottie-tools.git
cd lottie-tools

# Setup (installs dependencies)
./setup.sh

# Run the development server
./run.sh

Then open http://localhost:5173 to try the editor!

Docker Setup (Alternative)

Run the project in a containerized environment:

# Clone the repository
git clone https://github.com/marciogranzotto/lottie-tools.git
cd lottie-tools

# Development mode (with hot-reload)
docker-compose up lottie-dev

# Production mode (optimized build with nginx)
docker-compose --profile production up lottie-prod

Development: http://localhost:5173 (hot-reload enabled) Production: http://localhost:8080 (optimized nginx build)

Manual Setup

If you prefer to run commands manually:

# Clone the repository
git clone https://github.com/marciogranzotto/lottie-tools.git
cd lottie-tools/web-editor

# Install dependencies
npm install

# Start development server
npm run dev

# Run tests
npm test

# Check test coverage
npm run coverage

CLI Converter (Available Now)

cd lottie-to-gif
npm install
npm run build

# Convert a Lottie animation to GIF
npx lottie-to-gif animation.json

See lottie-to-gif/README.md for full CLI documentation.

πŸ“‹ Development Roadmap

MVP (v1.0) - Lottie Open Studio

  • Milestone 1: Project setup (React + Vite + TypeScript + Zustand)
  • Milestone 2: SVG import and layer management (TDD approach)
  • Milestone 3: Timeline UI and playback engine (30 FPS playback)
  • Milestone 4: Keyframe creation & basic animation (position interpolation)
  • Milestone 5: Multi-property animation (scale, rotation, opacity, colors, easing)
  • Milestone 6: Lottie JSON export (TypeScript types, property/shape converters, download)
  • Milestone 7: Lottie JSON import and round-trip editing (with custom bezier curves!)
  • Milestone 8: Preview integration with lottie-web
  • Milestone 9: Project save/load & state management
  • Milestone 10: UI/UX polish and documentation

Current Status: βœ… Milestone 8 Complete - Live preview with lottie-web player, comparison mode, and fullscreen support!

Post-MVP Features

  • Text layer support (v1.1)
  • Gradient support (v1.2)
  • Advanced features: path morphing, masks, expressions (v2.0+)

See PLAN.web-editor.md for detailed milestone breakdown.

πŸ› οΈ Technology Stack

Lottie Open Studio (Web Editor)

  • Framework: React 18
  • Build Tool: Vite
  • Language: TypeScript
  • State Management: Zustand
  • Animation Engine: lottie-web
  • Timeline: Custom or existing library (TBD)

Lottie to GIF (CLI Tool)

  • Language: TypeScript
  • Runtime: Node.js
  • Rendering: Puppeteer + lottie-web
  • Encoding: gif-encoder-2

πŸ“š Documentation

Helper Scripts

The repository includes convenience scripts to simplify development:

  • setup.sh - Installs all dependencies for the web editor

    • Checks Node.js version (>= 14.0.0 required)
    • Installs npm packages
    • One-time setup command
  • run.sh - Starts the development server

    • Checks if dependencies are installed
    • Launches Vite dev server at http://localhost:5173
    • Shows helpful status messages

Both scripts are located in the root directory and are executable on Unix-like systems (macOS, Linux).

Docker Configuration

The project includes Docker support for containerized development and deployment:

  • Dockerfile - Multi-stage production build

    • Stage 1: Build application with Node.js 18
    • Stage 2: Serve with nginx Alpine
    • Optimized image size with layer caching
    • Includes healthcheck endpoint
    • Gzip compression and security headers
  • Dockerfile.dev - Development container

    • Hot-reload enabled for local development
    • Node.js 18 Alpine base
    • Volume mounts for source code changes
    • Vite dev server with host binding
  • docker-compose.yml - Orchestration configuration

    • Development service (port 5173) with volume mounts
    • Production service (port 8080) with nginx
    • Network configuration
    • Service profiles for environment selection
  • docker/nginx.conf - Production nginx configuration

    • SPA routing support (fallback to index.html)
    • Static asset caching (1 year)
    • Gzip compression for text files
    • Security headers (X-Frame-Options, CSP, etc.)
    • Health check endpoint at /health
  • .dockerignore - Build optimization

    • Excludes node_modules, tests, documentation
    • Reduces image build context size
    • Improves build performance

🀝 Contributing

Contributions are welcome! This project is in active development.

For Web Editor Development

  1. Check PLAN.web-editor.md for current milestone
  2. Pick an unassigned task or create an issue
  3. Fork the repository
  4. Create a feature branch
  5. Make your changes with tests
  6. Submit a pull request

For CLI Tool

See lottie-to-gif/CONTRIBUTING.md

πŸ“„ License

MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“ž Support

πŸ—ΊοΈ Project Vision

Lottie Open Studio aims to be a powerful, open-source alternative for creating and editing Lottie animations directly in the browser. By combining a user-friendly web editor with a robust CLI converter, we're building a complete toolkit for working with Lottie animations.

Why Lottie?

  • Vector animations that scale without quality loss
  • Small file sizes compared to GIF/video
  • Interactive and programmable
  • Cross-platform (web, iOS, Android, React Native)

Made with ❀️ using Claude Code

About

An open-source web-based animation editor for creating and editing Lottie animations. Import SVGs, create keyframe animations, edit existing Lottie files, and export to JSON format.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 93.2%
  • CSS 4.4%
  • JavaScript 1.3%
  • Other 1.1%