Copy the example environment file and update it with your values:
cp .env.example .envThen edit .env and replace the placeholder values with your actual GitHub App configuration.
- Go to GitHub App Settings
- Create a new app with:
- App name: Repository Fetcher (or your preferred name)
- Homepage URL: Your Vercel deployment URL
- Permissions:
- Repository permissions → Metadata: Read-only
- No other repository, organization, or account permissions needed
- Generate a private key and save it
- Note your App ID and Client Secret
Run the test suite:
bundle exec rspecGuard provides automated testing and code quality checks that run whenever you change files:
# Start Guard (runs tests and RuboCop automatically on file changes)
bundle exec guard
# Start Guard without initial run
bundle exec guard --no-interactionsGuard will automatically:
- Run RuboCop when Ruby files change
- Run RSpec tests when code or spec files change
- Output results to
tmp/rubocop_status.txtandtmp/rspec_status.txt - Display a status summary showing current test and code quality status
Get a quick overview of your project's health:
# Run status summary (shows RuboCop and RSpec results)
bin/status_summaryThe status summary displays:
- ✅ RuboCop: Clean code style or
⚠️ with offense count - ✅ Tests: All passing or ❌ with failure count
Test GitHub App authentication:
bin/test_github.rbDebug GitHub authentication:
bin/debug_github_auth.rbE2E Test:
# Test against production URL
bin/test_api.rb
# Test against preview URL
bin/test_api.rb https://your-preview-url.vercel.appgithub_repo_fetcher.rb: Main application entry point and library loadergithub_repo_fetcher/github_client.rb: GitHub API client with JWT authenticationgithub_repo_fetcher/project_service.rb: Service for fetching and processing repository datagithub_repo_fetcher/health_service.rb: Health check servicegithub_repo_fetcher/api_response_service.rb: Response formatting and API response handling
index.rb: Usage endpoint (/apiand/): HTML page for browsers, JSON otherwise (seeUsageService)health.rb: Health check endpoint (/api/health)projects.rb: Projects (repositories) fetching endpoint (/api/projects)
test_github.rb: Test GitHub App authenticationdebug_github_auth.rb: Debug authentication issuesstatus_summary: Display project health status
github_repo_fetcher/: Comprehensive test suite for all servicesspec_helper.rb: Test configuration and setup