Thank you for your interest in contributing to RapidKit! This document provides guidelines and instructions for contributing.
This project adheres to a Code of Conduct. By participating, you are expected to uphold this code.
- Node.js 18+
- npm or yarn
- Visual Studio Code
- Git
-
Clone the repository
git clone https://github.com/getrapidkit/rapidkit-vscode.git cd rapidkit-vscode -
Install dependencies
npm install -
Open in VS Code
code . -
Run the extension
- Press
F5to open Extension Development Host - Test your changes in the new window
- Press
rapidkit-vscode/
├── src/
│ ├── commands/ # Command implementations
│ ├── core/ # Core services (config, detector)
│ ├── providers/ # IntelliSense providers
│ ├── ui/ # UI components (tree views, panels)
│ ├── utils/ # Utility functions
│ ├── types/ # TypeScript type definitions
│ └── extension.ts # Extension entry point
├── snippets/ # Code snippets (Python, TS, YAML)
├── schemas/ # JSON schemas for validation
├── media/ # Icons and images
├── package.json # Extension manifest
└── tsconfig.json # TypeScript configuration
-
Create a branch
git checkout -b feature/your-feature-name -
Make your changes
- Follow TypeScript best practices
- Add JSDoc comments for public APIs
- Update tests if needed
-
Test your changes
npm test npm run lint -
Commit your changes
git commit -m "feat: add new feature"Follow Conventional Commits:
feat:- New featurefix:- Bug fixdocs:- Documentation changesstyle:- Code style changesrefactor:- Code refactoringtest:- Test additions/changeschore:- Build/tooling changes
-
Push and create PR
git push origin feature/your-feature-name
Run tests before submitting PR:
# Lint code
npm run lint
# Run tests
npm test
# Test compilation
npm run compile
- Set breakpoints in VS Code
- Press
F5to launch Extension Development Host - Trigger the feature you're debugging
- Inspect variables and step through code
- Use TypeScript strict mode
- Prefer
constoverlet - Use explicit types for function parameters and return values
- Use async/await over promises
- Add JSDoc comments for exported functions
Example:
/**
* Creates a new RapidKit project
* @param name - Project name
* @param framework - Framework type (fastapi or nestjs)
* @returns Promise resolving to project path
*/
export async function createProject(
name: string,
framework: Framework
): Promise<string> {
// Implementation
}
- Use
vscode.window.showInformationMessagefor user messages - Use
vscode.window.withProgressfor long-running operations - Dispose resources properly (add to
context.subscriptions) - Use proper VS Code icons (
$(icon-name))
Always handle errors gracefully:
try {
await someOperation();
vscode.window.showInformationMessage('Success!');
} catch (error) {
const message = error instanceof Error ? error.message : String(error);
vscode.window.showErrorMessage(`Failed: ${message}`);
Logger.getInstance().error('Operation failed', error);
}
- Use appropriate icons from VS Code icon library
- Provide context menus for actions
- Show loading states
- Handle empty states
- Use VS Code theme CSS variables
- Make responsive
- Handle message passing properly
- Clean up resources on dispose
- Use clear, descriptive names
- Show progress for long operations
- Provide meaningful error messages
- Add to Command Palette with category
Update documentation when:
- Adding new features
- Changing existing behavior
- Adding configuration options
- Adding commands or shortcuts
Update these files:
README.md- Main documentationCHANGELOG.md- Version history- Code comments - Inline documentation
Test individual functions:
import { describe, it, expect } from '@jest/globals';
import { myFunction } from '../myFunction';
describe('myFunction', () => {
it('should return expected result', () => {
const result = myFunction('input');
expect(result).toBe('expected');
});
});
Test VS Code API integration:
import * as vscode from 'vscode';
import * as assert from 'assert';
suite('Extension Test Suite', () => {
test('Command is registered', async () => {
const commands = await vscode.commands.getCommands(true);
assert.ok(commands.includes('rapidkit.createWorkspace'));
});
});
When reporting bugs, include:
- Description - Clear description of the issue
- Steps to Reproduce - Detailed steps
- Expected Behavior - What should happen
- Actual Behavior - What actually happens
- Environment:
- VS Code version
- Extension version
- OS and version
- Node.js version
- Python version (if relevant)
- Logs - Output from RapidKit output channel
- Screenshots - If applicable
When requesting features:
- Use Case - Explain the problem/need
- Proposed Solution - How it should work
- Alternatives - Other solutions considered
- Additional Context - Screenshots, mockups, etc.
PRs will be reviewed for:
- Functionality - Does it work as expected?
- Code Quality - Is it well-written and maintainable?
- Tests - Are there appropriate tests?
- Documentation - Is it properly documented?
- Performance - Is it efficient?
- Security - Are there security concerns?
- Update version in
package.json - Update
CHANGELOG.md - Create git tag
- Push to GitHub
- Publish to VS Code Marketplace
- Discord: Join our server
- GitHub Discussions: Ask questions
- Email: dev@getrapidkit.com
Thank you for contributing to RapidKit! Your efforts help make this tool better for everyone.
Happy Coding! 🚀