Thank you for your interest in contributing to Squarewise! We welcome contributions from the community. Squarewise is a documentation-first, tracker-driven, modular Kotlin/Spring application. To ensure high code quality, clean architecture, and maintainable operations, all contributors follow the guidelines outlined below.
- Code of Conduct
- How to Contribute
- Development Setup
- Development Workflow
- Architecture & Design Principles
- Helpful Commands Cheat Sheet
Participation in Squarewise is governed by the Contributor Covenant Code of Conduct. Read it before contributing. Report conduct incidents through its private enforcement channel rather than in a public issue.
- Bugs: Use the bug report form and include the unexpected behavior, minimal reproduction, expected outcome, environment, and sanitized evidence.
- Accessibility barriers: Use the accessibility report form and follow the Accessibility Statement.
- Security questions and vulnerabilities: Do not file a public issue, discussion, or pull request. Send every security question and suspected vulnerability privately to security@subhrodip.com and follow the Security Policy.
Before building a major new capability or changing service boundaries:
- Review
docs/product/mvp.mdanddocs/architecture/. - Use the feature request form to outline its motivation, desired outcome, design trade-offs, and boundary implications.
Squarewise operates under a strict documentation-first workflow:
- Live status, assignment, priority, iteration, milestones, and blockers move to
mapped GitHub issues and the
Squarewise Deliveryproject after the DOC-28 cutover recorded indocs/tasks/registry.yaml. - Migrated task specifications remain under
docs/tasks/details/, with deprecated historical IDs and issue mappings in the registry. New work uses its GitHub issue number and issue body instead of allocating a local ID. - Verified implementation evidence is logged in
docs/tasks/progress.md. - The authority boundary and migration rules are documented in
docs/tasks/README.md. - Read
docs/working-agreement.mdfor full context on our execution protocol.
Squarewise first-party work is licensed under the
AGPL-3.0-only license. Before submitting a contribution, confirm
that you have the right to submit it under that license and preserve any
third-party copyright and license notices. Squarewise does not currently use a
CLA or DCO; the full scope and exception policy is documented in
docs/operations/licensing.md.
- JDK 25+: Squarewise uses modern Kotlin and JVM 25 features.
- Docker & Docker Compose v2: For PostgreSQL 17, RabbitMQ 4.3, and Mailpit.
- Python 3.11+: Used for contract and schema validation tools.
- Gradle: Provided via
./gradlewwrapper (no separate installation required).
Verify your environment using our self-check tool:
make doctor-
Clone the repository:
git clone https://github.com/ohbus/squarewise.git cd squarewise -
Verify prerequisites and build toolchain:
make bootstrap
-
Start local infrastructure (choose one approach):
- Background dependencies only (Postgres, RabbitMQ, Mailpit) when running apps natively via IDE/Gradle:
make deps-up
- Full containerized stack (all 4 apps + dependencies):
make full-up
- Background dependencies only (Postgres, RabbitMQ, Mailpit) when running apps natively via IDE/Gradle:
- Always branch off
master. - Use descriptive branch names with clear prefixes:
feat/<feature-name>for new featuresfix/<bug-fix-name>for bug fixesrefactor/<refactor-scope>for refactoringdocs/<doc-update>for documentation updates
git checkout master
git pull origin master
git checkout -b feat/my-new-featureBefore writing code:
- Check existing technical libraries (
libs/ids,libs/errors,libs/db, etc.) to maximize code reuse. - Ensure any API modifications match contracts in
contracts/. - Review relevant architecture specifications in
docs/architecture/.
- Keep code cognitively light and easy to read.
- Write minimal, modular, cohesive code.
- Avoid introducing speculative abstractions (YAGNI).
- Strictly adhere to the Design Principles.
All changes must be thoroughly validated before committing:
# Run fast unit tests
make test-unit
# Run full test suite with code coverage reports
make coverage
# Validate OpenAPI, GraphQL, and JSON schemas
make contracts
# Run linting (Spotless & Gradle checks)
make lint
# Validate full suite (contracts, tests, coverage, jar packaging)
make checkIf the development stack is running, you can also run the live multi-service acceptance tests:
make acceptance-live- Write concise, descriptive commit messages following the Conventional Commits specification:
feat(...): new functionalityfix(...): bug fixrefactor(...): refactoring without functional changestest(...): adding or modifying testsdocs(...): documentation changes
- Never commit
.envfiles, credentials, build artifacts, or IDE-specific project files. - Ensure
git diff --checkproduces no trailing whitespace or formatting warnings.
git add <files>
git commit -m "feat(expense-core): implement recurring expense calculator"- Push your branch to GitHub:
git push origin feat/my-new-feature
- Open a Pull Request targeting
master. - Complete the automatically loaded PR template with:
- Objective: What problem does this PR solve?
- Changes: Bulleted summary of changes made.
- Verification: Exact test/validation commands executed and their output.
- Documentation: Confirmation of updated docs/KDocs.
- Ensure all CI checks pass.
Pull requests must not contain undisclosed vulnerability details. Send security questions and reports to security@subhrodip.com under the Security Policy.
All contributions must follow docs/quality/programming-principles.md and docs/quality/coding-guidelines.md.
In enterprise code, each class or interface must reside in its own dedicated source file:
- Never combine JPA
@Entitydefinitions, Spring Data@Repositoryinterfaces, and business@Serviceor store adapter implementations in a single file. - Follow enterprise packaging (
entities/,repositories/,services/, etc.).
- Centralized API Constants: Hardcoded URL strings and standard headers (
X-Request-Id,Idempotency-Key) are prohibited in controllers, gateways, and tests. Always referencecom.subhrodip.squarewise.ids.ApiEndpoints(e.g.ApiEndpoints.ExpenseCore.V1.PATH_GROUPS). - Contracts First: Any change to REST or GraphQL contracts must be reflected in
contracts/and verified withmake contracts.
- Ensure all public classes, interfaces, methods, models, and endpoints include structured KDoc comments (
/** ... */) detailing intent, parameters, return values, invariants, and failure modes.
| Task | Command |
|---|---|
| View all available commands | make help |
| Check environment tools | make doctor |
| Start backing services | make deps-up |
| Stop backing services | make deps-down |
| Start complete container stack | make full-up |
| Stop complete container stack | make full-down |
| Validate OpenAPI & GraphQL schemas | make contracts |
| Run fast unit tests | make test-unit |
| Run all tests with JaCoCo coverage | make coverage |
| Run linting & formatting checks | make lint |
| Comprehensive check (CI mirror) | make check |
| Run live multi-service acceptance test | make acceptance-live |