Commit Graph

24 Commits

Author SHA1 Message Date
648731f347 fix: Handle missing package-lock.json in Docker build
Changed Dockerfile to conditionally use npm ci or npm install
depending on whether package-lock.json exists. This makes the
build more flexible while still preferring npm ci for
reproducibility when a lock file is available.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 08:08:34 -05:00
287284c2fe perf: Comprehensive efficiency optimizations
Implemented all 5 critical efficiency improvements to optimize
performance, reduce resource usage, and improve scalability.

## 1. Database Indexes
- Added indexes on sermon_notes foreign keys (user_id, sermon_id)
- Added composite index on sermons (archived, date DESC)
- Added indexes on frequently queried columns across all tables
- Impact: Faster queries as data grows, better JOIN performance

## 2. Eliminated N+1 Query Pattern
- Reduced 2 API calls to 1 on home page load
- Changed from separate active/archived fetches to single call
- Filter archived sermons client-side using computed properties
- Impact: 50% reduction in HTTP requests per page load

## 3. Scheduled Database Cleanup
- Extended existing plugin to clean expired sessions hourly
- Added cleanup for expired rate limits every hour
- Added cleanup for expired password reset codes every hour
- Sermon cleanup continues to run daily based on retention policy
- Impact: Prevents database table growth, better performance

## 4. Multi-stage Docker Build
- Implemented 3-stage build: deps -> builder -> runtime
- Separated build-time and runtime dependencies
- Added non-root user (nuxt:nodejs) for security
- Integrated dumb-init for proper signal handling
- Added health check endpoint at /api/health
- Impact: Smaller image size, faster deployments, better security

## 5. HTTP Caching
- Static assets: 1 year cache (immutable)
- Logos/images: 1 year cache (immutable)
- API routes: No cache (always fresh)
- HTML pages: 10 minute cache with revalidation
- Impact: Reduced bandwidth, faster page loads, less server load

All optimizations follow best practices and maintain backward
compatibility with existing functionality.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 08:01:45 -05:00
85c2aeb353 chore: Replace specific domain with generic example URL
Changes:
- docker-compose.yml: https://nlcc.rydertech.ushttps://church.example.com
- Dockerfile: https://nlcc.rydertech.ushttps://church.example.com
- README.md: https://nlcc.rydertech.ushttps://church.example.com

Rationale:
- Makes the repository more generic and reusable
- Users won't be confused by site-specific URLs
- Follows standard documentation practices using example.com
- Clearer that SITE_URL needs to be customized for each deployment

The example.com domain is reserved by IANA for documentation purposes,
making it the perfect choice for configuration templates.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 17:48:16 -05:00
d7ee2251a0 docs: Update Dockerfile and README for security improvements
Dockerfile Changes:
- Remove hardcoded AUTH_SECRET and admin credentials from build args
- Add security comments explaining auto-generation behavior
- Simplify environment variables to only required configurations
- Document how to retrieve auto-generated credentials from logs

README.md Updates:
- Comprehensive security features documentation
- Updated environment variables table with auto-generation info
- Detailed instructions for retrieving auto-generated credentials
- Added security compliance section (OWASP, NIST, best practices)
- Updated project structure to reflect all new security components
- Enhanced database schema documentation
- Added production security recommendations checklist
- Documented all implemented security features:
  * Auto-generated secrets
  * Password security (bcrypt, requirements, reset codes)
  * CSRF protection
  * Session management
  * Account lockout (dual-layer)
  * User management features

All documentation now accurately reflects the enterprise-grade
security implementation and simplified deployment process.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 17:43:11 -05:00
18fe670b47 Email SSPR fixes & user management improvements 2025-10-06 18:35:34 -04:00
2a6228629a dockerfile fixes 2025-10-02 11:32:50 -04:00
aa611a0e2c Add default value for AUTH_SECRET build argument in Dockerfile 2025-10-01 23:14:52 -04:00
966f1bae5d Make SITE_URL and AUTH_SECRET configurable via environment variables for any deployment 2025-10-01 23:12:22 -04:00
ec053fc538 Fix Dockerfile: use npm install instead of npm ci 2025-10-01 22:16:08 -04:00
1b282c05fe Complete sermon itinerary application with Nuxt 3, SQLite, authentication, and Docker deployment 2025-10-01 22:15:01 -04:00
793f395795 Starting over 2025-10-01 22:00:32 -04:00
fe4394241e Fix deployment issues: native modules, volume mapping, Nuxt 4 config 2025-10-01 21:41:13 -04:00
a36a97c9f9 feat: Implement multi-stage Dockerfile for robust Nuxt build 2025-10-01 21:25:20 -04:00
3a818dd609 fix: Update Dockerfile CMD to run Nuxt in production mode 2025-10-01 20:58:36 -04:00
Ryderjj89
62ec5427da Add build-base to Dockerfile for native module compilation 2025-10-01 18:29:01 -04:00
Ryderjj89
f3b612896a Add python3 to Dockerfile for better-sqlite3 compilation on Node 24 2025-10-01 18:25:35 -04:00
Ryderjj89
9129a9aa40 node 24-alpine 2025-10-01 18:22:00 -04:00
Ryderjj89
55e5267ffa Update to Node 22, use bcryptjs for better compatibility 2025-10-01 18:12:41 -04:00
Ryderjj89
eba89f987f Optimize Dockerfile: remove chown and USER for faster builds, add touch for database file 2025-09-29 20:12:29 -04:00
Ryderjj89
8b35f8cacf Fix modal visibility and database path issues for Docker deployment 2025-09-29 20:05:49 -04:00
Ryderjj89
3473b4480a Remove unnecessary chown permissions - node user inherits proper permissions 2025-09-29 19:31:39 -04:00
Ryderjj89
7d6af1059d Update Dockerfile to use Node.js 20 for compatibility with Nuxt 4 requirements 2025-09-29 19:07:52 -04:00
Ryderjj89
abd022277f Fix Docker build: use npm install --production and add npm start script 2025-09-29 19:01:56 -04:00
Ryderjj89
c033410c2e Complete sermon management system with Nuxt 4, authentication, SQLite database, QR codes, and Docker deployment 2025-09-29 18:59:31 -04:00