First off, thanks for taking the time to contribute!
This document provides guidelines for contributing to Ops-Center. These are guidelines, not rules—use your best judgment and feel free to propose changes to this document.
- Code of Conduct
- Getting Started
- How to Contribute
- Development Setup
- Pull Request Process
- Style Guidelines
- Community
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
- Bug Reports: Use the bug report template. Include steps to reproduce, expected behavior, and actual behavior.
- Feature Requests: Use the feature request template. Explain the use case and why it would be valuable.
- Questions: Use GitHub Discussions for questions about using Ops-Center.
- Check existing issues to see if someone has already reported your bug or requested your feature
- For significant changes, open an issue first to discuss your approach
- Fork the repository and create your branch from
main
- Bug fixes: Fix something that's broken
- Features: Add new functionality
- Documentation: Improve or add documentation
- Tests: Add or improve test coverage
- Refactoring: Improve code quality without changing functionality
Look for issues labeled good first issue — these are specifically curated for newcomers.
- Docker & Docker Compose
- Node.js 20+
- Python 3.10+
- PostgreSQL (or use Docker)
- Redis (or use Docker)
# Clone your fork
git clone https://github.com/YOUR_USERNAME/ops-center.git
cd ops-center
# Install frontend dependencies
npm install
# Install backend dependencies
cd backend
pip install -r requirements.txt
cd ..
# Copy environment template
cp .env.example .env.auth
# Start supporting services (PostgreSQL, Redis)
docker compose -f docker-compose.direct.yml up -d postgres redis
# Run backend
cd backend
uvicorn server:app --reload --port 8084
# In another terminal, run frontend
npm run dev# Frontend tests
npm test
# Backend tests
cd backend
pytest
# Linting
npm run lint
ruff check backend/git checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bug-fixUse prefixes:
feature/for new featuresfix/for bug fixesdocs/for documentationrefactor/for refactoringtest/for tests
- Write clear, readable code
- Add tests for new functionality
- Update documentation if needed
- Follow the style guidelines below
We use Conventional Commits:
# Format
<type>(<scope>): <description>
# Examples
feat(auth): add Google OAuth provider
fix(billing): correct credit calculation for BYOK users
docs(readme): update installation instructions
refactor(api): simplify user management endpoints
test(llm): add tests for model routingTypes: feat, fix, docs, style, refactor, test, chore
git push origin feature/your-feature-nameThen open a Pull Request on GitHub.
- Clear description of changes
- Reference related issues (
Fixes #123) - All tests passing
- No linting errors
- Documentation updated (if applicable)
- Changelog entry (for significant changes)
- A maintainer will review your PR
- Address any requested changes
- Once approved, a maintainer will merge
- Follow PEP 8
- Use type hints
- Use
rufffor linting - Document public functions with docstrings
async def get_user_by_id(user_id: str) -> Optional[User]:
"""
Retrieve a user by their ID.
Args:
user_id: The unique identifier of the user
Returns:
User object if found, None otherwise
"""
...- Use functional components with hooks
- Use TypeScript types where possible
- Follow ESLint configuration
- Use meaningful component and variable names
// Good
const UserProfile = ({ userId }) => {
const [user, setUser] = useState(null);
// ...
};
// Avoid
const UP = ({ id }) => {
const [u, setU] = useState(null);
// ...
};- Use lowercase for SQL keywords
- Use snake_case for table and column names
- Include comments for complex queries
-- Get active users with their subscription tier
select u.id, u.email, st.tier_code
from "user" u
join subscription_tiers st on u.subscription_tier_id = st.id
where u.is_active = true;- Keep commits focused and atomic
- Write meaningful commit messages
- Reference issues when applicable
- Update README.md for user-facing changes
- Update CLAUDE.md for technical/architectural changes
- Add inline comments for complex logic
- Include JSDoc/docstrings for public APIs
# tests/test_user_api.py
async def test_get_user_returns_user_details():
response = await client.get("/api/v1/admin/users/123")
assert response.status_code == 200
assert "email" in response.json()// src/pages/UserManagement.test.jsx
test('renders user list', async () => {
render(<UserManagement />);
await waitFor(() => {
expect(screen.getByText('Users')).toBeInTheDocument();
});
});- GitHub Discussions: For questions and discussions
- Issues: For bugs and feature requests
- Discord: Join our community server (link in README)
Contributors are recognized in:
- The project's contributors list
- Release notes for significant contributions
- Our community highlights
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.
Thank you for contributing to Ops-Center!