Contributing Guide
Contributing Guide
Section titled “Contributing Guide”Thank you for your interest in contributing to the Surkyl Platform! This guide will help you get started.
Getting Started
Section titled “Getting Started”- Fork the repository
- Clone your fork
- Install dependencies:
pnpm install - Create a branch for your changes
Development Workflow
Section titled “Development Workflow”Build Commands
Section titled “Build Commands”# Build a projectnx build <project-name>
# Examplesnx build playgroundnx build gatenx build pixelTesting
Section titled “Testing”# Run tests for a projectnx test <project-name>
# Run specific testnx test <project-name> --testNamePattern="test name"
# E2E testsnx e2e <project-name>-e2eLinting & Formatting
Section titled “Linting & Formatting”# Lint a projectnx lint <project-name>
# Format all filesnx format:write
# Check formattingnx format:checkRunning Applications
Section titled “Running Applications”# Serve an application in development modenx serve <project-name>
# Examplesnx serve playgroundnx serve docsnx serve muesync-comCode Style Guidelines
Section titled “Code Style Guidelines”TypeScript/JavaScript
Section titled “TypeScript/JavaScript”- Formatting: Single quotes, 2-space indentation
- TypeScript: Enable strict mode, use explicit types for public APIs
- Target: ES2015+
- Imports: Order: Angular core → third-party → local
- Naming:
- PascalCase for classes and components
- camelCase for methods and variables
- kebab-case for files
Angular
Section titled “Angular”- Use standalone components (no NgModules)
- Component prefix:
app- - Use signals and modern patterns (Angular 20+)
- Co-locate tests with source files
- Follow standard Rust conventions
- Run
cargo fmtbefore committing - Run
cargo clippyto catch common mistakes - Use workspace dependencies in
Cargo.toml
Commit Message Format
Section titled “Commit Message Format”Follow this format for commit messages:
#<issue_id> [<uri>] <conventional_tag>: (optional_tag) <summary>Examples
Section titled “Examples”# Feature#123 [apps::playground] feat: add user profile component
# Fix#456 [libs::pixel:::theme] fix: correct dark mode colors
# Documentation#789 [docs] docs: update quick start guide
# Refactor#101 [apps::gate::config] refactor: (cleanup) simplify configuration loadingConventional Tags
Section titled “Conventional Tags”feat: New featurefix: Bug fixchore: Maintenance taskrefactor: Code refactoringperf: Performance improvementtest: Adding or updating testsbuild: Build system changesci: CI/CD changesdocs: Documentation changesstyle: Code style changes (formatting)lint: Linting changesformat: Code formatting
Optional Tags
Section titled “Optional Tags”(wip): Work in progress(housekeeping): Code cleanup(cleanup): Removing unused code
URI Format
Section titled “URI Format”- Use
::for path separators:[apps::playground::components] - Use
:::for functions:[libs::core::utils:::calculate]
Pull Requests
Section titled “Pull Requests”- Create a feature branch from
main - Make your changes following the code style guidelines
- Write tests for new functionality
- Update documentation if needed
- Run tests and linting:
nx affected --target=test && nx affected --target=lint - Commit your changes with proper commit messages
- Push to your fork
- Create a Pull Request
PR Guidelines
Section titled “PR Guidelines”- Provide a clear description of the changes
- Reference any related issues
- Include screenshots for UI changes
- Ensure all tests pass
- Update documentation as needed
Testing
Section titled “Testing”Unit Tests
Section titled “Unit Tests”- Use Vitest for TypeScript/JavaScript tests
- Use Cargo test for Rust tests
- Co-locate tests with source files
- Aim for high test coverage
E2E Tests
Section titled “E2E Tests”- Use Playwright for end-to-end tests
- Test critical user flows
- Keep E2E tests stable and maintainable
Documentation
Section titled “Documentation”All documentation should be written in apps/docs:
- Guides:
apps/docs/src/content/docs/guides/ - API Reference:
apps/docs/src/content/docs/reference/ - App Docs:
apps/docs/src/content/docs/apps/ - Library Docs:
apps/docs/src/content/docs/libraries/
Use Markdown with Starlight frontmatter:
---title: Page Titledescription: Brief description for SEO---
# Page Title
Content here...Getting Help
Section titled “Getting Help”- Check the documentation
- Review existing issues on GitHub
- Ask questions in pull request discussions
- Join our community channels
Code of Conduct
Section titled “Code of Conduct”- Be respectful and inclusive
- Provide constructive feedback
- Help others learn and grow
- Follow the project guidelines
License
Section titled “License”By contributing, you agree that your contributions will be licensed under the same license as the project.
Thank you for contributing to the Surkyl Platform!