Hello Readers,
This blog is dedicated to summarizing the work that we have done and goals that we have met in Google Summer of Code 2024 for the Forum Revamp Project.
Table of Contents
Currently, our forum is built using simple_discussion Rails engine, which lacks many features which we needed. The main goal of this project is to revamp the forum with new features such as a Markdown Editor for drafting forum posts, moderation tools, spam reporting features, a leaderboard for active forum users, and more.
So far, we have covered and implemented the following features in the first phase of the project:
For detailed implementation of these features do checkout the biweekly blog posts here.
Since the forum is public, it is crucial to gatekeep inappropriate language. This problem is common in public forums where users sometimes use inappropriate language. To solve this problem, we used the language_filter
gem, which allows us to filter inappropriate words from forum posts.
The idea is to throw an error message to the user if the post contains any inappropriate language.
The following are some small UI-UX improvements we have made to the forum post card:
We have covered the language filter to gatekeep inappropriate language. However, there are still chances that users can post spam content since the language_filter
gem is not that powerful. To mitigate this, we implemented the Report as Spam feature. This feature allows users to report a post as spam. Once reported, the post will be reviewed by moderators.
To learn more about the implementation details, you can check out my biweekly blog post on my GSoC experience here. In the blog, I’ve discussed each aspect of the implementation in detail.
Currently, Slack is our main communication channel for both contributors and users. To keep the community updated about new forum threads, we implemented the Slack notification feature. This feature notifies the Slack channel about new forum threads.
It was fairly simple to implement, thanks to the noticed
gem and Slack webhook integration documentation. Every time a new forum thread is created, the Slack community will be notified.
This feature is significant as it allows users to draft forum posts in Markdown format. It can be useful for adding more features like embedding CircuitVerse circuits, tagging users, embedding YouTube videos, and more using Markdown syntax extensions. So far, we have added the Markdown editor without any extensions, which will be added in the next phase of the project.
Here is how the Markdown editor looks:
As our needs for this forum to be used in production, we need to able to embed the circuitverse ciruits, youtube video and user tagging.
For this implementation, I extended the markdown syntax both at client side using regex and server side using redcarpet gem.
Searching is important aspect, it can help user to search for issue/discussion which they are looking for. Also it can help reduce the duplicate or similar discussion.
Since we are working on gem (library), we can’t be sure where this gem can be used. I mean, it can be used in rails application with Postgres as db, MySQL as db or any other db. If we have had vendor locked the db as Postgres, search feature can be implemented through Postgres’s Full text search. But we can’t do that. So we have to give users of this engine option to override the default search functionality with their own implementation.
Here is the video of search functionality which will be going to be used by CircuitVerse using PgSearch gem.
Ranking is important for judging the credibility of a message, and it’s also crucial for recognizing the contributions of forum members.
During the implementation, I got little confuse where the distribution of the points logic should exists, in the controller or in the model file. Then I read few blogs on fat model and slim controllers and vice versa. In the rails, these conventions are very helpful and important, depending on it’s usecase one can utilize this concepts.
Here is the screenshot of leaderboard page. Note: UI of leaderboard may change later
Week 1:
Adding supported Rails versions in AppraisalWeek 2:
Fixing CI failsWeek 3:
Adding language filters and UI changesWeek 4:
Report as spam and moderation review pageWeek 5:
Slack notification in specific channel for new threadWeek 6:
Markdown editor using SimpleMDEWeek 7:
Markdown syntax extensionWeek 8:
Topic search on Forum ThreadsWeek 9:
Moderator delete accessWeek 10:
Leaderboard Page and RankingWeek 11:
Improved DocumentationCV community encourage to document each and every aspect of project. So I posted the biweely blogs and shared the progress as well as the implementation details in depth of each features and documented the whole project. You guys can checkout these blogs here
I’m excited to continue to contribute to this incredible open-source project which helps students to design and learn about digital circuit design.
Additionaly, I started to work on this project with the thought that this revamped forum gem will be distributed and published as different name, instead of simple_discussion
Following are the key takeaways from the first phase of the project:
git rebase
over git merge
for maintaining a clean git history.Over the past few weeks, I’ve had an incredible journey contributing to CircuitVerse. The community has been supportive and motivating, and I had the freedom to meticulously plan and execute my tasks, all under the helpful guidance of my mentors. I’ve learned a lot about the inner workings of Rails Engine, and I’ve gained a lot of confidence in my abilities as a developer.
I would like to thank my mentors, Aboobacker MK and Tanmoy Sarkar, for always being there to help me out and guiding me throughout the project.