{"id":43978895,"url":"https://github.com/rubyhcm/graphql_rails8","last_synced_at":"2026-02-07T08:35:15.052Z","repository":{"id":320389788,"uuid":"1074005712","full_name":"rubyhcm/graphql_rails8","owner":"rubyhcm","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-23T13:30:43.000Z","size":88,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-23T15:30:27.487Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/rubyhcm.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-10-11T01:28:03.000Z","updated_at":"2025-10-23T13:30:42.000Z","dependencies_parsed_at":"2025-10-23T15:31:13.066Z","dependency_job_id":"87101c03-6ab6-4780-bdca-cfb2b1016226","html_url":"https://github.com/rubyhcm/graphql_rails8","commit_stats":null,"previous_names":["rubyhcm/graphql_rails8"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/rubyhcm/graphql_rails8","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyhcm%2Fgraphql_rails8","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyhcm%2Fgraphql_rails8/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyhcm%2Fgraphql_rails8/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyhcm%2Fgraphql_rails8/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubyhcm","download_url":"https://codeload.github.com/rubyhcm/graphql_rails8/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyhcm%2Fgraphql_rails8/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29190292,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T07:37:03.739Z","status":"ssl_error","status_checked_at":"2026-02-07T07:37:03.029Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-02-07T08:35:14.431Z","updated_at":"2026-02-07T08:35:15.047Z","avatar_url":"https://github.com/rubyhcm.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rails GraphQL Blog Application\n\nA modern Rails API application with GraphQL interface for managing blogs and users. Features JWT authentication, role-based permissions, and a complete blog management system.\n\n## 🚀 Quick Start\n\n### Prerequisites\n- Ruby 3.x\n- Rails 8.x\n- SQLite3 (default) or PostgreSQL\n- Node.js (for GraphiQL interface)\n\n### Installation\n\n1. **Clone and setup**\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd rails-graphql\n   bundle install\n   ```\n\n2. **Database setup**\n   ```bash\n   rails db:create\n   rails db:migrate\n   rails db:seed\n   ```\n\n3. **Start the server**\n   ```bash\n   rails server\n   ```\n\n4. **Access GraphiQL IDE**\n   Visit: http://localhost:3000/graphiql\n\n## 📚 Documentation\n\n### Core Documentation\n- **[GraphQL Setup \u0026 Usage Guide](./me.md)** - Complete guide for GraphQL operations, mutations, and queries\n- **[Roles \u0026 Permissions](./permissions.md)** - Detailed documentation of the authentication and authorization system\n\n### Key Features\n- 🔐 **JWT Authentication** - Secure token-based authentication\n- 👥 **Role-Based Access Control** - Author and Admin roles with different permissions\n- 📝 **Blog Management** - Create, read, update, and delete blog posts\n- 🔍 **GraphQL API** - Modern GraphQL interface with GraphiQL IDE\n- 🛡️ **Security** - Strong password requirements and permission checks\n\n## 🏗️ Architecture\n\n### Technology Stack\n- **Backend**: Ruby on Rails 8.x (API mode)\n- **API**: GraphQL with graphql-ruby gem\n- **Authentication**: JWT tokens with bcrypt\n- **Database**: SQLite3 (development), configurable for production\n- **Development Tools**: GraphiQL IDE for API exploration\n\n### Database Schema\n- **Users**: Authentication and profile information\n- **Blogs**: Blog posts with user associations\n- **Roles**: Author and Admin role system\n\n## 🔧 Configuration\n\n### Environment Variables\n```bash\n# JWT Secret (uses Rails.application.secret_key_base by default)\nRAILS_MASTER_KEY=your_master_key_here\n```\n\n### Database Configuration\nDefault: SQLite3 for development\nProduction: Configure in `config/database.yml`\n\n## 🧪 Testing\n\n```bash\n# Run all tests\nrails test\n\n# Run specific test files\nrails test test/models/user_test.rb\nrails test test/models/blog_test.rb\n```\n\n## 🚀 Deployment\n\n### Using Kamal (Recommended)\n```bash\n# Setup deployment configuration\nkamal setup\n\n# Deploy application\nkamal deploy\n```\n\n### Manual Deployment\n1. Configure production database\n2. Set environment variables\n3. Precompile assets (if needed)\n4. Run migrations\n5. Start application server\n\n## 📖 API Usage Examples\n\n### Authentication\n```graphql\n# Sign up\nmutation {\n  signUpMutation(input: {\n    firstName: \"John\"\n    lastName: \"Doe\"\n    email: \"john@example.com\"\n    username: \"johndoe\"\n    password: \"MySecure123!\"\n  }) {\n    user { id username }\n    token\n    errors\n  }\n}\n\n# Sign in\nmutation {\n  signInMutation(input: {\n    username: \"johndoe\"\n    password: \"MySecure123!\"\n  }) {\n    token\n    error\n    user { id username role }\n  }\n}\n```\n\n### Blog Operations\n```graphql\n# Create blog (requires authentication)\nmutation {\n  blogCreate(input: {\n    title: \"My First Post\"\n    description: \"Content of the blog post...\"\n  }) {\n    blog {\n      id\n      title\n      description\n      userName\n    }\n  }\n}\n\n# Get all blogs (public)\nquery {\n  blogs {\n    id\n    title\n    description\n    createdAt\n    userName\n  }\n}\n```\n\n## 🔐 Security Features\n\n- **Password Requirements**: 8+ characters with mixed case, numbers, and special characters\n- **JWT Tokens**: 24-hour expiration with secure signing\n- **Role-Based Permissions**: Different access levels for authors and admins\n- **Input Validation**: GraphQL type validation and custom validations\n- **Secure Headers**: Proper authorization header handling\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add 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 licensed under the MIT License - see the LICENSE file for details.\n\n## 🆘 Support\n\n- **Documentation**: Check the linked documentation files above\n- **Issues**: Create an issue in the repository\n- **GraphiQL**: Use the interactive GraphiQL interface for API exploration\n\n---\n\n**Quick Links:**\n- [GraphQL Operations Guide](./me.md)\n- [Security \u0026 Permissions](./permissions.md)\n- [GraphiQL Interface](http://localhost:3000/graphiql) (when server is running)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyhcm%2Fgraphql_rails8","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubyhcm%2Fgraphql_rails8","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyhcm%2Fgraphql_rails8/lists"}