Thank you for your interest in contributing to the Cloud IDE project! This document provides guidelines and instructions for contributing.
- Code of Conduct
- Getting Started
- Development Workflow
- Coding Standards
- Pull Request Process
- Project Structure
- Testing
- Be respectful and inclusive
- Welcome newcomers and help them get started
- Focus on constructive feedback
- Respect differing viewpoints and experiences
- Node.js 18+
- Git
- Basic understanding of TypeScript and React
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/algo.git
cd algo- Add upstream remote:
git remote add upstream https://github.com/Algodons/algo.git- Install dependencies:
npm install- Start development server:
npm run devgit checkout -b feature/your-feature-name- Make your changes
- Test your changes thoroughly
- Commit with clear messages:
git commit -m "feat: add new feature X"git fetch upstream
git rebase upstream/main- Use TypeScript for all new code
- Enable strict mode
- Properly type all functions and variables
- Avoid
anytypes when possible
Good:
interface User {
id: string;
name: string;
email: string;
}
function getUser(id: string): Promise<User> {
// implementation
}Bad:
function getUser(id: any): any {
// implementation
}- Use functional components with hooks
- Prefer named exports for components
- Keep components small and focused
- Separate logic from presentation
Example:
import React, { useState, useEffect } from 'react';
interface Props {
userId: string;
}
const UserProfile: React.FC<Props> = ({ userId }) => {
const [user, setUser] = useState<User | null>(null);
useEffect(() => {
fetchUser(userId).then(setUser);
}, [userId]);
if (!user) return <div>Loading...</div>;
return (
<div>
<h1>{user.name}</h1>
<p>{user.email}</p>
</div>
);
};
export default UserProfile;- Use separate CSS files for components
- Follow BEM naming convention when appropriate
- Keep styles scoped to components
- Use CSS variables for theming
Example:
.user-profile {
padding: 16px;
}
.user-profile__header {
font-size: 24px;
font-weight: bold;
}
.user-profile__content {
margin-top: 12px;
}- Use Express middleware pattern
- Handle errors properly
- Validate inputs
- Use async/await over callbacks
Example:
app.post('/api/users', async (req: Request, res: Response) => {
try {
const { name, email } = req.body;
if (!name || !email) {
return res.status(400).json({ error: 'Missing required fields' });
}
const user = await createUser({ name, email });
res.json({ success: true, user });
} catch (error) {
res.status(500).json({ error: 'Failed to create user' });
}
});Follow conventional commits:
feat:- New featurefix:- Bug fixdocs:- Documentation changesstyle:- Code style changes (formatting)refactor:- Code refactoringtest:- Adding testschore:- Maintenance tasks
Examples:
feat: add collaborative cursor tracking
fix: resolve WebSocket reconnection issue
docs: update API documentation
refactor: simplify Git API error handling
- ✅ Test your changes locally
- ✅ Update documentation if needed
- ✅ Add tests for new features
- ✅ Run linter:
npm run lint(if available) - ✅ Build succeeds:
npm run build
When creating a PR, include:
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
How to test these changes
## Screenshots (if applicable)
Add screenshots for UI changes
## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] Tests added/updated- Submit PR to
mainbranch - Wait for automated checks
- Address reviewer feedback
- Maintainer will merge when approved
algo/
├── server/ # Backend Node.js code
│ ├── index.ts # Main server entry
│ ├── yjs-server.ts
│ ├── terminal-server.ts
│ ├── git-api.ts
│ ├── package-api.ts
│ ├── preview-server.ts
│ └── database-api.ts
├── src/ # Frontend React code
│ ├── components/ # React components
│ │ ├── Editor.tsx
│ │ ├── Terminal.tsx
│ │ ├── GitPanel.tsx
│ │ └── ...
│ ├── App.tsx
│ └── main.tsx
├── public/ # Static assets
├── dist/ # Build output
└── docs/ # Documentation
npm testUse Jest for testing:
import { render, screen } from '@testing-library/react';
import UserProfile from './UserProfile';
describe('UserProfile', () => {
it('renders user name', () => {
render(<UserProfile userId="123" />);
expect(screen.getByText(/John Doe/i)).toBeInTheDocument();
});
});- User authentication and authorization
- Workspace isolation and security
- Performance optimization
- Mobile responsiveness
- Accessibility improvements
- Additional language support
- Plugin system
- Themes and customization
- AI-powered code completion
- Code search and navigation
- Video tutorials
- API examples
- Best practices guide
- Troubleshooting guide
- Unit tests for components
- Integration tests for APIs
- E2E tests with Playwright/Cypress
- Performance benchmarks
- 📖 Read the README
- 📋 Check API Documentation
- 🐛 Browse Issues
- 💬 Ask questions in Discussions
Contributors will be recognized in:
- README.md contributors section
- Release notes
- Project documentation
Thank you for contributing! 🎉