{"id":32932884,"url":"https://github.com/aliumairdev/rails_guide","last_synced_at":"2026-05-06T10:32:42.394Z","repository":{"id":321405372,"uuid":"1085657525","full_name":"aliumairdev/rails_guide","owner":"aliumairdev","description":"An interactive learning platform similar to RubyMonk, built with React and Node.js, where users can learn Ruby and Ruby on Rails through hands-on exercises and tutorials.","archived":false,"fork":false,"pushed_at":"2025-10-29T12:49:12.000Z","size":91,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"claude/ruby-rails-learning-app-011CUbMA26ecZGokfbigqLQ2","last_synced_at":"2025-10-29T14:27:31.428Z","etag":null,"topics":["lear","ruby","ruby-on-rails"],"latest_commit_sha":null,"homepage":"https://railsguide-production.up.railway.app/","language":"JavaScript","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/aliumairdev.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-29T10:40:03.000Z","updated_at":"2025-10-29T13:06:29.000Z","dependencies_parsed_at":"2025-10-29T14:27:38.078Z","dependency_job_id":"72c019db-1a47-411f-9a2f-40fe42e82641","html_url":"https://github.com/aliumairdev/rails_guide","commit_stats":null,"previous_names":["aliumairdev/rails_guide"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/aliumairdev/rails_guide","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliumairdev%2Frails_guide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliumairdev%2Frails_guide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliumairdev%2Frails_guide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliumairdev%2Frails_guide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aliumairdev","download_url":"https://codeload.github.com/aliumairdev/rails_guide/tar.gz/refs/heads/claude/ruby-rails-learning-app-011CUbMA26ecZGokfbigqLQ2","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliumairdev%2Frails_guide/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32689132,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T08:33:17.875Z","status":"ssl_error","status_checked_at":"2026-05-06T08:33:17.221Z","response_time":117,"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":["lear","ruby","ruby-on-rails"],"created_at":"2025-11-11T18:14:11.978Z","updated_at":"2026-05-06T10:32:42.389Z","avatar_url":"https://github.com/aliumairdev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ruby \u0026 Rails Learning Platform\n\nAn interactive learning platform similar to RubyMonk, built with React and Node.js, where users can learn Ruby and Ruby on Rails through hands-on exercises and tutorials.\n\n![Ruby \u0026 Rails Learning Platform](https://img.shields.io/badge/Ruby-3.2+-red.svg) ![React](https://img.shields.io/badge/React-18-blue.svg) ![Node.js](https://img.shields.io/badge/Node.js-20+-green.svg) ![License](https://img.shields.io/badge/license-MIT-blue.svg)\n\n## Features\n\n- **Interactive Code Editor**: Write and execute Ruby code directly in your browser using Monaco Editor (VS Code's editor)\n- **Comprehensive Lessons**: Learn Ruby from basics to advanced topics, plus Ruby on Rails fundamentals\n- **Hands-on Exercises**: Practice with real coding challenges and get instant feedback\n- **Progress Tracking**: Track your learning progress with automatic saving to localStorage\n- **Beautiful UI**: Modern, responsive dark theme inspired by GitHub\n- **Safe Code Execution**: Backend API executes Ruby code securely with timeouts\n\n## Tech Stack\n\n### Frontend\n- **React 18** - UI framework\n- **Vite** - Build tool and dev server\n- **Monaco Editor** - Code editor (VS Code editor)\n- **Axios** - HTTP client\n- **React Markdown** - Markdown rendering\n\n### Backend\n- **Node.js** - Runtime environment\n- **Express** - Web framework\n- **Ruby 3.2+** - Code execution engine\n\n## Project Structure\n\n```\nrails_guide/\n├── frontend/               # React frontend application\n│   ├── src/\n│   │   ├── components/    # React components\n│   │   │   ├── CodeEditor.jsx       # Monaco editor wrapper\n│   │   │   ├── LessonViewer.jsx     # Lesson content display\n│   │   │   └── Sidebar.jsx          # Navigation sidebar\n│   │   ├── data/          # Lesson content\n│   │   │   ├── rubyLessons.js       # Ruby tutorials \u0026 exercises\n│   │   │   └── railsLessons.js      # Rails tutorials \u0026 exercises\n│   │   ├── App.jsx        # Main application component\n│   │   ├── App.css        # Application styles\n│   │   └── main.jsx       # Entry point\n│   └── package.json\n│\n├── backend/               # Node.js backend API\n│   ├── server.js          # Express server \u0026 Ruby execution API\n│   ├── Dockerfile         # Docker configuration\n│   └── package.json\n│\n└── README.md\n```\n\n## Getting Started\n\n### Prerequisites\n\n- **Node.js** 20+ and npm\n- **Ruby** 3.2+ installed and available in PATH\n- **Git** for version control\n\n### Installation\n\n1. **Clone the repository**\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd rails_guide\n   ```\n\n2. **Install backend dependencies**\n   ```bash\n   cd backend\n   npm install\n   ```\n\n3. **Install frontend dependencies**\n   ```bash\n   cd ../frontend\n   npm install\n   ```\n\n4. **Configure environment (optional)**\n   ```bash\n   cp .env.example .env\n   # Edit .env if you want to change the API URL\n   ```\n\n### Running the Application\n\nYou'll need two terminal windows/tabs:\n\n**Terminal 1 - Start the backend API:**\n```bash\ncd backend\nnpm start\n```\n\nThe backend will run on `http://localhost:3001`\n\n**Terminal 2 - Start the frontend dev server:**\n```bash\ncd frontend\nnpm run dev\n```\n\nThe frontend will run on `http://localhost:5173` (or another port if 5173 is taken)\n\n### Access the Application\n\nOpen your browser and navigate to:\n```\nhttp://localhost:5173\n```\n\n## Usage\n\n### Learning Ruby\n\n1. Click on any lesson in the sidebar to start learning\n2. Read the lesson content and examples\n3. Write code in the editor\n4. Click \"Run Code\" to execute and see the output\n5. For exercises, click \"Submit Solution\" to validate your answer\n6. Navigate between lessons using the Previous/Next buttons\n\n### Lesson Types\n\n- **Tutorial**: Learn concepts with examples and practice code\n- **Exercise**: Solve coding challenges with automated tests\n\n### Progress Tracking\n\nYour progress is automatically saved to your browser's localStorage. You can:\n- See completed lessons marked with a checkmark (✓)\n- View overall progress percentage in the top bar\n- Reset all progress using the \"Reset Progress\" button\n\n## API Endpoints\n\n### Health Check\n```\nGET /health\n```\n\nReturns the API status.\n\n### Execute Ruby Code\n```\nPOST /api/execute\nContent-Type: application/json\n\n{\n  \"code\": \"puts 'Hello, World!'\",\n  \"testCode\": \"# Optional test code\"\n}\n```\n\n### Validate Exercise Solution\n```\nPOST /api/validate\nContent-Type: application/json\n\n{\n  \"code\": \"def add(a, b)\\n  a + b\\nend\",\n  \"tests\": \"raise 'Failed' unless add(2, 3) == 5\"\n}\n```\n\n## Lesson Content\n\n### Ruby Lessons\n\n1. **Ruby Basics**\n   - Introduction to Ruby\n   - Variables and Data Types\n   - Numbers and Math\n   - String Methods\n\n2. **Control Flow**\n   - If Statements\n   - Loops (while, for, times, each)\n   - FizzBuzz Challenge\n\n3. **Arrays and Hashes**\n   - Working with Arrays\n   - Array Methods\n   - Hash Basics\n\n4. **Methods**\n   - Defining Methods\n   - Parameters and Return Values\n   - Calculator Exercise\n\n### Ruby on Rails Lessons\n\n1. **Introduction to Rails**\n   - What is Ruby on Rails?\n   - MVC Architecture\n   - Rails Application Structure\n\n2. **Routing**\n   - Basic Routes\n   - RESTful Resources\n   - Route Parameters\n\n3. **Models and ActiveRecord**\n   - ActiveRecord Basics\n   - CRUD Operations\n   - Validations\n   - Associations\n\n4. **Controllers and Views**\n   - Controllers\n   - Actions\n   - Views and ERB\n   - Layouts\n\n## Development\n\n### Adding New Lessons\n\n1. Open `frontend/src/data/rubyLessons.js` or `railsLessons.js`\n2. Add a new lesson object to the appropriate section:\n\n```javascript\n{\n  id: 'unique-lesson-id',\n  title: 'Lesson Title',\n  content: `# Markdown content here`,\n  starterCode: 'puts \"starter code\"',\n  solution: 'puts \"solution\"',\n  tests: '# Optional test code',\n  type: 'tutorial' // or 'exercise'\n}\n```\n\n### Customizing Styles\n\nEdit `frontend/src/App.css` to customize the appearance. The color scheme is based on GitHub's dark theme.\n\n### Building for Production\n\n**Frontend:**\n```bash\ncd frontend\nnpm run build\n```\n\n**Backend:**\nThe backend runs as-is in production. Consider adding:\n- Docker containerization for Ruby code execution\n- Rate limiting\n- Authentication\n- Code execution sandboxing\n\n## Security Considerations\n\n**Current Implementation:**\n- 5-second timeout on code execution\n- 1MB output buffer limit\n\n**Recommended for Production:**\n- Docker containers for code execution\n- Resource limits (CPU, memory)\n- Input sanitization\n- Rate limiting\n- User authentication\n- Code execution sandboxing (firejail, nsjail)\n\n## Roadmap\n\n- [ ] Add more Ruby lessons (Classes, Modules, Metaprogramming)\n- [ ] Add more Rails lessons (Forms, Authentication, Testing)\n- [ ] Implement user accounts and cloud progress sync\n- [ ] Add code execution in Docker containers\n- [ ] Add syntax highlighting in lesson content\n- [ ] Add code snippets library\n- [ ] Add community solutions sharing\n- [ ] Add difficulty levels\n- [ ] Add achievement badges\n- [ ] Add hints system\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\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## Acknowledgments\n\n- Inspired by [RubyMonk](https://rubymonk.com/)\n- Built with [Monaco Editor](https://microsoft.github.io/monaco-editor/)\n- UI design inspired by [GitHub](https://github.com/)\n\n## Support\n\nIf you encounter any issues or have questions:\n1. Check the [Issues](../../issues) page\n2. Create a new issue if your problem isn't already listed\n3. Provide as much detail as possible\n\n## Screenshots\n\n### Main Learning Interface\nThe sidebar shows all available lessons organized by topic, with the code editor and lesson content in the main area.\n\n### Exercise Validation\nSubmit your solutions and get instant feedback on whether your code passes the tests.\n\n### Progress Tracking\nTrack your learning journey with the built-in progress bar and completion markers.\n\n---\n\n**Happy Learning!** 🚀\n\nBuilt with ❤️ for Ruby and Rails learners everywhere.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliumairdev%2Frails_guide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faliumairdev%2Frails_guide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliumairdev%2Frails_guide/lists"}