Getting Started
FromREADME.md:297-307:
- Fork the repository
- Create your feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add some amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
See agents.md for architecture overview and coding conventions.
Development Setup
Prerequisites
- Node.js 18+ and npm
- Git
- Platform-specific build tools (see Building Guide)
Setup Steps
Keeping Your Fork Updated
Code Style
TypeScript
Netcatty uses TypeScript for type safety and better developer experience. Type definitions:- All domain models in
domain/models.ts - Use interfaces for object shapes
- Use type aliases for unions and primitives
- Avoid
any- useunknownif type is truly unknown
ESLint
Code is linted with ESLint (configuration ineslint.config.js).
- No unused variables
- No unused imports (via
eslint-plugin-unused-imports) - React hooks rules (via
eslint-plugin-react-hooks) - TypeScript recommended rules
Code Formatting
Indentation: 2 spaces (not tabs)Line length: No hard limit, but keep readable (~100-120 chars)
Quotes: Single quotes for strings (except JSX attributes)
Semicolons: Required
Trailing commas: Yes (for multi-line) Example:
Naming Conventions
Files:- React components:
PascalCase.tsx(e.g.,Terminal.tsx) - Hooks:
camelCase.ts(e.g.,useSessionState.ts) - Utilities:
camelCase.ts(e.g.,workspace.ts) - Electron bridges:
camelCase.cjs(e.g.,sshBridge.cjs)
- Components:
PascalCase(e.g.,Terminal,SftpView) - Functions/hooks:
camelCase(e.g.,useVaultState,findDefaultKey) - Constants:
UPPER_SNAKE_CASE(e.g.,STORAGE_KEY_HOSTS) - Interfaces/Types:
PascalCase(e.g.,Host,SSHKey)
Architecture Guidelines
Fromagents.md:41-45:
Layer Separation
Layer Separation
Domain Layer (
domain/):- Pure functions and types only
- No side effects, no I/O
- No dependencies on other layers
application/state/):- React hooks for state management
- Orchestrates domain logic and infrastructure
- Manages persistence boundaries
infrastructure/):- External I/O, services, adapters
- Configuration and defaults
- No UI logic
components/, App.tsx):- Presentation only
- Calls application hooks for state
- Calls domain helpers for pure logic
- No direct infrastructure access
Data Flow
Data Flow
- UI components call hooks (not services directly)
- Hooks call domain helpers for business logic
- Hooks call infrastructure adapters for I/O
- Domain never calls infrastructure or hooks
State Management
State Management
- Use React hooks for state (not Redux/MobX)
- Prefer composition over prop drilling
- Lift shared state into hooks
- Use Context sparingly (hooks preferred)
File Organization
File Organization
- Keep related code together
- Group by feature, not by type
- Extract reusable components to
components/ui/ - Extract shared logic to domain helpers
Coding Conventions
Fromagents.md:41-45:
Pure Domain Logic
Good:Side Effects in Application Layer
Good:Component Simplicity
Fromagents.md:38-39:
Keep components dumb. If prop lists grow large, derive a smaller view model in the hook.
Storage Keys
Fromagents.md:31-33:
Good:
Temporary Files
Fromagents.md:34:
Good:
No Direct Network Calls in UI
Fromagents.md:43-44:
Good:
Commit Guidelines
Commit Message Format
Use conventional commit format:feat- New featurefix- Bug fixdocs- Documentation changesstyle- Code style (formatting, semicolons, etc.)refactor- Code refactoringperf- Performance improvementstest- Adding/updating testschore- Build process, dependencies, etc.
Commit Best Practices
- One logical change per commit
- Write meaningful commit messages (explain why, not just what)
- Reference issues if applicable (
Fixes #123,Closes #456) - Keep commits atomic (each commit should build successfully)
Testing
Fromagents.md:36-37:
Favor unit tests for domain helpers and hook-level tests for application state.
Test Coverage Priority
- Domain logic (
domain/) - Pure functions should be well-tested - Application hooks (
application/state/) - State management logic - Utilities - Helper functions and parsers
Running Tests
Pull Request Process
Before Submitting
Update documentation
- Update README.md if adding features
- Add JSDoc comments to new functions
- Update type definitions if changing models
Test your changes
- Manual testing in development mode
- Test on your target platform(s)
- Verify no regressions in existing features
Pull Request Template
Title: Brief description of changes (e.g., “Add SFTP compressed upload support”) Description:Review Process
- Maintainers review your code
- Address feedback if requested
- Update PR based on review comments
- Approval and merge by maintainer
After Merge
Contribution Ideas
Good First Issues
- Documentation improvements
- UI/UX enhancements
- Bug fixes (check GitHub Issues)
- Adding terminal themes
- Adding distro icons
- Translation (i18n)
Feature Contributions
- New protocol support
- Enhanced SFTP features
- Snippet improvements
- Vault organization features
- Settings/preferences
- Port forwarding enhancements
Infrastructure Improvements
- Test coverage
- Build process optimization
- Performance improvements
- Accessibility enhancements
- Error handling improvements
Code of Conduct
Our Standards
- Be respectful of differing viewpoints and experiences
- Accept constructive criticism gracefully
- Focus on what’s best for the community and project
- Show empathy towards other community members
Unacceptable Behavior
- Harassment, trolling, or derogatory comments
- Personal or political attacks
- Publishing others’ private information
- Any conduct inappropriate in a professional setting
Getting Help
GitHub Issues
Ask questions and report bugs
GitHub Discussions
Community discussions and ideas
License
FromREADME.md:320-324:
Netcatty is licensed under GPL-3.0 License. By contributing, you agree that your contributions will be licensed under the same license.
See the LICENSE file for details.
Thank you for contributing to Netcatty! Your contributions help make SSH management better for everyone.
