Thank you for your interest in contributing to OpsKnight! This document provides guidelines and information for contributors.
- Code of Conduct
- Security Policy
- Getting Started
- Development Setup
- Making Changes
- Pull Request Process
- Style Guidelines
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code.
Please review our Security Policy for instructions on how to report vulnerabilities.
- Node.js 18+
- PostgreSQL 14+
- Git
- Fork the repository on GitHub
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/opsknight.git cd opsknight - Add upstream remote:
git remote add upstream https://github.com/dushyant-rahangdale/opsknight.git
# Install dependencies
npm install
# Copy environment file
cp env.example .env
# Start PostgreSQL (Docker)
docker compose up -d postgres
# Run database migrations
npx prisma migrate deploy
npx prisma generate
# Start development server
npm run devfeature/- New featuresfix/- Bug fixesdocs/- Documentation changesrefactor/- Code refactoring
Example: feature/slack-thread-replies
Follow Conventional Commits:
type(scope): description
feat(slack): add thread reply support
fix(auth): resolve SSO redirect loop
docs(api): update events endpoint examples
# Run all tests
npm test
# Run specific test file
npm test path/to/test.ts
# Run with coverage
npm run test:coverage-
Update from upstream
git fetch upstream git rebase upstream/main
-
Create a branch
git checkout -b feature/your-feature
-
Make changes and test
npm test npm run lint -
Push and create PR
git push origin feature/your-feature
-
PR Requirements
- Clear description of changes
- Tests for new functionality
- Documentation updates if needed
- All CI checks passing
- Use TypeScript for all new code
- Enable strict mode
- Prefer interfaces over types for objects
- Use meaningful variable names
- Use functional components
- Follow React hooks rules
- Keep components focused and small
- Use proper prop typing
- Use CSS variables for theming
- Follow BEM naming when applicable
- Mobile-first responsive design
- ESLint and Prettier are enforced
- Run
npm run lintbefore committing - Husky pre-commit hooks are enabled
- Open a GitHub Issue
- Check existing issues and discussions
Thank you for contributing! 🎉