This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is ZenUML Web Sequence, a free sequence diagram online tool that converts text into UML sequence diagrams. It's built as both a web application (https://app.zenuml.com) and a Chrome extension.
- Frontend Framework: Preact (v10.18.1) - lightweight React alternative
- Build Tool: Vite (v6.3.5)
- UI Libraries: Tailwind CSS, Radix UI, Headless UI
- Core Engine: @zenuml/core (v3.32.3) - sequence diagram rendering
- Code Editor: CodeMirror (v5.65.16)
- Backend: Firebase (authentication, Firestore, cloud functions)
- Testing: Jest with Enzyme
- Package Manager: Yarn (required - see volta config)
The application follows a component-based architecture with:
- Split-pane interface: Code editor on left, live preview on right
- Modal-based UI: Settings, help, pricing, etc.
- Service layer pattern: Business logic separated in
/src/services/ - Multi-page support: Users can create multiple diagram pages
- Chrome extension support: Packaged separately in
/extension/
Key directories:
/src/components/- Preact components/src/services/- Business logic and Firebase integration/src/zenuml/- ZenUML specific components/functions/- Firebase cloud functions
# Install dependencies (use yarn, not npm)
yarn install
# Start development server
yarn dev
# Build for production
yarn build
# Package for release (creates extension.zip)
yarn release
# Run tests
yarn test
# Run linting
yarn lint
# Deploy to staging
yarn deploy:staging
# Deploy to production
yarn deploy:prod# Run all unit tests
yarn test
# Run a specific test file
yarn test src/common/ensure.test.js
# Manual testing guide available at
# src/manual-test-guide.mdTest files follow the pattern *.test.js and are located either in /src/tests/ or alongside the components they test.
- Always use Yarn, not npm - the project uses Yarn workspaces and volta for version management
- Preact aliases: React imports are aliased to Preact in the build config
- No TypeScript: This is a JavaScript project with JSX
- Firebase emulators: Use for local development - see
/docs/firebase-emulator-testing.md - Pre-commit hooks: Automatically run Prettier and ESLint
- Chrome extension: Built to
/extension/directory during release
- ESLint configuration extends
eslint-config-synacor - Prettier formatting on commit via lint-staged
- Follow existing patterns for component structure and service layer
- Preview: Created automatically for PRs
- Staging: Merges to master deploy to https://staging.zenuml.com
- Production: Create tag
release-<version>to deploy to https://app.zenuml.com
- Diagram Syntax: Uses @zenuml/core for parsing and rendering
- Multi-page System: Users can create/delete multiple diagram pages
- Cloud Sync: Firebase integration for saving diagrams
- Offline Support: Works without internet connection
- Export Options: PNG, SVG, and other formats
- Subscription System: Paddle integration for premium features
- Theme Support: Multiple editor themes and diagram styles
This project has Cursor rules configured at .cursor/rules/interactive-feedback-mcp.mdc that enable interactive feedback through MCP when working with the codebase.