Thank you for your interest in contributing to Monacopilot! We're thrilled to have you on board. This guide will help you get started with contributing to our monorepo project.
- Project Structure
- Development Setup
- Development Workflow
- Testing Changes
- Documentation
- Commit Guidelines
- Pull Request Process
Monacopilot is organized as a monorepo using PNPM workspaces:
packages/
├── core/ # Core functionality and provider implementations
└── monacopilot/ # Main Monaco Editor integration package
docs/ # Documentation website
playground/ # NextJS app for testing changes in real-time
-
Prerequisites
- Node.js (v16 or higher)
- PNPM (v9.15.4 or higher)
-
Clone and Install
git clone https://github.com/arshad-yaseen/monacopilot.git cd monacopilot pnpm install
-
Start Development Mode
# For core package pnpm dev:core # For monacopilot package pnpm dev:monacopilot # For documentation pnpm dev:docs # For playground pnpm dev:playground
Note: The development mode includes automatic rebuilding on code changes, so you don't need to run
pnpm build
manually after each change. -
Code Formatting Before committing your changes, run:
pnpm format
-
Type Checking
pnpm tsc
-
Linting
pnpm lint
We provide a playground environment to test your changes in real-time:
- The
playground/
directory contains a NextJS app that automatically reflects changes made to the packages - Before starting the playground, create a
.env.local
file in theplayground/
directory and add your OpenAI API key:OPENAI_API_KEY=your_api_key_here
- Run
pnpm dev:playground
to start the playground application - When you run
pnpm dev:monacopilot
orpnpm dev:core
, your changes will be immediately visible in the playground - Use this playground to verify your changes and test functionality before submitting a PR
To run tests:
pnpm test
The documentation is built using VitePress and is located in the docs
directory.
To preview documentation locally:
pnpm dev:docs
We follow Conventional Commits specification:
type(scope): description
[optional body]
[optional footer]
Types:
feat
: New featurefix
: Bug fixdocs
: Documentation changesstyle
: Code style changes (formatting, etc.)refactor
: Code refactoringtest
: Adding or modifying testschore
: Maintenance tasks
Example:
feat(core): add support for DeepSeek provider
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Make your changes
- Test your changes using the playground
- Run all checks:
pnpm validate pnpm test
- Commit your changes following our commit guidelines
- Push to your fork
- Open a Pull Request
Feel free to open an issue or join our community discussions if you need any assistance.
Thank you for contributing to Monacopilot! ❤️