Thank you for considering contributing to Zyra. This guide covers the process for contributing to the project.
By participating, you agree to uphold a respectful and inclusive environment. We expect all contributors to act professionally and constructively.
- Fork the repository
- Clone your fork locally
- Install dependencies:
npm install - Set up your environment (see README.md)
- Create a feature branch from
main
Use the following prefixes:
| Prefix | Purpose | Example |
|---|---|---|
feat/ |
New features | feat/attack-path-export |
fix/ |
Bug fixes | fix/scan-timeout |
docs/ |
Documentation | docs/api-reference |
refactor/ |
Code refactoring | refactor/storage-layer |
test/ |
Test additions | test/exposure-monitor |
chore/ |
Maintenance tasks | chore/update-deps |
We follow Conventional Commits:
<type>(<scope>): <description>
[optional body]
[optional footer]
Types: feat, fix, docs, style, refactor, test, chore, perf, ci
Scopes: frontend, backend, schema, auth, exposure, soar, siem, compliance, ci
Examples:
feat(exposure): add automated remediation for firewall rules
fix(backend): prevent duplicate exposure alerts on rescan
docs(api): add OpenAPI annotations to scan endpoints
- Ensure your branch is up to date with
main - Run the development server and verify your changes work
- Fill out the PR template completely
- Request review from at least one maintainer
- Address review feedback promptly
- Code compiles without errors
- No regressions in existing functionality
- New API endpoints include input validation
- Database schema changes use Drizzle ORM
- Frontend components include
data-testidattributes - Sensitive data is never logged or exposed
- Use the
IStorageinterface for all database operations - Keep route handlers thin — business logic belongs in modules
- Validate request bodies with Zod schemas from
drizzle-zod - Scope all queries by
orgIdfor multi-tenancy - Use appropriate middleware guards (
requireAuth,requireAdmin,requireAnalyst)
- Use TanStack Query for all server state
- Use
apiRequestfrom@/lib/queryClientfor mutations - Invalidate query cache after mutations
- Use shadcn/ui components from
@/components/ui/ - Icons:
lucide-reactfor actions,react-icons/sifor brand logos
- Define tables in
shared/schema.ts - Create insert schemas with
createInsertSchemafromdrizzle-zod - Export both insert and select types
- Update
IStorageinterface andDatabaseStorageimplementation - Update
replit.mdwith new table counts
Use GitHub Issues with the appropriate template:
- Bug Report — Something is broken
- Feature Request — Suggest an improvement
- Security Issue — Do NOT open a public issue; email security@zyra.dev
Open a Discussion in the repository or reach out to the maintainer team.