Contributing to LexKit

Help us build the future of rich text editing

LexKit is an open-source project built with modern web technologies. We welcome contributions from developers of all skill levels.

Open SourceCommunity DrivenTypeScript

Getting Started

LexKit is a monorepo built with modern tools. Here's how to get started with development.

Clone the Repository

LexKit is hosted on GitHub. Clone the repository to get started:

Clone the LexKit repository

git clone https://github.com/novincode/lexkit.git
cd lexkit
Install Dependencies

LexKit uses pnpm for package management. Install all dependencies:

Install dependencies

pnpm install
Start Development Server

Run the development server to see your changes in action:

Start the development server

pnpm run dev

Project Structure

LexKit is organized as a monorepo with clear separation of concerns.

LexKit Monorepo Structure

lexkit/
├── apps/
│   └── web/                 # Main web application
│       ├── app/             # Next.js app directory
│       ├── components/      # Shared components
│       └── lib/             # Utility functions
├── packages/
│   ├── editor/              # Core editor package
│   ├── ui/                  # UI component library
│   ├── meta/                # Metadata utilities
│   ├── eslint-config/       # ESLint configurations
│   └── typescript-config/   # TypeScript configurations
├── package.json
├── pnpm-workspace.yaml
├── turbo.json
└── tsconfig.json
packages/

Core packages including the editor system, UI components, and TypeScript configurations.

apps/web/

The main web application with documentation, demos, and examples.

Development Workflow

Follow these best practices to ensure smooth collaboration.

Branching Strategy

Create feature branches from main for all changes:

Create a feature branch

git checkout -b feature/your-feature-name

Use descriptive branch names like feature/add-link-extension or fix/toolbar-bug.

Code Quality

Before submitting a PR, ensure your code passes all checks:

Run quality checks

pnpm run lint
pnpm run type-check
pnpm run test
Pull Request Process

When your changes are ready, create a pull request with:

  • Clear description of the changes
  • Link to any related issues
  • Screenshots for UI changes
  • Tests for new functionality

Best Practices

Guidelines for writing maintainable, high-quality code.

TypeScript
  • Use strict TypeScript types
  • Avoid any types when possible
  • Document complex type definitions
  • Use utility types for common patterns
Documentation
  • Document all public APIs with JSDoc
  • Update docs for API changes
  • Add examples for complex features
  • Keep README files up to date
Testing
  • Write tests for new features
  • Test edge cases and error conditions
  • Ensure tests pass before submitting
  • Update tests when changing APIs
Code Review
  • Review your own code first
  • Be constructive in feedback
  • Consider performance implications
  • Ensure code follows project conventions