This guide covers contributions to TinkerHub’s customized SpaceWorks edition for TinkerSpace. For general use at another makerspace or changes to the upstream product, start with SpaceWorks-Labs/SpaceWorks. Contributions to this edition belong in tinkerhub/SpaceWorks.
- Fork and clone the repo.
- Follow DEVELOPMENT.md to run Postgres, the Django backend, and the React frontend locally.
- Run the relevant baseline checks using the development test instructions. Backend tests need the database-owner connection and encryption configuration; frontend tests use Node 20. Record existing failures before changing code, and report environmental limits explicitly.
backend/— Django 6 + DRF API. Apps live underbackend/apps/(accounts, makerspaces, inventory, hardware_requests, printing, operations, integrations, audit, evidence, …).frontend/— React 19 + Vite + TypeScript (public catalog + staff console).docs/— self-hosting guide, handover notes, and design specs.
- Workflow services are the single source of truth for state transitions. Never mutate
HardwareRequest.status(or other lifecycle status) directly — route through the workflow service so the audit log, Telegram alerts, and reservations stay consistent. The Django admin actions and the React console both call these same services. - The Inventory Availability module owns all quantity math (reserve/issue/return/mark-lost). No other module computes available/reserved/issued counts. Availability never goes below zero.
- Every makerspace-scoped query must be scoped through the Auth/RBAC module. Forgetting this is a cross-tenant data leak, not just a bug.
- The Django admin is superadmin-only. All other staff work in the React console.
- Immutability: audit logs are append-only; evidence photos and QR scan records are immutable.
- Public inventory must never expose storage locations, box IDs, QR codes, scan history, evidence photos, requester history, or hidden counts.
- Files stay modular — aim for ~200 lines, hard ceiling ~300, one responsibility per file.
- Document every API endpoint in OpenAPI (drf-spectacular
@extend_schema). An undocumented endpoint is incomplete. - Production-quality code: validate inputs at the boundary, handle external-service failure explicitly (an unreadable check-in roster must return 503 rather than authorize or deny a person), use structured logging, return typed errors, and emit an audit-log entry from every state-changing endpoint.
- Tests: add/extend pytest coverage under
backend/tests/for behavior changes (test external behavior, not implementation). Keep the suite green.
-
Always start from the latest
devbranch, then create a dedicated branch for your work:git checkout dev git pull --ff-only origin dev git checkout -b feature/<short-slug> # or fix/<short-slug>
-
Do not work or commit directly on
devormain. Keep each change on its own feature/fix branch. -
Use clear, conventional commit subjects, e.g.
feat(inventory): …,fix(printing): …,docs: …,chore: …. Keep the subject one line. -
Keep each PR focused on a single concern.
- Run the required backend checks and frontend type checking, tests and build using DEVELOPMENT.md. Include exact commands and outcomes; do not treat a build alone as proof that workflows pass.
- Update docs (
README.md,docs/, andCLAUDE.mdif you change tooling/architecture) alongside the code. - Open the PR against
dev—notmain—describing what changed and why, and call out any required env vars, migrations, or manual steps. Maintainers promote tested changes fromdevtomainthrough the release process. - Be responsive to review feedback — verify suggestions technically rather than applying blindly.
Open a GitHub issue with: what you expected, what happened, steps to reproduce, and your environment (local Docker vs. Supabase, OS, browser). For security-sensitive reports, please avoid filing a public issue with exploit details — flag it privately to the maintainers first.
Space Works is free and open source software, licensed under the GNU Affero General Public License v3 (AGPL-3.0-or-later). You are free to use, study, share, and modify Space Works under those terms — for any purpose.
No CLA is required. By submitting a pull request you agree that your contribution is offered under the same AGPL-3.0-or-later license as the project (inbound = outbound). You retain copyright in your contribution; merged contributors are credited in CONTRIBUTORS.md.