Danny Stocker
841c9ac92e
docs(audit): Add complete forensic audit reports and remediation toolkit
...
Phase 1: Git Repository Audit (4 Agents, 2,438 files)
- GLOBAL_VISION_REPORT.md - Master audit synthesis (health score 8/10)
- ARCHAEOLOGIST_REPORT.md - Roadmap reconstruction (3 phases, no abandonments)
- INSPECTOR_REPORT.md - Wiring analysis (9/10, zero broken imports)
- SEGMENTER_REPORT.md - Functionality matrix (6/6 core features complete)
- GITEA_SYNC_STATUS_REPORT.md - Sync gap analysis (67 commits behind)
Phase 2: Multi-Environment Audit (3 Agents, 991 files)
- LOCAL_FILESYSTEM_ARTIFACTS_REPORT.md - 949 files scanned, 27 ghost files
- STACKCP_REMOTE_ARTIFACTS_REPORT.md - 14 deployment files, 12 missing from Git
- WINDOWS_DOWNLOADS_ARTIFACTS_REPORT.md - 28 strategic docs recovered
- PHASE_2_DELTA_REPORT.md - Cross-environment delta analysis
Remediation Kit (3 Agents)
- restore_chaos.sh - Master recovery script (1,785 lines, 23 functions)
- test_search_wiring.sh - Integration test suite (10 comprehensive tests)
- ELECTRICIAN_INDEX.md - Wiring fixes documentation
- REMEDIATION_COMMANDS.md - CLI command reference
Redis Knowledge Base
- redis_ingest.py - Automated ingestion (397 lines)
- forensic_surveyor.py - Filesystem scanner with Redis integration
- REDIS_INGESTION_*.md - Complete usage documentation
- Total indexed: 3,432 artifacts across 4 namespaces (1.43 GB)
Dockerfile Updates
- Enabled wkhtmltopdf for PDF export
- Multi-stage Alpine Linux build
- Health check endpoint configured
Security Updates
- Updated .env.example with comprehensive variable documentation
- server/index.js modified for api_search route integration
Audit Summary:
- Total files analyzed: 3,429
- Total execution time: 27 minutes
- Agents deployed: 7 (4 Phase 1 + 3 Phase 2)
- Health score: 8/10 (production ready)
- No lost work detected
- No abandoned features
- Zero critical blockers
Launch Status: APPROVED for December 10, 2025
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 15:18:15 +01:00
Claude
c0486e3f4d
[SESSION-3] Add organization timeline feature
...
- Database: activity_log table with indexes
- Backend: Activity logger service + timeline API
- Frontend: Timeline.vue with date grouping and filtering
- Integration: Upload route logs activity
- UI: Modern timeline with infinite scroll
Backend changes:
- migrations/010_activity_timeline.sql: Activity log schema
- services/activity-logger.js: Log events to timeline
- routes/timeline.js: GET /api/organizations/:orgId/timeline
- routes/upload.js: Integrate activity logging
- index.js: Register timeline route
Frontend changes:
- views/Timeline.vue: Timeline component with date grouping
- router.js: Add /timeline route with auth
- views/HomeView.vue: Add Timeline navigation button
Features:
- Reverse chronological event feed
- Date grouping (Today, Yesterday, This Week, etc.)
- Event type filtering (uploads, maintenance, etc.)
- Infinite scroll pagination
- User attribution
- Links to source documents
Resolves: Timeline feature spec
2025-11-13 12:38:02 +00:00
Danny Stocker
58b344aa31
FINAL: P0 blockers fixed + Joe Trader + ignore binaries
...
Fixed:
- Price: €800K-€1.5M, Sunseeker added
- Agent 1: Joe Trader persona + actual sale ads research
- Ignored meilisearch binary + data/ (too large for GitHub)
- SESSION_DEBUG_BLOCKERS.md created
Ready for Session 1 launch.
🤖 Generated with Claude Code
2025-11-13 01:29:59 +01:00
ggq-admin
d147ebbca7
feat: Phase 1 - Authentication foundation
...
Implement complete JWT-based authentication system with comprehensive security features:
Database:
- Migration 005: Add 4 new tables (refresh_tokens, password_reset_tokens, audit_log, entity_permissions)
- Enhanced users table with email verification, account status, lockout protection
Services:
- auth.service.js: Full authentication lifecycle (register, login, refresh, logout, password reset, email verification)
- audit.service.js: Comprehensive security event logging and tracking
Routes:
- auth.routes.js: 9 authentication endpoints (register, login, refresh, logout, profile, password operations, email verification)
Middleware:
- auth.middleware.js: Token authentication, email verification, account status checks
Security Features:
- bcrypt password hashing (cost 12)
- JWT access tokens (15-minute expiry)
- Refresh tokens (7-day expiry, SHA256 hashed, revocable)
- Account lockout (5 failed attempts = 15 minutes)
- Token rotation on password reset
- Email verification workflow
- Comprehensive audit logging
Scripts:
- run-migration.js: Automated database migration runner
- test-auth.js: Comprehensive test suite (10 tests)
- check-audit-log.js: Audit log verification tool
All tests passing. Production-ready implementation.
🤖 Generated with Claude Code
2025-10-21 10:11:34 +02:00
ggq-admin
fb88b291de
feat: Add interactive Table of Contents navigation with i18n support
...
Implements complete TOC feature for document navigation with bilingual support.
## TOC Detection & Extraction
- Pattern-based TOC detection with 3 regex patterns
- Heuristic validation (30%+ match ratio, 5+ entries, sequential pages)
- Hierarchical section key parsing (e.g., "4.1.2" → level 3, parent "4.1")
- Database schema with parent-child relationships
- Automatic extraction during OCR post-processing
- Server-side LRU caching (200 entries, 30min TTL)
## UI Components
- TocSidebar: Collapsible sidebar (320px) with auto-open on TOC presence
- TocEntry: Recursive component for hierarchical rendering
- Flex layout: Sidebar + PDF viewer side-by-side
- Active page highlighting with real-time sync
- localStorage persistence for sidebar state
## Navigation Features
- Click TOC entry → PDF jumps to page
- Deep link support: URL hash format #p=12
- Page change events: navidocs:pagechange custom event
- URL hash updates on all navigation (next/prev/goTo/TOC)
- Hash change listener for external navigation
- Page clamping and validation
## Search Integration
- "Jump to section" button in search results
- Shows when result has section field
- Navigates to document with page number and hash
## Accessibility
- ARIA attributes: role, aria-label, aria-expanded, aria-current
- Keyboard navigation: Enter/Space on entries, Tab focus
- Screen reader support with aria-live regions
- Semantic HTML with proper list/listitem roles
## Internationalization (i18n)
- Vue I18n integration with vue-i18n package
- English and French translations
- 8 TOC-specific translation keys
- Language switcher component in document viewer
- Locale persistence in localStorage
## Error Handling
- Specific error messages for each failure case
- Validation before processing (doc exists, has pages, has OCR)
- Non-blocking TOC extraction (doesn't fail OCR jobs)
- Detailed error returns: {success, error, entriesCount, pages}
## API Endpoints
- GET /api/documents/:id/toc?format=flat|tree
- POST /api/documents/:id/toc/extract
- Cache invalidation on re-extraction
## Testing
- Smoke test script: 9 comprehensive tests
- E2E testing guide with 5 manual scenarios
- Tests cover: API, caching, validation, navigation, search
## Database
- Migration 002: document_toc table
- Fields: id, document_id, title, section_key, page_start, level, parent_id, order_index
- Foreign keys with CASCADE delete
## Files Changed
- New: TocSidebar.vue, TocEntry.vue, LanguageSwitcher.vue
- New: toc-extractor.js, toc.js routes, i18n setup
- Modified: DocumentView.vue (sidebar, deep links, events)
- Modified: SearchView.vue (Jump to section button)
- Modified: ocr-worker.js (TOC post-processing)
- New: toc-smoke-test.sh, TOC_E2E_TEST.md
Generated with Claude Code (https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 13:22:45 +02:00
ggq-admin
d03b10697c
Add statistics dashboard feature
...
Backend changes:
- Created /api/stats endpoint in server/routes/stats.js
- Provides system overview (documents, pages, storage)
- Shows document status breakdown
- Lists recent uploads and documents
- Calculates health score
- Registered stats route in server/index.js
Frontend changes:
- Created StatsView.vue with responsive dashboard layout
- Added 4 overview metric cards (documents, pages, storage, health)
- Document status breakdown section
- Recent uploads chart (last 7 days)
- Recent documents list with click-to-view
- Added /stats route to router.js
- Added Stats button to HomeView header navigation
Features:
- Real-time statistics with refresh button
- Loading and error states
- Responsive grid layout
- Click on recent docs to view details
- Formatted timestamps and file sizes
- Health score calculation (success vs failed ratio)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 03:49:39 +02:00
ggq-admin
e4b1f73a46
Add comprehensive logging system with colored output
...
- Created centralized logger utility with log levels
- Added request logging middleware with timing
- Integrated structured logging throughout server:
* Colored, timestamped output for better readability
* HTTP request/response logging with duration
* Context-specific loggers (Upload, OCR, Search, etc.)
* Sensitive data masking in logs
- Server startup now uses structured logging
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 01:57:56 +02:00
ggq-admin
d461c5742f
Fix search, add PDF text selection, clean duplicates, implement auto-fill
...
This commit addresses multiple critical fixes and adds new functionality
for the NaviDocs local testing environment (port 8083):
Search Fixes:
- Fixed search to use backend /api/search instead of direct Meilisearch
- Resolves network accessibility issue when accessing from external IPs
- Search now works from http://172.29.75.55:8083/search
PDF Text Selection:
- Added PDF.js text layer for selectable text
- Imported pdf_viewer.css for proper text layer styling
- Changed text layer opacity to 1 for better interaction
- Added user-select: text for improved text selection
- Pink selection highlight (rgba(255, 92, 178, 0.3))
Database Cleanup:
- Created cleanup scripts to remove 20 duplicate documents
- Removed 753 orphaned entries from Meilisearch index
- Cleaned 17 document folders from filesystem
- Kept only newest version of each document
- Scripts: clean-duplicates.js, clean-meilisearch-orphans.js
Auto-Fill Feature:
- New /api/upload/quick-ocr endpoint for first-page OCR
- Automatically extracts metadata from PDFs on file selection
- Detects: boat make, model, year, name, and document title
- Checks both OCR text and filename for boat name
- Auto-fills upload form with extracted data
- Shows loading indicator during metadata extraction
- Graceful fallback to filename if OCR fails
Tenant Management:
- Updated organization ID to use boat name as tenant
- Falls back to "Liliane 1" for single-tenant setup
- Each boat becomes a unique tenant in the system
Files Changed:
- client/src/views/DocumentView.vue - Text layer implementation
- client/src/composables/useSearch.js - Backend API integration
- client/src/components/UploadModal.vue - Auto-fill feature
- server/routes/quick-ocr.js - OCR endpoint (new)
- server/index.js - Route registration
- server/scripts/* - Cleanup utilities (new)
Testing:
All features tested on local deployment at http://172.29.75.55:8083
- Backend: http://localhost:8001
- Frontend: http://localhost:8083
- Meilisearch: http://localhost:7700
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 01:35:06 +02:00
ggq-admin
19d90f50ca
Add image retrieval API endpoints
...
Implemented three new REST endpoints for serving extracted images from documents:
- GET /api/documents/:id/images - Returns all images for a document
- GET /api/documents/:id/pages/:pageNum/images - Returns images for specific page
- GET /api/images/:imageId - Streams image file (PNG/JPEG) with proper headers
Features:
- Full access control verification using existing auth patterns
- Secure file serving with path traversal protection
- Proper Content-Type and caching headers
- Rate limiting for image endpoints
- Comprehensive error handling for invalid IDs and missing files
- JSON responses with image metadata including OCR text and positioning
Testing:
- Created comprehensive test suite (test-image-endpoints.sh)
- All endpoints tested with curl and verified working
- Error cases properly handled (404, 403, 400)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-19 19:57:49 +02:00
ggq-admin
155a8c0305
feat: NaviDocs MVP - Complete codebase extraction from lilian1
...
## Backend (server/)
- Express 5 API with security middleware (helmet, rate limiting)
- SQLite database with WAL mode (schema from docs/architecture/)
- Meilisearch integration with tenant tokens
- BullMQ + Redis background job queue
- OCR pipeline with Tesseract.js
- File safety validation (extension, MIME, size)
- 4 API route modules: upload, jobs, search, documents
## Frontend (client/)
- Vue 3 with Composition API (<script setup>)
- Vite 5 build system with HMR
- Tailwind CSS (Meilisearch-inspired design)
- UploadModal with drag-and-drop
- FigureZoom component (ported from lilian1)
- Meilisearch search integration with tenant tokens
- Job polling composable
- Clean SVG icons (no emojis)
## Code Extraction
- ✅ manuals.js → UploadModal.vue, useJobPolling.js
- ✅ figure-zoom.js → FigureZoom.vue
- ✅ service-worker.js → client/public/service-worker.js (TODO)
- ✅ glossary.json → Merged into Meilisearch synonyms
- ❌ Discarded: quiz.js, persona.js, gamification.js (Frank-AI junk)
## Documentation
- Complete extraction plan in docs/analysis/
- README with quick start guide
- Architecture summary in docs/architecture/
## Build Status
- Server dependencies: ✅ Installed (234 packages)
- Client dependencies: ✅ Installed (160 packages)
- Client build: ✅ Successful (2.63s)
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-19 01:55:44 +02:00