Thank you for your interest in contributing to Agent OTP! This document provides guidelines and instructions for contributing.
By participating in this project, you agree to abide by our Code of Conduct. Please be respectful and constructive in all interactions.
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/agent-otp.git cd agent-otp -
Add the upstream repository:
git remote add upstream https://github.com/yourusername/agent-otp.git
-
Install dependencies:
bun install
-
Start local services:
docker compose up -d
-
Copy environment configuration:
cp .env.example .env
-
Run the development server:
bun dev
feature/- New features (e.g.,feature/telegram-notifications)fix/- Bug fixes (e.g.,fix/token-expiration)docs/- Documentation changes (e.g.,docs/api-reference)refactor/- Code refactoring (e.g.,refactor/policy-engine)test/- Test additions or fixes (e.g.,test/sdk-coverage)
-
Create a new branch from
main:git checkout main git pull upstream main git checkout -b feature/your-feature
-
Make your changes following the coding standards
-
Write or update tests as needed
-
Run the test suite:
bun test -
Run the linter:
bun lint
-
Commit your changes with a descriptive message:
git commit -m "feat: add telegram notification support"
We follow Conventional Commits:
feat:- New featurefix:- Bug fixdocs:- Documentation changesstyle:- Code style changes (formatting, etc.)refactor:- Code refactoringtest:- Adding or updating testschore:- Maintenance tasks
Examples:
feat: add webhook notification channel
fix: correct token expiration calculation
docs: update SDK installation instructions
test: add policy engine unit tests
-
Update your branch with the latest upstream changes:
git fetch upstream git rebase upstream/main
-
Push your branch:
git push origin feature/your-feature
-
Open a Pull Request on GitHub
-
Fill out the PR template with:
- Description of changes
- Related issues
- Testing performed
- Screenshots (if UI changes)
-
Wait for review and address any feedback
- Use TypeScript strict mode
- Prefer explicit types over
any - Use interfaces for object shapes
- Export types from dedicated
types.tsfiles
- Use 2 spaces for indentation
- Use single quotes for strings
- Add trailing commas in multi-line arrays/objects
- Maximum line length: 100 characters
- Add JSDoc comments for public APIs
- Keep comments concise and meaningful
- Update README when adding features
- Write unit tests for new functionality
- Maintain test coverage above 80%
- Use descriptive test names
- Group related tests with
describe()
Example test structure:
describe('PolicyEngine', () => {
describe('evaluate', () => {
it('should auto-approve when conditions match', async () => {
// Test implementation
});
it('should require approval for unmatched conditions', async () => {
// Test implementation
});
});
});agent-otp/
├── apps/
│ ├── api/ # Hono API service
│ │ ├── src/
│ │ │ ├── routes/ # API route handlers
│ │ │ ├── services/ # Business logic
│ │ │ └── middleware/
│ │ └── tests/
│ ├── website/ # Next.js documentation site
│ └── telegram-bot/ # Telegram bot service
├── packages/
│ ├── sdk/ # TypeScript SDK
│ │ ├── src/
│ │ └── tests/
│ └── shared/ # Shared types and utilities
└── docs/ # Internal documentation
Look for issues labeled good first issue - these are suitable for newcomers.
Check issues labeled enhancement for feature ideas.
Documentation improvements are always welcome:
- Fix typos
- Clarify instructions
- Add examples
- Translate documentation
Help improve test coverage:
- Add unit tests for uncovered code
- Add integration tests
- Add end-to-end tests
- Open a GitHub issue for bugs or feature requests
- Join our Discord community for discussions
- Email support@agentotp.com for private inquiries
Contributors will be recognized in:
- The project README
- Release notes
- Our documentation site
Thank you for contributing to Agent OTP!