Contributing to AFK
September 19, 2026 · View on GitHub
Thank you for your interest in contributing to AFK! This document provides guidelines and instructions for contributing.
Development Setup
Prerequisites
- Node.js v18 or higher
- Rust (latest stable)
- Platform-specific dependencies:
- macOS: Xcode Command Line Tools (
xcode-select --install) - Windows: Microsoft Visual Studio C++ Build Tools
- Linux: See Tauri prerequisites
- macOS: Xcode Command Line Tools (
Getting Started
- Fork the repository
- Clone your fork:
git clone https://github.com/Harry-kp/afk.git cd afk - Install dependencies:
npm install - Start development:
npm run dev
Project Structure
afk/
├── src/renderer/ # React frontend
│ ├── components/ # UI components (Radix UI based)
│ ├── lib/ # Utilities and Tauri bridge
│ └── *.tsx # Page components
├── src-tauri/
│ ├── src/ # Rust backend
│ │ ├── main.rs # Entry point
│ │ ├── commands.rs # IPC handlers
│ │ ├── state.rs # App state
│ │ ├── tray.rs # System tray
│ │ └── utils.rs # Utilities
│ └── tauri.conf.json # Tauri config
└── index.html # Entry HTML
Code Style
TypeScript/JavaScript
- Use TypeScript for all new code
- Follow existing code conventions
- Use functional components with hooks
- Run
npm run lintbefore committing
Rust
- Follow standard Rust conventions
- Use
cargo fmtto format code - Run
cargo clippyfor linting - Document public APIs with doc comments
Making Changes
Branching
- Create a feature branch from
main:git checkout -b feature/your-feature-name - Use descriptive branch names:
feature/for new featuresfix/for bug fixesdocs/for documentation updates
Commits
- Write clear, concise commit messages
- Use present tense ("Add feature" not "Added feature")
- Reference issues when applicable: "Fix #123: Description"
Pull Requests
- Ensure your code builds without errors:
npm run build - Update documentation if needed
- Create a pull request with:
- Clear description of changes
- Screenshots for UI changes
- Link to related issues
Checks
npm run lint
cd src-tauri && cargo check
Reporting Issues
When reporting issues, please include:
- OS and version
- Steps to reproduce
- Expected vs actual behavior
- Screenshots if applicable
- Console/error logs
Feature Requests
We welcome feature suggestions! Please:
- Check existing issues first
- Describe the use case
- Explain why it would benefit users
Code of Conduct
Be respectful and inclusive. We follow the Contributor Covenant code of conduct.
License
By contributing, you agree that your contributions will be licensed under the MIT License.
Questions?
Feel free to open an issue for any questions about contributing.
Thank you for helping make AFK better!