A mobile-first Progressive Web App for tracking basketball games and player statistics.
- Mobile-First Design: Optimized for mobile devices with touch-friendly controls
- Progressive Web App: Install on your device and use offline
- Player Management: Add and manage team rosters
- Game Tracking: Record detailed per-player statistics for each game
- Season Overview: View aggregated stats and per-player averages
- Data Export: Export season data to CSV format
- Offline Support: Full functionality without internet connection
npm install
npm run devThe app will be available at http://localhost:8100
npm run buildBuilt files will be in the dist/ directory.
# Run tests
npm test
# Run tests with coverage
npm test:coverage
# Run tests in watch mode
npm test:watchPerformance audit results (as of December 2024):
| Category | Score |
|---|---|
| Performance | π― 100 |
| Accessibility | π― 100 |
| Best Practices | π― 100 |
| SEO | π― 100 |
- First Contentful Paint: < 1s
- Time to Interactive: < 1s
- Speed Index: < 1s
- Total Blocking Time: 0ms
- Cumulative Layout Shift: 0
- β Semantic HTML structure
- β ARIA labels where appropriate
- β Keyboard navigation support
- β Minimum 44x44px touch targets
- β High contrast ratios (WCAG AA compliant)
- β Screen reader friendly
- β Focus indicators
- Static Site Generator: Eleventy (11ty)
- Styling: Modern CSS with custom properties
- JavaScript: Vanilla ES6+ modules
- Testing: Jest + Testing Library
- PWA: Service Worker with cache-first strategy
- Code Quality: Prettier + ESLint
basketball-scorekeeper/
βββ src/
β βββ _includes/
β β βββ base.njk # HTML template
β βββ assets/ # Static assets (icons)
β β βββ favicon.svg
β β βββ icon-192.svg
β β βββ icon-512.svg
β βββ styles/ # Modular CSS
β β βββ variables.css # Design tokens
β β βββ base.css # Reset & base styles
β β βββ layout.css # Layout components
β β βββ components.css # UI components
β β βββ utilities.css # Utility classes
β β βββ style.css # Main entry (imports all)
β βββ utils/ # JavaScript utilities
β β βββ storage.js # localStorage operations
β β βββ calculations.js # Stats calculations
β β βββ validation.js # Input validation
β βββ pages/ # Page-specific scripts
β β βββ index.js # Main application logic
β βββ manifest.json # PWA manifest
β βββ sw.js # Service worker
β βββ index.md # Entry point
βββ tests/
β βββ core.test.js # Jest test suite
βββ .eleventy.js # Eleventy configuration
βββ .prettierrc # Prettier configuration
βββ .eslintrc.json # ESLint configuration
βββ jest.config.js # Jest configuration
βββ package.json
This project uses Eleventy (11ty) as its static site generator instead of Vite for the following reasons:
- Simplicity: Eleventy is lightweight and perfect for simple PWAs that don't require a heavy framework
- Vanilla JavaScript: No React or other framework needed - just ES6 modules
- Static Output: Generates static HTML/CSS/JS files ideal for PWA deployment
- Fast Builds: Minimal build tooling for quick development iteration
- PWA-First: Easy integration with service workers and offline-first patterns
When to use Eleventy vs Vite:
- Use Eleventy for simple vanilla JS PWAs, static sites, and lightweight apps
- Use Vite for React-based projects requiring component bundling and HMR
- Removed heavy third-party libraries (XLSX, WebAwesome)
- Built custom, lightweight components
- Reduced bundle size significantly
- Improved load times and offline reliability
- Single-column layouts on mobile
- Touch-optimized button sizes (44x44px minimum)
- Responsive grid system
- Safe area support for notched devices
- Core functionality works without JavaScript
- Service Worker provides offline support
- LocalStorage for data persistence
- Graceful degradation for older browsers
- Chrome/Edge 90+
- Safari 14+
- Firefox 88+
- iOS Safari 14+
- Android Chrome 90+
- Data Sync: Cloud backup and sync across devices
- Advanced Statistics:
- Shooting percentages
- Plus/minus ratings
- Heat maps for shot locations
- Game Analysis:
- Quarter-by-quarter breakdown
- Momentum tracking
- Comparison charts
- Team Management:
- Multiple teams support
- Season history
- Player photos
- Enhanced Export:
- PDF reports
- Shareable game summaries
- Social media integration
- Image optimization for icons (WebP/AVIF)
- Code splitting for larger features
- Service Worker precaching strategies
- IndexedDB for larger datasets
- Dark mode support
- Customizable team colors
- Undo/redo functionality
- Drag-and-drop roster management
- Quick stats entry shortcuts
- Voice input for stats
- High contrast mode
- Adjustable font sizes
- Screen reader optimizations
ISC
Adam Jolicoeur
Contributions are welcome! Please feel free to submit a Pull Request.