HIGH PRIORITY: Fixes production 404 error on research inquiry form
Research Inquiry API:
- Add POST /api/research-inquiry endpoint for form submissions
- Add admin endpoints for inquiry management (list, get, assign, respond, delete)
- Create ResearchInquiry model with MongoDB integration
- Add to moderation queue for human review (strategic quadrant)
- Include rate limiting (5 req/min) and CSRF protection
- Tested locally: endpoint responding, data saving to DB
Umami Analytics (Privacy-First):
- Add Docker Compose config for Umami + PostgreSQL
- Create nginx reverse proxy config with SSL support
- Implement privacy-first tracking script (DNT, opt-out, no cookies)
- Integrate tracking across 26 public HTML pages
- Exclude admin pages from tracking (privacy boundary)
- Add comprehensive deployment guide (UMAMI_SETUP_GUIDE.md)
- Environment variables added to .env.example
Files Created (9):
- src/models/ResearchInquiry.model.js
- src/controllers/research.controller.js
- src/routes/research.routes.js
- public/js/components/umami-tracker.js
- deployment-quickstart/nginx-analytics.conf
- deployment-quickstart/UMAMI_SETUP_GUIDE.md
- scripts/add-umami-tracking.sh
- scripts/add-tracking-python.py
- SESSION_SUMMARY_ANALYTICS_RESEARCH_INQUIRY.md
Files Modified (29):
- src/routes/index.js (research routes)
- deployment-quickstart/docker-compose.yml (umami services)
- deployment-quickstart/.env.example (umami config)
- 26 public HTML pages (tracking script)
Values Alignment:
✅ Privacy-First Design (cookie-free, DNT honored, opt-out available)
✅ Human Agency (research inquiries require human review)
✅ Data Sovereignty (self-hosted analytics, no third-party sharing)
✅ GDPR Compliance (no personal data in analytics)
✅ Transparency (open-source tools, documented setup)
Testing Status:
✅ Research inquiry: Locally tested, data verified in MongoDB
⏳ Umami analytics: Pending production deployment
Next Steps:
1. Deploy to production (./scripts/deploy.sh)
2. Test research form on live site
3. Deploy Umami following UMAMI_SETUP_GUIDE.md
4. Update umami-tracker.js with website ID after setup
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Create Economist SubmissionTracking package correctly:
* mainArticle = full blog post content
* coverLetter = 216-word SIR— letter
* Links to blog post via blogPostId
- Archive 'Letter to The Economist' from blog posts (it's the cover letter)
- Fix date display on article cards (use published_at)
- Target publication already displaying via blue badge
Database changes:
- Make blogPostId optional in SubmissionTracking model
- Economist package ID: 68fa85ae49d4900e7f2ecd83
- Le Monde package ID: 68fa2abd2e6acd5691932150
Next: Enhanced modal with tabs, validation, export
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
SUMMARY:
Completed Phase 3 Task 3.4.1 - Enhanced the 27027 incident demo page
with interactive playback controls, service status visualization, and
clickable step navigation for better user engagement.
NEW FEATURES:
1. Clickable Step Navigation:
- Users can click any step to jump directly to it
- Steps highlight on hover with shadow effect
- Manual navigation shows progress panel and service status
- Disabled during auto-play to prevent conflicts
2. Playback Speed Controls:
- Three speed options: Slow (4s), Normal (2.5s), Fast (1s)
- Visual button state shows selected speed
- Speed persists during playback
- Default: Normal speed
3. Service Status Visualization:
- New panel shows active Tractatus services
- InstructionPersistence highlights on Step 6 (purple ring)
- CrossReferenceValidator highlights on Step 7 (purple ring)
- Service icons use brand colors (indigo/purple)
- Smooth opacity transitions
4. Enhanced Visual Feedback:
- Steps now reset properly when navigating backward
- Future steps return to pending state
- Hover effects on all steps
- Smooth scroll behavior
- Better state management (pending/active/complete/error)
5. Improved UX:
- Service status hidden until first interaction
- Progress panel shows after first play/click
- Reset clears all state including services
- Click handlers respect auto-play state
TECHNICAL DETAILS:
JavaScript (27027-demo.js):
- Added playbackSpeed variable and speedDelays mapping
- Enhanced initTimeline() with click handlers for navigation
- Updated playScenario() to use speed setting
- New updateServiceStatus() function for service highlighting
- Enhanced showStep() to handle forward/backward navigation
- Updated resetScenario() to clear service status
HTML (27027-demo.html):
- Added speed control buttons (Slow/Normal/Fast)
- Added service status panel with 2 services
- Service indicators use brand colors
- All controls use Tailwind utility classes
DESIGN PATTERNS:
- Brand-consistent colors (indigo-600, purple-600)
- Smooth 300ms transitions
- Responsive design maintained
- CSP compliant (no inline handlers)
IMPACT:
Users can now:
✓ Control playback speed for better comprehension
✓ Jump to specific steps for review
✓ See which Tractatus services activate at each step
✓ Understand the architectural intervention visually
This completes all Phase 3 interactive features. Demo is now
production-ready for deployment.
🤖 Generated with Claude Code (https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add professional README for public repository with code examples
- Fix all broken documentation links across 4 markdown files
- Add favicon to all HTML pages (eliminates 404 errors)
- Redesign Experience section with 4-card incident grid
- Add GitHub section to docs.html sidebar with repository links
- Migrate 4 new case studies to database (19 total documents)
- Generate 26 PDFs for public download
- Add automated sync GitHub Action for public repository
- Add security validation for public documentation sync
- Update docs-app.js to categorize research topics
Mobile responsive, accessibility compliant, production ready.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
**Cache-Busting Improvements:**
- Switched from timestamp-based to semantic versioning (v1.0.2)
- Updated all HTML files: index.html, docs.html, leader.html
- CSS: tailwind.css?v=1.0.2
- JS: navbar.js, document-cards.js, docs-app.js v1.0.2
- Professional versioning approach for production stability
**systemd Service Implementation:**
- Created tractatus-dev.service for development environment
- Created tractatus-prod.service for production environment
- Added install-systemd.sh script for easy deployment
- Security hardening: NoNewPrivileges, PrivateTmp, ProtectSystem
- Resource limits: 1GB dev, 2GB prod memory limits
- Proper logging integration with journalctl
- Automatic restart on failure (RestartSec=10)
**Why systemd over pm2:**
1. Native Linux integration, no additional dependencies
2. Better OS-level security controls (ProtectSystem, ProtectHome)
3. Superior logging with journalctl integration
4. Standard across Linux distributions
5. More robust process management for production
**Usage:**
# Development:
sudo ./scripts/install-systemd.sh dev
# Production:
sudo ./scripts/install-systemd.sh prod
# View logs:
sudo journalctl -u tractatus -f
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Created Apache License 2.0 LICENSE file
- Removed all MIT License references from HTML pages
- Updated all footers with Apache 2.0 license links
- Updated about.html with comprehensive license section explaining why Apache 2.0
- Added patent protection, contributor clarity, and community standard benefits
- Updated package.json license field to "Apache-2.0"
- Updated README.md with Apache 2.0 license information
- Deployed LICENSE file to production server (accessible at /LICENSE)
Why Apache 2.0 over MIT:
- Patent protection for users
- Clear contribution terms
- Permissive use (commercial, modification, distribution)
- Community standard in AI/ML projects (TensorFlow, PyTorch, Apache Spark)
All pages cache-busted and deployed with v1759833751
🤖 Generated with Claude Code (https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added navigation bar to index.html with links to all main sections
- Added "About" link to all page navigation menus
- Fixed "View Live API Status" button - changed from /api/governance (Phase 2) to 27027 demo
- Removed "Framework Status" footer link (Phase 2 backend work)
- Updated footer resources section with complete site navigation
- Cache-busted all pages for deployment
Navigation now consistent across all pages: Researcher, Implementer, Advocate, Documentation, About, Home
🤖 Generated with Claude Code (https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Created /about.html with mission, values, framework overview
- Created /about/values.html with comprehensive values statement
- Included respectful Te Tiriti o Waitangi acknowledgment
- Added CARE Principles for Indigenous Data Governance
- Documented digital sovereignty and Māori data sovereignty
- Updated all page footers with Te Tiriti acknowledgment
- Added links to Te Mana Raraunga and indigenous data resources
- Cache-busted all HTML files for deployment
🤖 Generated with Claude Code (https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fixed download icon size (1.25rem instead of huge black icons)
- Uploaded all 12 PDFs to production server
- Restored table of contents rendering for all documents
- Fixed modal cards with proper CSS and event handlers
- Replaced all docs-viewer.html links with docs.html
- Added nginx redirect from /docs/* to /docs.html
- Fixed duplicate headers in modal sections
- Improved cache-busting with timestamp versioning
All documentation features now working correctly:
✅ Card-based document viewer with modals
✅ PDF downloads with proper icons
✅ Table of contents navigation
✅ Consistent URL structure
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Implemented three core frontend pages using Tailwind CSS:
1. Homepage (index.html):
- Hero section explaining framework value proposition
- Three audience paths: Researcher, Implementer, Advocate
- Framework capabilities showcase (6 core capabilities)
- Te Tiriti acknowledgment in footer
- Links to demos, documentation, and API
2. Documentation Viewer (docs.html):
- Sidebar navigation with document list from /api/documents
- Main content area with prose styling for technical docs
- Automatic table of contents generation
- Responsive grid layout (4-column on desktop)
3. Interactive Tractatus Demo (demos/tractatus-demo.html):
- Four interactive demonstration tabs:
* 27027 incident prevention (side-by-side comparison)
* Live instruction classification (STR/OPS/TAC/SYS/STO)
* Boundary enforcement examples (Tractatus 12.1-12.7)
* Context pressure monitoring with interactive sliders
- Real-time API integration with governance services
- Visual comparison of WITH/WITHOUT framework behavior
All pages tested and operational with governance API endpoints.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>