Automated Windows service for printing Hello Club event attendance lists with system tray monitoring
- Overview
- Features
- Quick Start
- Installation
- Configuration
- Usage
- Documentation
- Project Structure
- Testing
- Troubleshooting
- License
Hello Club Event Attendance Auto-Print is a professional Windows application that automatically fetches, monitors, and prints attendee lists for upcoming Hello Club events. It runs as a Windows Service in the background and provides a system tray interface for easy monitoring and control.
The application uses a smart two-stage process:
- Event Discovery - Periodically scans the Hello Club API for upcoming events
- Just-in-Time Processing - Fetches the latest attendee list moments before an event starts
- Automatic Printing - Generates a professional PDF and prints it (locally or via email)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β System Tray App β
β (Electron-based Monitor) β
β β’ Visual status indicator (green/yellow/red) β
β β’ Service control (start/stop/restart) β
β β’ Log viewer & notifications β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Windows Service β
β (Always-Running Background) β
β β’ Fetches events every N hours β
β β’ Schedules processing for each event β
β β’ Auto-restarts on failure β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββΌβββββββββββββ
βΌ βΌ βΌ
[Hello Club] [SQLite DB] [Printer]
API (Event Queue) (Local/Email)
- β Automated Event Fetching - Scans for upcoming events within configurable time windows
- β Smart Scheduling - Processes events at optimal times to capture last-minute sign-ups
- β Professional PDFs - Generates clean, printable attendee lists with custom layouts
- β Flexible Printing - Print locally or send via email to network printers
- β Category Filtering - Only process events from specified categories
- β Always Running - Starts automatically with Windows
- β Self-Healing - Automatically restarts if it crashes
- β Background Operation - Runs without user interaction
- β
Production Ready - Built with
node-windowsfor reliability
- π’ Visual Status - Color-coded icon (Green=Running, Red=Stopped, Yellow=Warning)
- π Real-time Monitoring - Shows service status and recent activity
- π Log Viewer - Browse activity and error logs in a clean interface
- π Notifications - Desktop alerts when events are processed
- ποΈ Service Control - Start, stop, and restart the service from the tray
- βοΈ Settings GUI - Edit configuration and credentials without touching files
- π Connection Tests - Test API and Email connections with one click
- β Comprehensive Tests - 20+ unit tests with Jest
- β Type Safety - Joi schema validation for all configuration
- β Error Handling - Robust error handling with detailed logging
- β Modular Architecture - Clean separation of concerns
- β Well Documented - Extensive JSDoc comments
Download and run the installer - The easiest way to get started:
- Download
HelloClubEventAttendance-Setup-1.0.0.exefrom the Releases page - Run the installer (requires Administrator)
- Follow the friendly setup wizard:
- Enter your Hello Club API key
- Configure email printing (optional)
- The installer automatically:
- Installs Node.js dependencies
- Sets up the Windows service
- Launches the tray monitor
That's it! The tray icon will appear in your taskbar. Right-click it to:
- View logs and status
- Edit settings
- Test API and Email connections
- Control the service
If you want to run from source or contribute:
# 1. Clone the repository
git clone https://github.com/ispyisail/Hello-Club-Event-Attendance-Auto-Print.git
cd Hello-Club-Event-Attendance-Auto-Print
# 2. Install dependencies
npm install
# 3. Configure your API key
copy .env.example .env
# Edit .env and add your API_KEY
# 4. Install the Windows Service (requires admin)
npm run service:install
# 5. Start the tray monitor
npm run tray- Operating System: Windows 10 or later
- Node.js: Version 16.0.0 or higher
- Build Tools: Required for native modules
- Windows: Install Visual Studio Build Tools
- Or install via npm:
npm install --global windows-build-tools
npm installThis installs all required packages including:
node-windows- Windows service managementelectron- System tray applicationbetter-sqlite3- Local databasepdfkit- PDF generationwinston- Logging- And more...
Create .env file:
# Copy the example
copy .env.example .envEdit .env and add your credentials:
# Required: Your Hello Club API key
API_KEY=your_api_key_here
# Optional: For email printing mode
PRINTER_EMAIL=[email protected]
SMTP_USER=[email protected]
SMTP_PASS=your_app_password
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587Edit config.json:
{
"categories": ["NBA - Junior Events", "Your Category"],
"preEventQueryMinutes": 5,
"fetchWindowHours": 24,
"serviceRunIntervalHours": 1,
"printMode": "local",
"outputFilename": "attendees.pdf",
"pdfLayout": {
"fontSize": 10,
"columns": [
{ "id": "name", "header": "Name", "width": 140 },
{ "id": "phone", "header": "Phone", "width": 100 },
{ "id": "signUpDate", "header": "Signed up", "width": 100 },
{ "id": "fee", "header": "Fee", "width": 60 },
{ "id": "status", "header": "Status", "width": 90 }
]
}
}Important: This step requires Administrator privileges.
# Open PowerShell or Command Prompt as Administrator
npm run service:installThe service will be installed as "HelloClubEventAttendance" and set to start automatically with Windows.
npm run trayThe tray icon will appear in your system tray (bottom-right corner of Windows taskbar).
The installer provides a professional, guided setup experience with a modern wizard:
π¨ Modern Setup Wizard:
- Friendly welcome screen with prerequisites checklist
- Node.js detection and guidance
- Step-by-step API configuration with helpful hints
- Optional email printing setup with Gmail-specific tips
- Smart validation (checks API key format)
- Real-time progress with emoji indicators
βοΈ Automatic Setup:
- Installs all files to Program Files
- Runs
npm installfor you (3-5 minutes) - Creates
.envfile from your input - Installs and starts the Windows service
- Creates Start Menu and Desktop shortcuts
- Launches the tray monitor
π¦ What's Included:
- Windows service (auto-starts on boot)
- System tray monitor
- All dependencies
- Complete documentation
- Automatic updates support
cd installer
build-installer.batThe installer will be created in dist/HelloClubEventAttendance-Setup-1.0.0.exe (2MB)
For End Users: Use the Settings GUI in the tray app - no file editing needed!
For Developers: Edit configuration files manually or use the Settings GUI.
The application uses two configuration files:
.env- Secrets and credentials (never commit this! Already in .gitignore)config.json- Application settings (safe to commit - no secrets)
Note: When using the installer, it creates your .env file during setup. The Settings GUI allows you to edit both files safely with automatic backups.
| Variable | Required | Description | Default |
|---|---|---|---|
API_KEY |
β Yes | Hello Club API authentication key | - |
PRINTER_EMAIL |
For email mode | Email address of network printer | - |
SMTP_USER |
For email mode | SMTP username (e.g., Gmail address) | - |
SMTP_PASS |
For email mode | SMTP password or app-specific password | - |
SMTP_HOST |
For email mode | SMTP server hostname | smtp.gmail.com |
SMTP_PORT |
For email mode | SMTP server port | 587 |
EMAIL_FROM |
For email mode | Sender email address | Same as SMTP_USER |
See CONFIGURATION.md for detailed configuration documentation.
The system tray icon provides quick access to all functionality:
Icon Colors:
- π’ Green - Service running normally
- π΄ Red - Service stopped or error
- π‘ Yellow - Service starting or warning
Right-click Menu:
- View Logs - Open log viewer window with real-time updates
- Settings βοΈ NEW! - Edit configuration via GUI
- Environment variables (API key, SMTP credentials)
- Application settings (categories, timing, PDF layout)
- Automatic validation and backup
- Test API Connection π NEW! - Verify Hello Club API connectivity
- Test Email Connection π NEW! - Verify SMTP settings
- Check Status Now - Force status refresh
- Start/Stop/Restart Service - Control the service
- Open Services Manager - Windows services.msc
- Open Project Folder - Browse application files
- Quit - Exit tray application (service continues running)
βοΈ Settings GUI: After installation, you can edit all configuration without touching files:
- Right-click tray icon β Settings
- Environment Variables Tab:
- Edit API key and SMTP credentials
- Password fields with show/hide toggle
- Real-time validation
- Configuration Tab:
- Manage event categories (add/remove)
- Adjust timing settings
- Change print mode (local/email)
- Edit PDF layout
- Click Save - automatic backups created
- Restart service to apply changes
π Connection Tests: Verify your configuration before processing events:
-
Test API Connection:
- Click to test Hello Club API
- Shows response time and success/failure
- Validates API key format
- Provides troubleshooting hints
-
Test Email Connection:
- Click to verify SMTP settings
- Tests connection without sending email
- Detects common Gmail/authentication issues
- Confirms printer email is configured
You can also run the application from the command line:
# Fetch events once
node src/index.js fetch-events
# Process pending events once
node src/index.js process-schedule
# Run as continuous service (in console)
node src/index.js start-service
# View help
node src/index.js --help# Install the service
npm run service:install
# Check service status
npm run service:status
# Uninstall the service
npm run service:uninstall
# Windows services.msc
services.mscLogs are written to the project root:
activity.log- Normal operations, events processederror.log- Errors and warnings only
View logs via:
- System tray β "View Logs"
- Open files directly in any text editor
- Command:
npm run logs(if you add this script)
| Document | Description |
|---|---|
| ARCHITECTURE.md | System design and architecture |
| API.md | Module and function reference |
| CONFIGURATION.md | Detailed configuration guide |
| DEVELOPMENT.md | Developer setup and contribution guide |
| WINDOWS-SERVICE-SETUP.md | Windows service installation guide |
| TRAY-APP-GUIDE.md | System tray application guide |
| INSTALLER-USER-GUIDE.md | Installer creation guide |
| TESTING-GUIDE.md | Testing documentation |
| TROUBLESHOOTING.md | Common issues and solutions |
hello-club-event-attendance/
βββ src/ # Application source code
β βββ core/ # Core business logic
β β βββ api-client.js # Hello Club API integration
β β βββ database.js # SQLite database management
β β βββ functions.js # Event processing logic
β β βββ service.js # Service scheduler
β βββ services/ # Supporting services
β β βββ email-service.js # SMTP email sending
β β βββ logger.js # Winston logging configuration
β β βββ pdf-generator.js # PDF creation
β βββ utils/ # Utilities and helpers
β β βββ args-parser.js # CLI argument parsing
β β βββ config-schema.js # Configuration validation
β βββ index.js # Application entry point
β
βββ service/ # Windows Service management
β βββ install.js # Service installation script
β βββ uninstall.js # Service removal script
β βββ status.js # Service status checker
β
βββ tray-app/ # Electron system tray app
β βββ main.js # Electron main process
β βββ log-viewer.html # Log viewer UI
β βββ icons/ # Tray icons
β βββ start-tray.bat # Tray launcher script
β
βββ installer/ # Inno Setup installer
β βββ setup.iss # Inno Setup script
β βββ build-installer.bat # Build automation
β βββ *.bat # Helper scripts
β
βββ tests/ # Unit tests
β βββ functions.test.js # Core logic tests
β βββ pdf-generator.test.js # PDF generation tests
β
βββ migrations/ # Database migrations
β βββ 001-initial-schema.sql # Initial database schema
β
βββ docs/ # Documentation
β βββ ARCHITECTURE.md
β βββ API.md
β βββ CONFIGURATION.md
β βββ ...
β
βββ bin/ # Generated binaries (gitignored)
β βββ daemon/ # Windows service daemon files
β
βββ .env # Environment variables (gitignored)
βββ .env.example # Environment template
βββ config.json # Application configuration
βββ package.json # Node.js project manifest
βββ README.md # This file
# Run all tests
npm test
# Run with coverage report
npm run coverage
# Run specific test file
npx jest tests/functions.test.js
# Run in watch mode (for development)
npx jest --watchCurrent test coverage:
- 20 unit tests passing
- Core business logic fully tested
- PDF generation tested with mocks
- API client error handling tested
Service won't start
- Ensure you installed as Administrator
- Check
error.logfor details - Verify API_KEY in
.envis correct
No events being processed
- Check category filters in
config.json - Verify events exist in the time window
- Run
node src/index.js fetch-eventsmanually
Tray icon not showing
- Check Windows notification area settings
- Restart the tray app:
npm run tray - Look for errors in console
PDF not printing
- Local mode: Install SumatraPDF on Windows
- Email mode: Verify SMTP credentials in
.env - Check
error.logfor printing errors
401 Unauthorized errors
- Your API_KEY is invalid or expired
- Get a new key from Hello Club
- Update
.envand restart service
See TROUBLESHOOTING.md for more solutions.
Contributions are welcome! Please see DEVELOPMENT.md for:
- Development setup
- Code style guidelines
- Testing requirements
- Pull request process
This project is licensed under the MIT License - see the LICENSE file for details.
- Hello Club for the excellent event management platform
- node-windows for Windows service integration
- Electron for the system tray application
- PDFKit for PDF generation
- Issues: GitHub Issues
- Documentation: See the
docs/folder - Email: Check the package.json for contact information
Made with β€οΈ for Hello Club users