-
-
Notifications
You must be signed in to change notification settings - Fork 5
Contributing
Contributions of all kinds are welcome — bug fixes, new features, translations, documentation improvements.
git clone https://github.com/YOUR_USERNAME/EverShelf.git
cd EverShelfgit checkout -b feature/my-feature
# or
git checkout -b fix/my-bug-fix# Option A: PHP built-in server
php -S localhost:8080
# Option B: Docker
docker compose up -dOpen http://localhost:8080 in your browser.
The app has no build step. Edit files directly and refresh the browser.
Key files:
-
assets/js/app.js— all frontend logic -
assets/css/style.css— all styles -
api/index.php— all API endpoints -
api/database.php— SQLite schema and migrations -
translations/*.json— i18n strings
# Check PHP syntax
php -l api/index.php
php -l api/database.php
# Check JS syntax
node --check assets/js/app.jsThere are no automated JS tests yet — manual testing in the browser is the current approach. If you add a feature, test the full flow: add, use, undo.
Use Conventional Commits:
git commit -m "feat(inventory): add bulk delete"
git commit -m "fix(scale): handle BLE disconnect during countdown"
git commit -m "docs: update kiosk setup guide"
git commit -m "chore: bump version to 1.8.0"Types: feat, fix, docs, style, refactor, test, chore
Scopes: inventory, ai, shopping, cooking, scale, kiosk, gateway, webapp, api, db
git push origin feature/my-featureOpen a Pull Request against the develop branch (not main).
| Branch | Purpose |
|---|---|
main |
Production — auto-deployed, never commit directly |
develop |
Integration branch — all PRs target here |
feature/* |
New features |
fix/* |
Bug fixes |
CI auto-merges develop → main on every push to develop.
GitHub Actions runs on every push to develop and main:
-
PHP lint —
php -lon all PHP files -
JS syntax check —
node --check assets/js/app.js - Translation validation — checks that all language files have the same keys
- Docker build — verifies the Docker image builds successfully
- Android build — (on tagged commits) builds Kiosk and Scale Gateway APKs
See the full guide in Translations.
Short version:
- Copy
translations/it.json→translations/xx.json - Translate all values
- Add
'xx'toSUPPORTED_LANGUAGESinapp.js - Open a PR
Open an issue on GitHub. Include:
- Steps to reproduce
- Expected vs. actual behaviour
- Browser/OS version
- Any console errors (F12 → Console)
- PHP: PSR-12, 4-space indent, type hints where practical
-
JavaScript: ES2020+,
async/await, no frameworks, 4-space indent - CSS: BEM-ish class names, CSS custom properties for theming
- SQL: parameterized queries (PDO), no raw string interpolation
- Add a
case 'my_action':to the router inapi/index.php - Implement
function myAction(PDO $db): void - Add the endpoint to
docs/openapi.yaml - Add translations for any new UI strings to all 3 language files
If you find a security vulnerability, do not open a public issue. Email evershelfproject@gmail.com directly.
Relevant resources:
- OWASP Top 10
- All SQL must use PDO prepared statements
- Never expose API keys in API responses (boolean flags only)
- Use
hash_equals()for token comparison
By contributing you agree that your code will be licensed under the MIT License.