DEV Community

Yousef
Yousef

Posted on

Your First Rhino Contribution: Making MVP Development Even Faster

Hacktoberfest: Maintainer Spotlight

From Reading to Contributing

If you've been following our Rhino Framework series, you've seen how this framework can make MVP development 90% faster. You've learned about its architecture, understood how it works, and maybe even set up your own local environment. Now it's time to take the next step: actually contributing to the project.

This isn't just about getting your name in the commit history (though that's pretty cool too). Contributing to Rhino means you're helping shape the future of how we build web applications. Every contribution, from fixing a typo to implementing a new feature, makes the framework more powerful for developers around the world.

Understanding the Rhino Contribution Landscape

Before we dive into specific examples, let's talk about what kinds of contributions Rhino needs. The framework is built on familiar technologies (Rails and React), so if you know these, you can start contributing immediately.

The most valuable contributions fall into three categories: code improvements, documentation, and testing. Code contributions include bug fixes, new features, and performance optimizations. Documentation contributions help other developers understand how to use the framework. Testing contributions make the framework more reliable for everyone.

When you're looking for your first contribution, keep an eye out for issues labeled with good first issue or help wanted. These are specifically chosen to be well-documented, limited in scope, and good learning opportunities that won't take weeks to complete.

Real Example: Issue #232 - Organizations Factory for Testing

Let's look at a real issue that's perfect for first-time contributors.

What This Issue Is Asking For

Issue #232 is asking for the rhino_project_organizations gem to install an organizations factory for testing. Here's what that means in plain English:

The Rhino framework has a modular architecture with different gems for different features. One of these gems is rhino_project_organizations, which handles multi-tenant functionality (think multiple companies using the same application).

Currently, when developers want to test code that uses organizations, they have to manually create test data. This issue is asking for a FactoryBot factory to be automatically installed when someone includes the organizations gem, making testing much easier.

Why This Matters

Testing is crucial for any framework. When developers can't easily create test data for organizations, they either:

  • Skip writing tests (bad)
  • Write complex, hard-to-maintain test setup code (also bad)
  • Avoid using the organizations feature entirely (really bad)

By providing a factory out of the box, we make the organizations feature more accessible and encourage better testing practices.

To tackle this issue, you'd need to understand FactoryBot (how to write factories for test data), Ruby gems (how gems are structured and install files), Rails testing (how tests are organized), and multi-tenancy (basic understanding of how organizations work).

You'd start by exploring the rhino_project_organizations gem structure, looking at how other gems install factories (like rhino_project_core), examining the existing test setup in the template project, and studying FactoryBot documentation and best practices.

Real Example: Issue #215 - Refactoring Timestamp Attributes

Here's another great example of a contribution opportunity.

What This Issue Is Asking For

Issue #215 is about refactoring how Rhino handles timestamp attributes in ActiveRecord models. Currently, the code uses send(:all_timestamp_attributes_in_model) which is a private method. The issue asks to use the public all_timestamp_attributes_in_model method instead.

This is a Rails API change. In newer versions of Rails, this method became public, so we no longer need to use the send() workaround to access it.

Why This Matters

Using private methods (even through send()) is generally not a good practice because:

  • It can break when Rails updates
  • It's harder to understand what the code is doing
  • It makes the codebase less maintainable

By switching to the public API, we make the code more robust and easier to understand.

For this issue, you'd need Rails knowledge (understanding of ActiveRecord and Rails API changes), Ruby metaprogramming (understanding of send() and method visibility), version compatibility (how to check what Rails versions support which methods), and testing (how to verify the change doesn't break anything).

You'd focus on gems/rhino_project_core/lib/rhino/resource/active_record_extension/properties.rb, Rails documentation for the all_timestamp_attributes_in_model method, the test suite to understand how this method is used, and Rails version compatibility requirements.

The Contribution Process Step-by-Step

Now that you understand what these issues are asking for, let's walk through the actual process of making a contribution.

First, you'll need your own copy of the Rhino project. Fork the repository on GitHub, then clone it locally:

git clone https://github.com/your-username/rhino-project.git
cd rhino-project
Enter fullscreen mode Exit fullscreen mode

Getting the codebase running locally is crucial for understanding how it works. Install dependencies, set up the database, and start the development servers:

bundle install
npm install
rails db:setup
rails s  # In another terminal: npm start
Enter fullscreen mode Exit fullscreen mode

Never work directly on the main branch. Create a feature branch with a descriptive name:

git checkout -b fix/organizations-factory-installation
Enter fullscreen mode Exit fullscreen mode

Before making changes, run the existing tests to make sure everything works. This gives you a baseline to ensure your changes don't break anything:

bundle exec rails test
Enter fullscreen mode Exit fullscreen mode

This is where the real work happens. Start small and test frequently. Make one small change at a time, run tests after each change, use rails console to experiment with your changes, and read existing code to understand patterns.

When you're ready to submit, write clear, descriptive commit messages and push your changes:

git add .
git commit -m "fix: install organizations factory when rhino_project_organizations gem is included"
git push origin fix/organizations-factory-installation
Enter fullscreen mode Exit fullscreen mode

Then go to GitHub and create a pull request with a clear title, detailed description of the problem and solution, and a link to the original issue.

Code review is a learning opportunity, not criticism. Read feedback carefully, ask questions if you don't understand, make requested changes promptly, and thank reviewers for their time and input.

Tools and Commands You'll Use

Here are the essential tools you'll become familiar with during your contribution journey.

Git Workflow Basics - You'll use git status to check your changes, git diff to see what you've modified, git add to stage files, and git commit with descriptive messages. Always push to your fork with git push origin branch-name.

Rails Console for Testing - The Rails console is your best friend for experimenting. Start it with rails console, then test your changes with commands like Organization.create(name: "Test Org") or FactoryBot.create(:organization). You can also check if methods exist with Organization.respond_to?(:all_timestamp_attributes_in_model).

Running the Test Suite - Use bundle exec rails test to run all tests, bundle exec rails test --verbose for more output, or bundle exec rails test test/models/organization_test.rb for specific files. You can also run tests matching a pattern with bundle exec rails test -n test_organization_creation.

Debugging Techniques - When things go wrong (and they will), add debug statements with puts "Debug: #{variable.inspect}", use the debugger with require 'debug'; debugger, check Rails logs with tail -f log/development.log, or use interactive debugging with require 'pry'; binding.pry.

What to Do When You're Stuck

Getting stuck is normal. Here's how to get unstuck:

Reading Existing Code for Patterns - The best way to understand how to implement something is to see how similar things are already implemented. Search for similar patterns with grep -r "factory.*install" gems/ or grep -r "all_timestamp_attributes" gems/. Look at how other gems handle similar functionality.

Using GitHub Search - GitHub's search is powerful for finding examples. Search for "factory installation" in the repository, look at similar pull requests, and check how other Rails gems handle similar problems.

Asking for Help - Don't suffer in silence. Ask questions in GitHub Discussions, join our Discord for real-time help, comment on the issue you're working on, or open a draft PR early to get feedback.

Breaking Down the Problem - When an issue seems overwhelming, read the issue carefully to understand what's being asked for, find similar implementations to see how similar problems have been solved, start with the simplest case (don't try to solve everything at once), test your understanding by explaining the problem to someone else, and ask questions rather than guessing.

Ready to Get Started?

Contributing to Rhino is easier than you might think. The framework is built on familiar technologies, the community is welcoming, and there are plenty of opportunities to make a meaningful impact.

Here's your action plan: Pick an issue (start with #232 or #215, or find another "good first issue"), set up your environment (get the codebase running locally), understand the problem (read the issue carefully and explore the codebase), make a small change (don't try to solve everything at once), ask for help (use Discord or GitHub discussions when you're stuck), and submit your contribution (open a pull request and celebrate!).

Remember, every expert was once a beginner. The Rhino community is here to help you learn and grow. Your first contribution might be small, but it's the first step toward becoming a valuable member of the open source community.


This post is part of our Hacktoberfest 2025 series. Follow along as we explore Rhino Framework through real examples and community contributions.

Top comments (0)