Ruby advocacy site and developer community. Built with Ruby 4.0.1 and Rails 8.2 on the Solid Stack (SQLite, SolidQueue, SolidCache, SolidCable).
- Universal Content Model: Articles (markdown), external links, and success stories
- AI-Generated Summaries: Automatic content summarization via OpenAI/Anthropic
- Category & Tagging System: Dynamic categories and HABTM tags
- Markdown Support: Full markdown rendering with syntax highlighting (Redcarpet + Rouge)
- Developer Profiles: GitHub-synced profiles with bio, company, location, repositories
- Interactive Map: Geocoded developer locations on a Leaflet.js world map
- Project Rankings: GitHub repos with daily star trends and sorting (trending, top, new)
- Testimonials: Users write why they love Ruby; AI generates headline/quote for the home page carousel
- Profile Settings: Hide repositories, "Open to Work" badge, newsletter preferences
- whyruby.info: Advocacy content, articles, success stories, testimonials
- rubycommunity.org: Community profiles, map, project rankings
- Cross-domain auth: OAuth via primary domain with single-use token session sync
- Timezone-aware delivery: Sends at 10:10 AM local time per user
- Open tracking: Pixel-based open tracking per version
- Unsubscribe: One-click unsubscribe via token URL
- Role-Based Access: Member and admin roles
- Trusted User System: Based on contribution count (3+ posts, 10+ comments)
- Self-Regulation: Trusted users can report inappropriate content
- Auto-Moderation: Content auto-hidden after 3+ reports
- Ruby 4.0.1
- SQLite 3
- Node.js (for JavaScript runtime)
- Clone the repository:
git clone <repository-url>
cd why_ruby- Install dependencies:
bundle install- Create and setup the database:
rails db:create
rails db:migrate
rails db:seed- Set up Rails credentials for development:
rails credentials:edit --environment developmentAdd your credentials:
github:
client_id: your_github_client_id
client_secret: your_github_client_secret
openai:
api_key: your_openai_api_key # OptionalGet credentials from:
- GitHub OAuth: GitHub OAuth Apps
- OpenAI API: OpenAI
- Go to GitHub Settings > Developer settings > OAuth Apps
- Click "New OAuth App"
- Fill in the application details:
- Application name: WhyRuby.info (or your preferred name)
- Homepage URL: http://localhost:3000
- Authorization callback URL: http://localhost:3000/users/auth/github/callback
- Click "Register application"
- Copy the Client ID and Client Secret to your Rails credentials
Start the development server (runs Rails + Tailwind CSS watcher):
bin/devVisit http://localhost:3003
Important: Always use bin/dev instead of rails server.
The seed data creates a test admin user. In production, you'll need to:
- Sign in with GitHub
- Use rails console to promote your user to admin:
rails runner "User.find_by(username: 'your-github-username').update!(role: :admin)"Access the admin panel at /admin
- User: GitHub OAuth authenticated users with roles, geocoded location, timezone, profile settings
- Post: Universal content model for articles, links, and success stories
- Category: Content categories with position ordering
- Tag: Content tags with HABTM relationship
- Comment: User comments on content
- Report: Content reports from trusted users
- Testimonial: User testimonials with AI-generated fields
- Project: GitHub repositories with star counts and language
- StarSnapshot: Daily star count snapshots for trend tracking
- Ruby 4.0.1 / Rails 8.2: Latest Rails with Solid Stack
- SQLite with UUIDv7: String primary keys for time-ordered uniqueness
- Tailwind CSS 4: Utility-first CSS via
tailwindcss-rails - Hotwire (Turbo + Stimulus): Frontend interactivity, infinite scroll, interactive map
- Avo: Admin interface for content management
- Kaminari: Pagination
- SolidQueue: Background job processing
- Leaflet.js: Interactive community map
- Brakeman: Security scanning (runs on every commit via lefthook)
GenerateSummaryJob: Creates AI summaries for new contentGenerateTestimonialFieldsJob: AI-generates headline, subheadline, and quote from testimonialsValidateTestimonialJob: LLM-validates testimonial contentUpdateGithubDataJob: Refreshes user GitHub data via GraphQL APINormalizeLocationJob: Geocodes user locations for the community mapScheduledNewsletterJob: Timezone-aware newsletter deliveryNotifyAdminJob: Alerts admins when content is auto-hidden
rails testbundle exec rubocop # Lint
bin/brakeman --no-pager # Security scanBoth run automatically on every commit via lefthook.
rails dbThis application is configured for deployment with Kamal. See config/deploy.yml for configuration.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is open source and available under the MIT License.