Contributions are always welcome, no matter how large or small!
We want this community to be friendly and respectful to each other. Please follow it in all your interactions with the project. Before contributing, please read the code of conduct.
This project follows Clean Architecture principles. When contributing, please adhere to these guidelines:
-
Place UI code in the Presentation layer (
Presentation/)- ViewModels for state management
- Views for SwiftUI interfaces
- Components for reusable UI elements
-
Place business logic in the Domain layer (
Domain/)- Entities for data models
- UseCases for business logic operations
-
Place external integrations in the Data layer (
Data/)- Protocols for service contracts
- Services for platform integrations (AVFoundation, Vision, etc.)
-
Use protocols for testability
- Define protocol interfaces for all services
- Inject dependencies through initializers
- Follow protocol-oriented design patterns
-
Follow existing code structure and naming conventions
- Match the established file organization
- Use descriptive names that clearly indicate purpose
- Follow Swift naming conventions and style guidelines
For detailed architecture information, see ARCHITECTURE.md.
- macOS 13.0 or later
- Xcode 14.0 or later
- Camera access permissions
-
Clone the repository:
git clone https://github.com/pedrol2b/virtual-camera.git cd virtual-camera -
Open the project in Xcode:
open VirtualCamera.xcodeproj
-
Build and run the project (⌘R)
VirtualCamera/
├── Presentation/ # UI Layer
├── Domain/ # Business Logic Layer
└── Data/ # External Dependencies Layer
When implementing new features or fixes:
- Identify the appropriate layer for your changes
- Create new files following the existing structure
- Use dependency injection for all external dependencies
- Follow protocol-oriented design for testability
- Test your changes thoroughly before submitting
- Follow Swift API Design Guidelines
- Use clear, descriptive names for types, properties, and methods
- Add comments for complex logic or non-obvious behavior
- Keep functions small and focused on a single responsibility
- Use SwiftUI best practices for view composition
We follow the conventional commits specification for our commit messages:
fix: bug fixes, e.g. fix pinch gesture detection accuracyfeat: new features, e.g. add blur face moderefactor: code refactor, e.g. restructure ViewModel logicdocs: changes to documentation, e.g. update README with new featurestest: adding or updating tests, e.g. add unit tests for use caseschore: tooling changes, e.g. update Xcode project settings
Working on your first pull request? You can learn how from this free series: How to Contribute to an Open Source Project on GitHub.
When you're sending a pull request:
- Prefer small pull requests focused on one change
- Ensure the project builds without errors or warnings
- Test your changes on a real device if possible
- Follow the architectural guidelines outlined above
- Update documentation to reflect your changes
- Follow the pull request template when opening a pull request
- For pull requests that change the API or implementation, discuss with maintainers first by opening an issue
- Create entity models in
Domain/Entities/ - Implement business logic in
Domain/UseCases/ - Add service protocols in
Data/Protocols/ - Implement services in
Data/Services/ - Update ViewModel in
Presentation/ViewModels/ - Create or update views in
Presentation/Views/orPresentation/Components/
- Identify the layer where the bug occurs
- Make minimal, focused changes
- Test the fix thoroughly
- Document any workarounds or known limitations
- Update README.md for user-facing changes
- Update ARCHITECTURE.md for architectural changes
- Add inline comments for complex logic
- Keep code examples up to date
Feel free to open an issue for:
- Questions about the architecture
- Feature proposals
- Bug reports
- General discussions
Thank you for contributing to Virtual Camera!