{"id":30643909,"url":"https://github.com/newstler/why_ruby","last_synced_at":"2025-10-10T03:36:55.060Z","repository":{"id":309360698,"uuid":"1028497609","full_name":"newstler/why_ruby","owner":"newstler","description":"whyruby.info","archived":false,"fork":false,"pushed_at":"2025-09-18T18:07:35.000Z","size":95386,"stargazers_count":6,"open_issues_count":8,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-18T20:11:37.031Z","etag":null,"topics":["ruby"],"latest_commit_sha":null,"homepage":"https://whyruby.info","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/newstler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-29T16:05:26.000Z","updated_at":"2025-09-18T17:49:57.000Z","dependencies_parsed_at":"2025-09-18T19:37:13.368Z","dependency_job_id":null,"html_url":"https://github.com/newstler/why_ruby","commit_stats":null,"previous_names":["newstler/why_ruby"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/newstler/why_ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newstler%2Fwhy_ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newstler%2Fwhy_ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newstler%2Fwhy_ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newstler%2Fwhy_ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/newstler","download_url":"https://codeload.github.com/newstler/why_ruby/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newstler%2Fwhy_ruby/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002621,"owners_count":26083425,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ruby"],"created_at":"2025-08-31T03:39:21.089Z","updated_at":"2025-10-10T03:36:55.055Z","avatar_url":"https://github.com/newstler.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WhyRuby.info - Ruby Advocacy Community Website\n\nA community-driven Ruby advocacy website built with Ruby 3.4.4 and Rails 8.1 using the Solid Stack (SQLite, SolidQueue, SolidCache, SolidCable).\n\n## Features\n\n### Core Features\n- **Universal Content Model**: Support for both articles (with markdown) and external links\n- **GitHub OAuth Authentication**: Sign in with GitHub account only\n- **Category System**: Dynamic categories managed through admin panel\n- **Tagging System**: HABTM relationship for content tagging\n- **Pinned Content**: Homepage featuring system with numbered positions\n- **AI-Generated Summaries**: Automatic content summarization via OpenAI\n- **Soft Deletion**: All records use archived flag instead of hard deletion\n\n### Community Features\n- **Role-Based Access**: Member and admin roles\n- **Trusted User System**: Based on contribution count (3+ contents, 10+ comments)\n- **Self-Regulation**: Trusted users can report inappropriate content\n- **Auto-Moderation**: Content auto-hidden after 3+ reports\n- **Markdown Support**: Full markdown rendering with syntax highlighting\n\n## Setup\n\n### Prerequisites\n- Ruby 3.4.4\n- SQLite 3\n- Node.js (for JavaScript runtime)\n\n### Installation\n\n1. Clone the repository:\n```bash\ngit clone \u003crepository-url\u003e\ncd why_ruby\n```\n\n2. Install dependencies:\n```bash\nbundle install\n```\n\n3. Create and setup the database:\n```bash\nrails db:create\nrails db:migrate\nrails db:seed\n```\n\n4. Set up Rails credentials for development:\n```bash\nrails credentials:edit --environment development\n```\n\nAdd your credentials:\n```yaml\ngithub:\n  client_id: your_github_client_id\n  client_secret: your_github_client_secret\n\nopenai:\n  api_key: your_openai_api_key  # Optional\n```\n\nGet credentials from:\n- GitHub OAuth: [GitHub OAuth Apps](https://github.com/settings/developers)\n- OpenAI API: [OpenAI](https://platform.openai.com/api-keys)\n\n### GitHub OAuth Setup\n\n1. Go to [GitHub Settings \u003e Developer settings \u003e OAuth Apps](https://github.com/settings/developers)\n2. Click \"New OAuth App\"\n3. Fill in the application details:\n   - Application name: WhyRuby.info (or your preferred name)\n   - Homepage URL: http://localhost:3000\n   - Authorization callback URL: http://localhost:3000/users/auth/github/callback\n4. Click \"Register application\"\n5. Copy the Client ID and Client Secret to your Rails credentials\n\n## Running the Application\n\nStart the Rails server:\n```bash\nrails server\n```\n\nVisit http://localhost:3000\n\n## Admin Access\n\nThe seed data creates a test admin user. In production, you'll need to:\n1. Sign in with GitHub\n2. Use rails console to promote your user to admin:\n```bash\nrails runner \"User.find_by(username: 'your-github-username').update!(role: :admin)\"\n```\n\nAccess the admin panel at `/admin`\n\n## Architecture\n\n### Models\n- **User**: GitHub OAuth authenticated users with roles\n- **Category**: Content categories with position ordering\n- **Content**: Universal model for articles and links\n- **Tag**: Content tags with HABTM relationship\n- **Comment**: User comments on content\n- **Report**: Content reports from trusted users\n\n### Key Technologies\n- **Rails 8.1**: Latest Rails with Solid Stack\n- **SQLite with ULID**: Primary keys using ULID for better distribution\n- **Tailwind CSS 4**: Modern utility-first CSS framework\n- **Redcarpet + Rouge**: Markdown rendering with syntax highlighting\n- **Avo**: Admin interface for content management\n- **Kaminari**: Pagination\n- **SolidQueue**: Background job processing\n\n### Background Jobs\n- `GenerateSummaryJob`: Creates AI summaries for new content\n- `NotifyAdminJob`: Alerts admins when content is auto-hidden\n\n## Development\n\n### Running Tests\n```bash\nrails test\n```\n\n### Code Style\n```bash\nbundle exec rubocop\n```\n\n### Database Console\n```bash\nrails db\n```\n\n## Deployment\n\nThis application is configured for deployment with Kamal. See `config/deploy.yml` for configuration.\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nThis project is open source and available under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnewstler%2Fwhy_ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnewstler%2Fwhy_ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnewstler%2Fwhy_ruby/lists"}