- Implement MapImageService using Mapbox Static Images API
- Add server-side /table route with HTML form submission
- Generate static map images with auto-fit positioning based on actual location coordinates
- Add progressive enhancement with noscript fallbacks and Basic View button
- Update map center coordinates to proper Grand Rapids location
- Add numbered pins with color coding (red for regular, orange for persistent reports)
- Remove server-side caching to ensure fresh map images
- Fix theme toggle icon centering in CSS mixins
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove unused imports: LocationSubmission from types, Location/ProfanityWord from server
- Remove unused variables: wordText, detectedWords in profanity rejection
- Remove unused parameters: req in skip function, wordId/updates in fallback filter
- Fix regex escaping and destructuring patterns
- Remove unused response variables in tests
- Reduce ESLint issues from 45 to 22 (eliminated all 21 errors, keeping only warnings)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Consolidate request body destructuring into single line for better code style and ESLint compliance.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
docs/deployment.md:
- Complete deployment guide for both automated and manual setup
- Step-by-step instructions for Debian 12 ARM64
- Custom Caddy build with rate limiting plugin
- Service configuration and security setup
- Troubleshooting and maintenance sections
- Performance tuning recommendations
docs/api.md:
- Comprehensive API documentation with examples
- All public and admin endpoints documented
- Request/response schemas and validation rules
- Authentication flows and error handling
- Rate limiting and security feature documentation
- Client library examples (JavaScript, curl)
Fixes README.md reference to non-existent docs/deployment.md.
Both files provide detailed technical documentation for:
- Deployment procedures and requirements
- API usage and integration
- Security features and limitations
- Troubleshooting and maintenance
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
README.md:
- Add comprehensive API endpoint documentation with admin routes
- Update security section with detailed protections and limits
- Add rate limiting, input validation, and authentication details
- Include testing information (125+ tests, 76% coverage)
- Update technology stack with TypeScript and security features
CLAUDE.md:
- Add detailed testing coverage information
- Document security features in API endpoints section
- Update key design patterns with security-by-design and testing
- Include input validation limits and rate limiting details
- Clarify admin-only DELETE functionality
Both files now accurately reflect:
- Current security implementations
- Comprehensive test suite
- TypeScript architecture
- Rate limiting and input validation
- Admin authentication requirements
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add integration tests for admin routes with authentication
- Add unit tests for DatabaseService with proper mocking
- Fix ProfanityFilterService tests to handle case variations
- Remove old JavaScript test files
- Add coverage reporting to gitignore
- All 123 tests passing with 76% overall coverage
Coverage achieved:
- Models: 69.5% statements
- Routes: 80.6% statements
- Services: 75% statements
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Configure Jest for TypeScript testing with ts-jest preset
- Create comprehensive unit tests for Location model (15 tests)
- Create comprehensive unit tests for ProfanityWord model (16 tests)
- Create comprehensive unit tests for ProfanityFilterService (30+ tests)
- Create integration tests for public API routes (18 tests)
- Add test database setup and teardown utilities
- Configure coverage reporting with 80% threshold
- Install testing dependencies (@types/jest, ts-jest, @types/supertest)
Test Coverage:
- Location model: Full CRUD operations, validation, cleanup
- ProfanityWord model: Full CRUD operations, constraints, case handling
- ProfanityFilterService: Text analysis, custom words, filtering
- Public API routes: Configuration, location reporting, error handling
- Request validation: JSON parsing, content types, edge cases
Features:
- In-memory SQLite databases for isolated testing
- Comprehensive test setup with proper cleanup
- Mock profanity filters for controlled testing
- Type-safe test implementations with TypeScript
- Detailed test scenarios for edge cases and error conditions
All tests passing: 67 total tests across models and integration
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Install swagger-ui-express and swagger-jsdoc dependencies
- Create comprehensive OpenAPI 3.0 specification with detailed schemas
- Add interactive Swagger UI at /api-docs endpoint
- Document all public API endpoints (/api/config, /api/locations)
- Document admin authentication and management endpoints
- Include comprehensive request/response schemas and examples
- Add authentication documentation for admin endpoints
- Update CLAUDE.md with API documentation information
Features:
- Complete API specification with OpenAPI 3.0 standard
- Interactive documentation interface with Swagger UI
- Detailed request/response examples for all endpoints
- Authentication flows for admin functionality
- Error response documentation with examples
- Type-safe integration with existing TypeScript architecture
API Documentation available at: /api-docs
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Convert entire backend to TypeScript with strict type checking
- Add comprehensive type definitions and interfaces
- Create typed models for Location and ProfanityWord with database operations
- Convert all services to TypeScript (DatabaseService, ProfanityFilterService)
- Convert all API routes with proper request/response typing
- Add TypeScript build system and development scripts
- Update package.json with TypeScript dependencies and scripts
- Configure tsconfig.json with strict typing and build settings
- Update CLAUDE.md documentation for TypeScript development
- Add .gitignore rules for TypeScript build artifacts
Architecture improvements:
- Full type safety throughout the application
- Typed database operations and API endpoints
- Proper error handling with typed exceptions
- Strict optional property handling
- Type-safe dependency injection for routes
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Accept main branch's superior inline theme detection approach
- Keep architecture improvements from feature branch
- Maintain all new models/services layer functionality
- Preserve frontend refactoring with MapBase class
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add inline script to apply theme immediately in head
- Prevents flash of light mode before auto/dark theme applies
- Script runs before DOM parsing to avoid visual flicker
- Applied to all pages: index, admin, and privacy
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add CSS media query for prefers-color-scheme detection
- Auto theme now properly follows system dark/light preference
- Maintains 3-mode cycle: auto → light → dark → auto
- Rebuilds CSS with proper @media rules for [data-theme="auto"]
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Major architectural improvements:
- Created models/services layer for better separation of concerns
- Location model with async methods for database operations
- ProfanityWord model for content moderation
- DatabaseService for centralized database management
- ProfanityFilterService refactored to use models
- Refactored frontend map implementations to share common code
- MapBase class extracts 60-70% of duplicate functionality
- Refactored implementations extend MapBase for specific features
- Maintained unique geocoding capabilities per implementation
- Updated server.js to use new service architecture
- All routes now use async/await with models instead of raw queries
- Enhanced error handling and maintainability
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add immediate theme application in <head> section for all pages
- Prevents light mode flash when navigating in dark mode
- Script executes before body renders to apply saved theme
- Fixes flash when going from privacy policy back to home
- Maintains consistent theme experience across all pages
- Supports auto theme detection based on system preference
- Add missing #map CSS styles to fix map container display
- Fix auto theme detection by implementing proper system preference detection
- Update applyTheme function in all JS files to handle 'auto' theme correctly
- System theme changes are now properly detected and applied when in auto mode
- Create shared back-link-styles mixin in _mixins.scss for reusable button component
- Remove all duplicate back-link styling from .privacy-content .back-link and a.back-link
- Eliminate 15+ instances of !important declarations throughout privacy styles
- Use proper SCSS variables instead of hardcoded values for consistent spacing
- Add focus state to back-link mixin for accessibility compliance
- Use existing card mixin and flex-center mixin for consistent styling
- Replace hardcoded colors with CSS custom properties for theme compatibility
Benefits:
- DRY principle: One mixin defines all back-link styles
- Better maintainability: Changes in one place affect all instances
- Improved accessibility: Focus states for keyboard navigation
- Cleaner CSS: No !important declarations needed
- Theme consistency: Uses proper color variables
- Remove public/style.css.map from git tracking with git rm --cached
- CSS source maps are generated artifacts like the CSS file itself
- Already excluded in .gitignore but was previously tracked
- Keeps local file for development debugging but excludes from repo
- Add :focus pseudo-class to button mixin with outline styling
- Improves keyboard navigation accessibility for all buttons
- Uses currentColor for outline to adapt to different button styles
- Meets WCAG accessibility standards for focus visibility
- Update CSS source map after rebuild
- Remove all !important declarations from table cell styles in _index.scss
- Increase selector specificity by changing .location-cell to td.location-cell
- Change .details-cell to td.details-cell, .time-cell to td.time-cell, etc.
- This eliminates the need for !important while maintaining proper cascade order
- Follows CSS best practices for maintainable and readable stylesheets
- Added public/style.css to .gitignore
- Removed style.css from git tracking (git rm --cached)
- Enhanced package.json scripts for better CSS workflow:
- postinstall: Auto-builds CSS on npm install
- build-css:dev: Development build with source maps
- start: Now builds CSS before starting server
- dev: Builds CSS before development mode
- Updated README with CSS development documentation
- Explains SCSS organization and build process
- Documents all CSS-related npm scripts
Benefits:
✅ Cleaner repository (no generated files)
✅ Prevents merge conflicts in generated CSS
✅ Automatic CSS generation on new machine setup
✅ Source of truth is SCSS files only
✅ Consistent build process across environments
- Created src/scss/pages/_privacy.scss with all privacy page styles
- Moved all inline styles from privacy.html to proper CSS classes
- Replaced inline style attributes with semantic CSS classes:
- privacy-header__title-wrapper for header positioning
- privacy-header__title-content for centered title content
- privacy-header__theme-toggle for theme toggle button
- Maintained all existing functionality and styling
- Improved maintainability and consistency with SCSS architecture
- All styles now use CSS variables for theme compatibility
- Resolved conflicts in admin.html to keep CSS optimization changes
- Regenerated package-lock.json after merge
- All features from both branches are now integrated
- Add async initialize() method for reliable initialization waiting
- Add static create() factory method for easy async creation
- Add initialization state tracking with isInitialized flag
- Add warning system for methods called before full initialization
- Update server.js to use proper async initialization pattern
- Maintain backward compatibility with constructor-only usage
- Add accessibility improvement for reduced motion preferences in CSS
Fixes the race condition issue where consumers relied on arbitrary
timeouts instead of properly waiting for async initialization to complete.
- Add comprehensive no-op fallback profanity filter with all required methods
- Prevent runtime errors when profanity filter initialization fails
- Add startup logging to clearly indicate profanity filter status
- Include _isFallback property for monitoring and debugging
- Ensure all routes continue to function even with fallback filter
- Maintain security awareness with clear warning messages