Thank you for your interest in contributing to oCMS! This document provides guidelines for contributing to the project.
Please be respectful and constructive in all interactions. We welcome contributors of all experience levels.
- Check existing issues to avoid duplicates
- Use a clear, descriptive title
- Include steps to reproduce the problem
- Provide system information (Go version, OS, browser if relevant)
- Include relevant logs or error messages
- Fork the repository
- Create a feature branch from
master:git checkout -b feature/your-feature-name
- Make your changes following the coding standards below
- Write or update tests as needed
- Ensure all tests pass:
OCMS_SESSION_SECRET=test-secret-key-32-bytes-long!! go test ./...
- Commit with a clear message describing the change
- Push to your fork and open a pull request
See the README.md for full setup instructions.
Quick start:
git clone https://github.com/olegiv/ocms-go.git
cd ocms-go
make install-hooks
make assets
OCMS_SESSION_SECRET=your-secret-key-32-bytes make dev- Follow standard Go conventions
- Run
go fmtbefore committing - Run
go vet ./...to check for issues - Use meaningful variable and function names
- Add comments for exported functions and complex logic
- Write tests for new functionality
- Ensure existing tests pass before submitting
- Aim for meaningful test coverage, not just high percentages
- Use clear, descriptive commit messages
- Start with a verb in imperative mood (Add, Fix, Update, Remove)
- Keep the first line under 50 characters
- Add details in the body if needed
Example:
Add webhook retry mechanism
Implement exponential backoff for failed webhook deliveries.
Maximum 5 retries with delays of 1, 2, 4, 8, 16 minutes.
If your change requires database modifications:
- Create a migration file:
make migrate-create name=your_migration_name
- Write both up and down migrations
- Update SQLC queries if needed:
sqlc generate
All new source files should include the SPDX short-form license identifier at the top of the file:
Go files:
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (c) 2025-2026 Oleg IvanchenkoJavaScript/TypeScript files:
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (c) 2025-2026 Oleg IvanchenkoCSS/SCSS files:
/* SPDX-License-Identifier: GPL-3.0-or-later */
/* Copyright (c) 2025-2026 Oleg Ivanchenko */HTML templates:
{{/* SPDX-License-Identifier: GPL-3.0-or-later */}}
{{/* Copyright (c) 2025-2026 Oleg Ivanchenko */}}Using SPDX identifiers provides a standardized, machine-readable way to declare licensing. See spdx.org/licenses for more information.
By contributing to oCMS, you agree that your contributions will be licensed under the GPL-3.0 License. All contributions must be compatible with this license.
Open an issue for questions about contributing. We're happy to help!