Thank you for your interest in contributing! This document provides guidelines and instructions for contributing to this project.
We are committed to providing a welcoming and inclusive environment. Please be respectful and constructive in all interactions.
- Check if the bug has already been reported in Issues
- If not, create a new issue with:
- Clear title and description
- Steps to reproduce
- Expected vs actual behavior
- Screenshots if applicable
- Environment details (OS, browser, Docker version)
- Check existing feature requests
- Create a new issue with the "enhancement" label
- Describe the feature and its use case
- Explain why it would be valuable for makerspaces
- Fork the repository
- Create a new branch:
git checkout -b feature/your-feature-name - Make your changes following our coding standards
- Make sure that new data fields have sane defaults.
- Write or update tests as needed
- Update documentation if required
- Commit with clear, descriptive messages
- Push to your fork and submit a pull request
See the README.md for basic application setup instructions (Docker, env vars, etc).
After cloning, install the local hooks and frontend deps with:
make setup-dev # or: ./scripts/setup-dev.shThis will:
- Create
backend/.venv(if missing) and installpre-commit. - Install pre-commit hooks for the
pre-commitandcommit-msggit hook stages. - Run
npm installinfrontend/, which fires thepreparescript that wires Husky into.husky/(setscore.hooksPath).
| Hook stage | Tooling | What it checks | Skip with |
|---|---|---|---|
pre-commit |
pre-commit framework | black, isort, flake8, bandit, file cleanups, npm lock sync, TS compile | git commit --no-verify |
commit-msg |
conventional-pre-commit (Python) and @commitlint/config-conventional via Husky |
Commit message follows Conventional Commits (<type>(<scope>): <subject>). Both checks enforce the same spec; either path catches violations. |
git commit --no-verify |
pre-push |
Husky → npm run lint + npm run test:fast |
Frontend lint + fast Jest run, but only when commits being pushed touched frontend/ |
git push --no-verify |
Use
--no-verifyonly for true emergencies. CI re-runs the same gates and will reject violations regardless.
Husky lives at the repo root (.husky/). Frontend-only contributors who don't install the Python pre-commit framework still get commit-msg + pre-push validation as long as cd frontend && npm install has run (the prepare script wires core.hooksPath).
The .github/workflows/ci.yml workflow defines the required gates. Branch protection requires ✅ CI Complete, which aggregates:
- Backend Lint (black/isort/flake8) — required, parallel with tests so lint failures fail fast.
- Backend Tests (pytest + migrations) — required.
- Frontend Tests (jest + build + Playwright e2e) — required. Playwright runs with
continue-on-error(advisory). - Docker Build Test — required.
- Code Quality & Security (bandit, pip-audit, gitleaks) — required.
- Deploy Validation (helm lint, helm template, kubeconform) — required.
CI uses path filters: doc-only changes (docs/**, *.md, .criteria/**, README) skip the heavy jobs and ✅ CI Complete still passes.
frontend/package.json defines a prebuild script that runs npx --yes update-browserslist-db@latest before every npm run build (npm runs prebuild automatically as part of the build lifecycle). This refreshes the bundled browserslist database so webpack/react-scripts don't warn about a stale caniuse-lite. No manual action is required — local builds, CI, and Docker production builds all pick this up by invoking npm run build.
Python (Backend):
- Follow PEP 8
- Use type hints where applicable
- Maximum line length: 100 characters
- Use meaningful variable and function names
TypeScript (Frontend):
- Use TypeScript strict mode
- Follow Airbnb style guide
- Use functional components with hooks
- Meaningful component and variable names
Backend:
docker-compose exec backend python manage.py testFrontend:
docker-compose exec frontend npm testPlease ensure all tests pass before submitting a PR.
makerspace-inventory/
├── backend/ # Django backend
│ ├── config/ # Django settings
│ ├── inventory/ # Inventory app
│ ├── reorder_queue/ # Reorder queue app
│ └── requirements.txt
├── frontend/ # React frontend
│ ├── public/
│ └── src/
│ ├── components/
│ ├── pages/
│ ├── services/
│ ├── types/
│ └── styles/
├── docker-compose.yml
└── README.md
Format: <type>(<scope>): <subject>
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
Examples:
feat(inventory): add barcode scanning supportfix(api): resolve QR code generation errordocs(readme): update installation instructions
Feel free to ask questions in Discussions or create an issue.
Thank you for contributing! 🎉