This repository contains the refactored Openwater community website with dynamic features and improved onboarding for developers, researchers, and clinicians.
- Dynamic Content: Automatically pull GitHub stats, activity feeds, and contributor data
- Three Pathways: Clear onboarding for Developers, Researchers, and Clinicians
- Improved UX: Interactive onboarding wizard with progress tracking
- Automation: Streamlined GitHub organization access requests
Completed: 2025-02-09
Implemented:
- ✅ JavaScript module architecture (ES6 modules)
- ✅ Cache Manager with localStorage and TTL
- ✅ GitHub Stats module with rate limit handling
- ✅ GitHub Actions workflow (6-hour schedule)
- ✅ Activity feed data fetching
- ✅ Contributor leaderboard aggregation
- ✅ Static fallback data system
Completed: 2025-02-09
Implemented:
- ✅ Activity feed component (commits, PRs, issues)
- ✅ Contributor leaderboard with rankings and badges
- ✅ Discord widget integration (member count, channels)
- ✅ Comprehensive styling matching Openwater design
- ✅ Test page demonstrating all features
Completed: 2025-02-09
Implemented:
- ✅ Researcher pathway page (researchers.html) with 5 sections
- ✅ Clinician pathway page (clinicians.html) with 5 sections
- ✅ Enhanced Get Started page (get-started.html) with pathway selector
- ✅ Enhanced Community page (community.html) with all Phase 2 features
- ✅ Interactive pathway selection and forms
- ✅ Placeholder content marked for stakeholder input
Completed: 2025-02-09
Implemented:
- ✅ Onboarding flow JavaScript module (onboarding-flow.js)
- ✅ LocalStorage progress persistence with auto-save
- ✅ Dynamic content switching based on pathway selection
- ✅ Interactive checklist with smooth animations
- ✅ Form integration with auto-fill from saved state
- ✅ Quick actions bar with dynamic Discord member count
- ✅ FAQ accordion with smooth scroll
- ✅ Progress tracking with celebration on completion
- ✅ State management with getState() and resetProgress() methods
Completed: 2025-02-09
Implemented:
- ✅ GitHub Actions workflow for automated issue responses
- ✅ Issue template for standardized access requests (
.github/ISSUE_TEMPLATE/org-access-request.yml) - ✅ Automated validation of GitHub usernames
- ✅ Welcome comment with pathway-specific resources
- ✅ Discord webhook integration (optional)
- ✅ Maintainer documentation (
docs/MAINTAINERS-ORG-ACCESS.md) - ✅ API integration guide (
docs/API-INTEGRATION.md) - ✅ Netlify serverless function (
netlify/functions/submit-org-access.js) - ✅ Form submission with fallback to manual issue creation
- ✅ Rate limiting and input validation
- ✅ Error handling with user-friendly messages
- Cross-browser testing
- Accessibility audit
- Performance optimization
- Documentation review
- Phase 7: Update related repositories
- Phase 8: Launch & monitoring
-
Client-Side JavaScript (
js/modules/)- Fetches live data from GitHub API
- Caches in localStorage (30-min TTL)
- Falls back gracefully when rate limited
-
GitHub Actions (
.github/workflows/update-stats.yml)- Runs every 6 hours with authenticated token
- Pre-fetches data to
data/*.jsonfiles - Avoids client-side rate limits
-
Static Fallback (
data/)- Pre-fetched JSON files
- Used when API is rate limited
- Updated automatically by GitHub Actions
openwater-community/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── config.yml # Issue template configuration
│ │ └── org-access-request.yml # Organization access request template
│ └── workflows/
│ ├── update-stats.yml # Scheduled data refresh (every 6 hours)
│ └── org-access-automation.yml # Automated org access workflow
├── data/ # Pre-fetched static data
│ ├── github-stats.json
│ ├── repos.json
│ ├── recent-activity.json
│ ├── activity-feed.json
│ └── contributor-leaderboard.json
├── docs/ # Documentation
│ ├── MAINTAINERS-ORG-ACCESS.md # Maintainer guide for org access
│ └── API-INTEGRATION.md # API integration guide
├── js/
│ ├── modules/
│ │ ├── cache-manager.js # localStorage caching with TTL
│ │ ├── github-stats.js # GitHub API integration
│ │ ├── activity-feed.js # Activity feed display
│ │ ├── contributor-board.js # Contributor leaderboard
│ │ ├── discord-widget.js # Discord integration
│ │ └── onboarding-flow.js # Interactive onboarding wizard
│ └── main.js # Module initialization
├── netlify/
│ └── functions/
│ └── submit-org-access.js # Serverless function for form submission
├── scripts/
│ ├── fetch-activity.js # Fetches commits, PRs, issues
│ └── fetch-contributors.js # Aggregates contributor data
├── wireframes/ # HTML wireframes for new pages
│ ├── get-started-enhanced.html
│ ├── researchers.html
│ ├── clinicians.html
│ └── community-enhanced.html
├── get-started.html # Central onboarding hub (Phase 3)
├── researchers.html # Researcher pathway page (Phase 3)
├── clinicians.html # Clinician pathway page (Phase 3)
├── community.html # Enhanced community page (Phase 3)
├── test-github-stats.html # Test page for Phase 1
├── test-phase2.html # Test page for Phase 2
├── netlify.toml # Netlify configuration
├── package.json # Node dependencies
└── README.md # This file
Open test-github-stats.html in a browser to test the GitHub stats module:
- Stats Display: Shows live GitHub statistics
- Cache Management: Test cache operations
- Rate Limit Handling: Verify fallback behavior
- Console Logging: Real-time output of operations
# Open test page in browser
open test-github-stats.html
# Check browser console for detailed logs
# Test buttons to verify caching and fallback- Modern web browser with ES6 module support
- Node.js 20+ (for GitHub Actions scripts)
- Clone the repository
- Open
test-github-stats.htmlin a browser - Check browser console for logs
# Install dependencies (if needed)
npm install
# Run fetch scripts manually
GITHUB_TOKEN=your_token node scripts/fetch-activity.js
GITHUB_TOKEN=your_token node scripts/fetch-contributors.jsHandles localStorage caching with TTL management.
Key Functions:
set(key, data)- Cache data with timestampget(key, maxAge)- Retrieve cached data if not expiredisValid(key, maxAge)- Check if cache is validremove(key)- Remove specific cache entryclearAll()- Clear all Openwater cachesgetLastUpdated(key)- Get human-readable timestamp
GitHub API integration with rate limit handling.
Key Functions:
fetchOrgStats()- Fetch organization infofetchRepoList()- Fetch repository listgetStats()- Get aggregated statisticsshouldUseFallback()- Check if should use static dataloadStaticData(filename)- Load pre-fetched JSONdisplayStats(containerId)- Render stats to page
Rate Limit Strategy:
- Check cache (30-min TTL)
- Check API rate limit (
/rate_limit) - If < 10 requests remaining, use static fallback
- Otherwise fetch fresh data
- Cache result for future requests
- Unauthenticated: 60 requests/hour per IP
- Authenticated (Actions): 5,000 requests/hour
Mitigation:
- Client-side caching (30-min TTL)
- Rate limit checking before requests
- Static fallback when rate limited
- GitHub Actions pre-fetch (authenticated)
Schedule: Every 6 hours (0 */6 * * *)
Steps:
- Fetch organization stats
- Fetch repository list
- Fetch recent activity (commits, PRs, issues)
- Aggregate contributor data
- Commit changes to
data/directory
Manual Trigger: Available via GitHub Actions UI
- Phase 2: Implement activity feed and leaderboard UI components
- Phase 3: Create pathway pages with placeholder content
- Phase 4: Build interactive onboarding wizard
- Phase 5: Automate GitHub org access requests
- Phase 6: Comprehensive testing and optimization
- Phase 7: Update related repositories
- Phase 8: Deploy to production
- Solution: Wait for rate limit reset or use static fallback
- Check: Open
test-github-stats.htmland click "Check Current Rate Limit"
- Solution: Check browser localStorage is enabled
- Clear Cache: Use "Clear Cache" button on test page
- Solution: Ensure
data/*.jsonfiles exist and are valid JSON - Check: Test "Test Static Fallback" button on test page
[Same as main Openwater project]
See CONTRIBUTING.md in the main repository.
- Discord: [Community Server]
- Email: community@openwater.health
- GitHub: @openwaterhealth
Built with ❤️ by the Openwater Community