20f734d54a
- Update app name across all files (manifest, index.html, README, docs) - Update contact email to evershelfproject@gmail.com - Rename Docker service/container/volume to evershelf - Rename localStorage keys: dispensa_* → evershelf_* - Rename SQLite DB reference: dispensa.db → evershelf.db - Update SSH remote to dadaloop82/EverShelf - Update Apache conf file name to evershelf.conf - Update CI workflow Docker image/container names - Update cron job example path - Add data/dispensa.db to .gitignore to prevent accidental commit
3.8 KiB
3.8 KiB
Contributing to EverShelf
Thank you for your interest in contributing! This guide will help you get started.
🚀 Getting Started
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/EverShelf.git cd EverShelf - Create a branch from
develop:git checkout develop git checkout -b feature/your-feature-name - Set up your development environment:
cp .env.example .env # Edit .env with your API keys php -S localhost:8080
📐 Project Structure
├── index.html # Single-page app (all HTML)
├── api/
│ ├── index.php # API router + all endpoint functions
│ ├── database.php # SQLite schema + migrations
│ └── cron_smart_shopping.php
├── assets/
│ ├── js/app.js # All application JavaScript
│ └── css/style.css # All styles
├── translations/ # i18n translation files
│ ├── it.json # Italian (base language)
│ ├── en.json # English
│ └── ...
└── data/ # Runtime data (gitignored)
🌍 Contributing Translations
Translations are one of the easiest ways to contribute! Each language is a single JSON file in the translations/ directory.
Adding a new language
- Copy
translations/it.json(the base language) - Rename it to your language code (e.g.,
fr.json,de.json,es.json) - Translate all the values (keep the keys unchanged)
- Submit a Pull Request
Translation file format
{
"app.title": "EverShelf",
"nav.dashboard": "Dashboard",
"nav.inventory": "Inventario",
...
}
Rules:
- Keys are in English, dot-separated (
section.key) - Values are the translated strings
- Keep
{0},{1}placeholders — they are filled dynamically - Don't translate brand names (Bring!, Gemini, etc.)
- The CI pipeline will check your file for missing keys
Language codes
Use ISO 639-1 two-letter codes:
it, en, de, fr, es, pt, nl, pl, ru, ja, zh, ko, etc.
🔧 Development Guidelines
Code Style
- PHP: PSR-12 compatible, use type hints where practical
- JavaScript: No build tools, vanilla ES6+, single-file architecture
- CSS: Mobile-first, use CSS custom properties from
:root - Comments: English only, concise
Commits
- Use descriptive commit messages
- Reference issue numbers when applicable:
Fix #42: barcode scanner timeout - Keep commits focused on a single change
Branching
main— stable releases onlydevelop— active development (PRs target here)feature/*— new featuresfix/*— bug fixesi18n/*— translation contributions
🧪 Testing
Before submitting a PR:
# Check PHP syntax
php -l api/index.php
php -l api/database.php
# Check JS syntax
node -c assets/js/app.js
# Validate translation files
python3 -c "import json; json.load(open('translations/it.json'))"
# Test Docker build
docker build -t evershelf-test .
📝 Pull Request Process
- Ensure your code passes all CI checks
- Update
CHANGELOG.mdif applicable - Target the
developbranch - Provide a clear description of your changes
- Link any related issues
🐛 Reporting Bugs
Open an issue with:
- Steps to reproduce
- Expected vs. actual behavior
- Browser/device information
- Screenshots if applicable
💡 Feature Requests
Open an issue with the enhancement label. Describe:
- The problem you're trying to solve
- Your proposed solution
- Any alternatives you've considered
📄 License
By contributing, you agree that your contributions will be licensed under the MIT License.