## Contributing to LeanIX Pathfinder MCP Server

Thank you for your interest in contributing! This document provides guidelines for contributing to this project.

### 🚀 Getting Started

1. Fork the repository
2. Clone your fork: `git clone https://github.com/YOUR_USERNAME/leanix-pathfinder-mcp-server.git`
3. Install dependencies: `npm install`
4. Create a `.env` file based on `.env.example`
5. Build the project: `npm run build`

### 🔧 Development

#### Prerequisites
- Node.js 18+ 
- TypeScript knowledge
- LeanIX API access

#### Project Structure
- `src/index.ts` - Main MCP server (stdio transport)
- `src/rest-api-server.ts` - REST API server for web integrations
- `src/client.ts` - LeanIX API client
- `src/types.ts` - TypeScript type definitions
- `docs/` - Documentation files
- `examples/` - Usage examples

#### Available Scripts
- `npm run dev` - Start development MCP server
- `npm run dev:rest` - Start development REST API server
- `npm run build` - Build the project
- `npm test` - Run tests (when available)

### 🐛 Bug Reports

When filing a bug report, please include:
- Node.js version
- Operating system
- Clear steps to reproduce
- Expected vs actual behavior
- Relevant logs or error messages

### ✨ Feature Requests

For new features:
- Check existing issues first
- Describe the use case clearly
- Explain why this feature would be valuable
- Consider implementation complexity

### 🔄 Pull Requests

1. Create a feature branch: `git checkout -b feature/amazing-feature`
2. Make your changes
3. Test thoroughly
4. Update documentation if needed
5. Commit with clear messages
6. Push to your fork
7. Create a pull request

#### Pull Request Guidelines
- Clear title and description
- Reference related issues
- Include tests for new features
- Update documentation
- Ensure CI passes

### 📝 Code Style

- Use TypeScript
- Follow existing patterns
- Add JSDoc comments for public APIs
- Use meaningful variable names
- Keep functions focused and small

### 🧪 Testing

- Add tests for new features
- Ensure existing tests pass
- Test with real LeanIX instances when possible
- Include edge cases

### 📚 Documentation

- Update README.md for major changes
- Add JSDoc comments
- Update API documentation
- Include usage examples

### 🏷️ Commit Messages

Use conventional commits:
- `feat:` new features
- `fix:` bug fixes
- `docs:` documentation changes
- `style:` formatting changes
- `refactor:` code restructuring
- `test:` test additions/changes
- `chore:` maintenance tasks

### 📄 License

By contributing, you agree that your contributions will be licensed under the MIT License.

### 🤝 Code of Conduct

- Be respectful and inclusive
- Focus on constructive feedback
- Help others learn and grow
- Follow GitHub's community guidelines

### 💬 Getting Help

- Check existing documentation
- Search existing issues
- Create a new issue for questions
- Tag maintainers if urgent

Thank you for contributing! 🎉
