Thank you for your interest in contributing to the Albert Heijn Self-Scanner project! This document provides guidelines and information about the development setup and tooling.
- Node.js: Version 20+ (recommended) or 18+
- npm: Version 8+ (comes with Node.js)
- Git: For version control
- pre-commit: For code quality hooks (optional but recommended)
-
Clone the repository:
git clone https://github.com/commjoen/seflscanfun.git cd seflscanfun -
Install dependencies:
npm install
-
Start development server:
npm start # or npm run dev -
Run tests:
npm test
We use ESLint with the Standard configuration to maintain code quality.
# Check for linting issues
npm run lint:check
# Automatically fix linting issues
npm run lintConfiguration: .eslintrc.js
Prettier ensures consistent code formatting across the project.
# Check formatting
npm run format:check
# Apply formatting
npm run formatConfiguration: .prettierrc.json
Pre-commit hooks automatically run quality checks before each commit.
# Install pre-commit (requires Python)
pip install pre-commit
# Install hooks
pre-commit install# Run all hooks on all files
pre-commit run --all-files
# Run specific hook
pre-commit run eslint --all-filesConfiguration: .pre-commit-config.yaml
-
Code Quality:
- ESLint for JavaScript linting
- Prettier for code formatting
- Trailing whitespace removal
- End-of-file fixers
-
Security:
- Secret detection
- Private key detection
-
File Validation:
- JSON, YAML, XML validation
- HTML structure validation
- CSS syntax checking
-
Project-Specific:
- Albert Heijn branding validation
- Package.json validation
-
Git:
- Merge conflict detection
- Commit message validation (conventional commits)
Dependabot automatically creates pull requests to keep dependencies up-to-date.
Configuration: .github/dependabot.yml
- npm dependencies: Weekly on Mondays at 04:00 CET
- GitHub Actions: Weekly on Mondays at 04:30 CET
- Docker dependencies: Weekly on Tuesdays at 04:00 CET
- npm: 5 open PRs maximum
- GitHub Actions: 3 open PRs maximum
- Docker: 2 open PRs maximum
We follow the Conventional Commits specification.
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasksci: CI/CD changes
git commit -m "feat: add barcode scanning sound effects"
git commit -m "fix(cart): resolve quantity update bug"
git commit -m "docs: update README with Docker instructions"
git commit -m "chore(deps): update express to v5.1.0"- Product Database Tests: 13 tests validating product data and functions
- Application Integration Tests: 8 tests validating app structure and functionality
- Total: 21 comprehensive tests
# Run all tests (CLI)
npm test
# Run tests in browser
npm run test:browser
# Then open http://localhost:8000/test.htmltest-runner.js: Node.js test runner for CI/CDtest.html: Browser-based test suitetests/integration-tests.js: Application integration tests
- Primary Blue:
#0066CC - Dark Blue:
#004499 - Orange:
#FF6600 - Green:
#00AA44 - Light Grey:
#F5F5F5
- Maintain Albert Heijn branding in UI elements
- Use Dutch language for user-facing text
- Follow mobile-first responsive design principles
- Include accessibility features
- Deploy (
.github/workflows/deploy.yml): Tests and deploys to GitHub Pages - Docker (
.github/workflows/docker.yml): Builds and publishes Docker images - Release (
.github/workflows/release.yml): Automated semantic versioning and releases
All PRs must pass:
- ✅ All tests (21 tests)
- ✅ ESLint validation
- ✅ Pre-commit hooks
- ✅ Dependabot security checks
When reporting issues:
- Check existing issues first
- Use the issue templates if available
- Include browser/Node.js version
- Provide minimal reproduction steps
- Include relevant console errors or screenshots
This project is for educational purposes. Albert Heijn is a registered trademark of Ahold Delhaize.
For questions or help, please open an issue or contact the maintainers.