A comprehensive three-screen research platform that transforms research documents into interactive roadmaps, presentations, and reports using AI.
- 📊 Roadmap View - Interactive Gantt chart timeline
- 📽️ Slides View - Professional presentation mode
- 📄 Document View - Long-form report reader
- ⚡ Lazy Loading: Automatic image lazy loading with Intersection Observer API
- 📊 Performance Monitoring: Real-time performance metrics tracking
- 🎯 Web Vitals: LCP, FID, and CLS monitoring
- ⏱️ Optimized Bundle: Minimal initial load with deferred non-critical resources
- ♿ Keyboard Navigation: Full keyboard support with arrow keys (←→) and number keys (1, 2, 3)
- 🔊 Screen Reader Support: ARIA labels and live regions throughout
- 🎯 Focus Management: Proper focus trap in modals and dialogs
- 📋 Skip Links: Quick navigation to main content
- 🎨 Color Contrast: Verified contrast ratios meeting WCAG 2.1 AA standards
- ⌨️ Keyboard Shortcuts: Press
?for help
- 🔄 Automatic Retry: Exponential backoff for failed API calls
- 📝 Error Logging: Comprehensive error tracking and logging
- 💬 User-Friendly Messages: Clear error messages with actionable steps
- 🎯 Error Recovery: Retry buttons and graceful degradation
# Clone the repository
git clone https://github.com/yourusername/force.git
cd force
# Install dependencies
npm install
# Start the server
npm start-
Upload Research Documents
Navigate to http://localhost:3000 Upload your research files (PDF, TXT, etc.) Enter a research prompt -
Wait for Generation
AI generates three views simultaneously: - Roadmap (Gantt chart) - Slides (Presentation) - Document (Report) -
View and Navigate
Use the tabs to switch between views Or use keyboard shortcuts: 1, 2, 3 Or arrow keys: ← →
| Key | Action |
|---|---|
1 |
Navigate to Roadmap view |
2 |
Navigate to Slides view |
3 |
Navigate to Document view |
← |
Previous view |
→ |
Next view |
? |
Show keyboard shortcuts help |
Esc |
Close dialog or clear focus |
POST /api/content/generate
Content-Type: multipart/form-data
files: [File]
prompt: stringResponse:
{
"jobId": "uuid",
"sessionId": "uuid"
}GET /api/content/:sessionId/:viewTypeResponse:
{
"status": "completed",
"data": {...},
"generatedAt": "2025-11-24T00:00:00.000Z"
}Frontend:
- Vanilla JavaScript (ES6 modules)
- Custom Design System (Google Docs-inspired)
- StateManager for reactive state management
- Hash-based routing
Backend:
- Node.js + Express
- SQLite (better-sqlite3)
- Google Gemini AI
- Zod for validation
Phase 6 Utilities:
- LazyLoader.js - Lazy loading with Intersection Observer
- Performance.js - Performance monitoring and optimization
- Accessibility.js - WCAG 2.1 AA compliance utilities
- ErrorHandler.js - Comprehensive error handling
force/
├── Public/
│ ├── components/
│ │ ├── shared/
│ │ │ ├── StateManager.js # State management
│ │ │ ├── LazyLoader.js # Lazy loading (Phase 6)
│ │ │ ├── Performance.js # Performance monitoring (Phase 6)
│ │ │ ├── Accessibility.js # Accessibility utilities (Phase 6)
│ │ │ └── ErrorHandler.js # Error handling (Phase 6)
│ │ └── views/
│ │ ├── SlidesView.js # Slides component
│ │ └── DocumentView.js # Document component
│ ├── styles/
│ │ ├── design-system.css # Design tokens
│ │ ├── app-shell.css # App layout
│ │ ├── roadmap-view.css # Roadmap styles
│ │ ├── slides-view.css # Slides styles
│ │ └── document-view.css # Document styles
│ ├── viewer.html # Main viewer page
│ ├── viewer.js # Viewer orchestrator
│ └── index.html # Upload page
├── server/
│ ├── db.js # SQLite database
│ ├── generators.js # Content generation
│ ├── prompts/
│ │ ├── roadmap.js # Roadmap prompt
│ │ ├── slides.js # Slides prompt
│ │ └── document.js # Document prompt
│ └── routes/
│ └── content.js # API routes
└── server.js # Express server
# Start with auto-reload
npm run dev
# Run with debug logging
DEBUG=true npm start
# Enable performance monitoring
npm start -- --debug=trueAccess viewer with ?debug=true to enable Web Vitals monitoring:
http://localhost:3000/viewer.html?sessionId=xxx&debug=true
Console output will show:
- LCP (Largest Contentful Paint)
- FID (First Input Delay)
- CLS (Cumulative Layout Shift)
- API call timings
- Render timings
-
Keyboard Navigation Testing
- Tab through all interactive elements - Test all keyboard shortcuts (1, 2, 3, ←, →, ?) - Verify focus visibility -
Screen Reader Testing
# macOS VoiceOver: Cmd+F5 # Windows NVDA: https://www.nvaccess.org/download/ -
Color Contrast Testing
import { checkColorContrast } from './Public/components/shared/Accessibility.js'; const result = checkColorContrast('#000000', '#ffffff'); console.log(result.aaNormal); // true
npm testnpm run test:integrationnpm run test:e2eThe application includes comprehensive error handling with automatic retry logic:
- NetworkError: Connection issues
- APIError: Server errors
- ValidationError: Invalid input
- PermissionError: Access denied
- NotFoundError: Resource not found
- TimeoutError: Request timeout
API calls automatically retry with exponential backoff:
- Initial delay: 1 second
- Max retries: 3
- Backoff factor: 2x
Errors are logged with severity levels:
- Low: Informational (e.g., content still processing)
- Medium: Recoverable errors
- High: Serious errors requiring attention
- Critical: System-level failures
View error logs:
import { getErrorLog } from './Public/components/shared/ErrorHandler.js';
const errors = getErrorLog(50); // Last 50 errors
console.log(errors);Use lazy loading for images:
<!-- Instead of: -->
<img src="image.jpg" alt="Description">
<!-- Use: -->
<img data-src="image.jpg" alt="Description">The LazyLoader will automatically load images when they enter the viewport.
Large components can be lazy loaded:
import { lazyLoadComponent } from './Public/components/shared/LazyLoader.js';
const container = document.getElementById('chart');
lazyLoadComponent(container, async () => {
const { GanttChart } = await import('./GanttChart.js');
new GanttChart(container).render();
});Track custom metrics:
import { markPerformance, measurePerformance } from './Public/components/shared/Performance.js';
markPerformance('operation-start');
// ... perform operation ...
markPerformance('operation-end');
const duration = measurePerformance('operation', 'operation-start', 'operation-end');
console.log(`Operation took ${duration}ms`);-
Always provide alt text for images
<img src="chart.png" alt="Gantt chart showing project timeline">
-
Use semantic HTML
<main>, <nav>, <article>, <section>, <header>, <footer>
-
Add ARIA labels to interactive elements
<button aria-label="Close dialog">×</button>
-
Ensure keyboard accessibility
element.addEventListener('click', handleClick); element.addEventListener('keydown', (e) => { if (e.key === 'Enter' || e.key === ' ') { handleClick(); } });
-
Test with reduced motion
import { prefersReducedMotion } from './Public/components/shared/Performance.js'; if (!prefersReducedMotion()) { element.classList.add('animated'); }
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the existing code style
- Add JSDoc comments to all public functions
- Write tests for new features
- Ensure accessibility compliance
- Update documentation
MIT License - see LICENSE file for details
New Features:
- ✅ Unified upload endpoint generates all three views (roadmap, slides, document)
- ✅ Parallel content generation in background
- ✅ Seamless integration with three-view viewer
- ✅ Full backward compatibility with legacy charts
Implementation:
- Updated
/api/content/generateto accept file uploads via multipart/form-data - Added file processing for DOCX, TXT, and other formats
- Frontend now uses Phase 2 API for new uploads
- Legacy
/generate-chartendpoint maintained for compatibility
Performance:
- ✅ Lazy loading for images and components
- ✅ Performance monitoring with Web Vitals
- ✅ Optimized bundle size
- ✅ Debounce and throttle utilities
Accessibility:
- ✅ WCAG 2.1 AA compliance
- ✅ Comprehensive keyboard navigation
- ✅ Screen reader support
- ✅ Color contrast verification
- ✅ Focus management
Error Handling:
- ✅ Automatic retry with exponential backoff
- ✅ User-friendly error messages
- ✅ Error logging and tracking
- ✅ Graceful error recovery
Documentation:
- ✅ Complete README
- ✅ JSDoc comments
- ✅ API documentation
- ✅ Accessibility guidelines
- ✅ Unified viewer with three-view navigation
- ✅ Hash-based routing
- ✅ View-specific state management
- ✅ Seamless view switching
- ✅ DocumentView component
- ✅ Table of contents with scroll spy
- ✅ Multiple content block types
- ✅ Print-optimized layout
- ✅ SlidesView component
- ✅ Slide navigation
- ✅ Fullscreen mode
- ✅ 5+ slide templates
- ✅ AI-powered content generation
- ✅ Parallel generation for all views
- ✅ API endpoints
- ✅ Job status tracking
- ✅ Google Docs-inspired design
- ✅ CSS design tokens
- ✅ App shell layout
- ✅ Responsive design
- ✅ SQLite database
- ✅ StateManager
- ✅ Project structure
For issues and questions:
- GitHub Issues: https://github.com/yourusername/force/issues
- Email: support@example.com
- Google Gemini AI for content generation
- The open-source community for libraries and inspiration
- WCAG guidelines for accessibility standards