Convert Figma logo to code with AI

lobsters logolobsters

Computing-focused community centered around link aggregation and discussion

4,036
805
4,036
132

Top Related Projects

16,796

historical code from reddit.com

41,716

A platform for community discussion. Free, open, simple.

21,885

For empowering community 🌱

21,885

For empowering community 🌱

Quick Overview

Lobsters is a self-hosted link aggregation and discussion website, similar to Reddit or Hacker News. It is designed to be a high-quality community for discussing technology, programming, and other related topics.

Pros

  • Focused Community: Lobsters aims to maintain a high-quality, focused community of users interested in technology and programming.
  • Customizable: The Lobsters codebase is open-source, allowing users to self-host and customize the platform to their needs.
  • Moderation: The platform has a strong focus on moderation, with users earning "karma" points that influence their moderation abilities.
  • Privacy-Focused: Lobsters does not track user data or display advertisements, prioritizing user privacy.

Cons

  • Self-Hosting Complexity: Setting up and maintaining a self-hosted Lobsters instance can be technically challenging for some users.
  • Limited Reach: As a self-hosted platform, Lobsters has a smaller user base compared to larger, centralized social media platforms.
  • Steep Learning Curve: The platform's focus on high-quality discussions and moderation can have a steep learning curve for new users.
  • Limited Functionality: Lobsters is designed to be a focused link aggregation and discussion platform, which may limit its appeal for users seeking a more feature-rich social media experience.

Getting Started

To get started with Lobsters, you can follow the detailed installation instructions provided in the project's README. The instructions cover setting up a development environment, configuring the necessary dependencies, and deploying the application.

Here's a brief overview of the steps involved:

  1. Clone the Repository: Start by cloning the Lobsters repository from GitHub:

    git clone https://github.com/lobsters/lobsters.git
    
  2. Install Dependencies: Lobsters is built using Ruby on Rails, so you'll need to install Ruby, Rails, and other required dependencies. The README provides detailed instructions for setting up the development environment on various operating systems.

  3. Configure the Database: Lobsters uses a PostgreSQL database. You'll need to create a new database and update the database configuration in the config/database.yml file.

  4. Run the Application: Once you've set up the development environment and configured the database, you can start the Lobsters application using the following command:

    rails server
    
  5. Create an Account: After the application is running, you can visit the local development URL (usually http://localhost:3000) and create a new user account.

  6. Customize and Deploy: If you plan to use Lobsters in a production environment, you'll need to configure the necessary deployment settings, such as web server, caching, and email settings. The README provides guidance on these topics.

For more detailed instructions and troubleshooting, please refer to the Lobsters README and the project's wiki.

Competitor Comparisons

16,796

historical code from reddit.com

Pros of Reddit

  • Larger Community: Reddit has a much larger user base and community compared to Lobsters, which can be beneficial for content discovery and engagement.
  • Diverse Topics: Reddit covers a wide range of topics, from news and entertainment to niche interests, making it a more comprehensive platform.
  • Customizable Subreddits: Reddit's subreddit structure allows for more specialized and tailored communities within the larger platform.

Cons of Reddit

  • Less Focused: The broad scope of Reddit can also lead to a less focused and more chaotic environment compared to the more curated Lobsters community.
  • Moderation Challenges: With a larger user base, Reddit faces greater challenges in maintaining consistent moderation and content quality across the platform.
  • Potential for Toxicity: The open nature of Reddit can sometimes lead to more toxic or abusive behavior, which may not be as prevalent in the Lobsters community.

Code Comparison

Lobsters:

class User < ApplicationRecord
  has_many :stories
  has_many :comments
  has_many :sent_messages, class_name: "Message", foreign_key: "author_id"
  has_many :received_messages, class_name: "Message", foreign_key: "recipient_id"
  has_many :votes
  has_many :tagged_stories, through: :votes, source: :story
  has_many :authored_tags, class_name: "Tag", foreign_key: "author_id"
  has_many :subscriptions
  has_many :subscribed_tags, through: :subscriptions, source: :tag
end

Reddit:

class Redditor(models.Model):
    username = models.CharField(max_length=20, unique=True)
    password = models.CharField(max_length=100)
    email = models.EmailField(unique=True)
    created_at = models.DateTimeField(auto_now_add=True)
    updated_at = models.DateTimeField(auto_now=True)
    karma = models.IntegerField(default=1)
    is_admin = models.BooleanField(default=False)
41,716

A platform for community discussion. Free, open, simple.

Pros of Discourse

  • Discourse is a feature-rich forum software with a modern and responsive design, making it suitable for a wide range of online communities.
  • The project has a large and active community, with regular updates and a strong focus on security and performance.
  • Discourse provides a range of advanced features, such as real-time notifications, user reputation systems, and integration with various third-party services.

Cons of Discourse

  • Discourse has a steeper learning curve compared to Lobsters, which may be a barrier for some users.
  • The software can be resource-intensive, requiring more powerful hardware to run efficiently, especially for larger communities.
  • Discourse's flexibility and feature set may be overkill for smaller or more specialized online communities that prefer a simpler forum solution.

Code Comparison

Lobsters:

class StoriesController < ApplicationController
  def index
    @stories = Story.active.order('id DESC').page(params[:page])
    @new_story = Story.new
  end

  def show
    @story = Story.find(params[:id])
    @comments = @story.comments.order('id ASC')
    @new_comment = @story.comments.build
  end

Discourse:

class TopicController < ApplicationController
  def show
    topic = Topic.find_by(slug: params[:slug])
    if topic.blank?
      raise Discourse::NotFound
    end

    guardian = Guardian.new(current_user)
    topic_view = TopicView.new(topic, guardian, params)
    render_topic_view(topic_view)
  end
21,885

For empowering community 🌱

Pros of forem/forem

  • Forem provides a more feature-rich and customizable platform for building online communities, with support for various content types, user profiles, and moderation tools.
  • The project has a larger and more active community, with more contributors and a more extensive ecosystem of plugins and integrations.
  • Forem's codebase is more actively maintained and updated, with regular releases and bug fixes.

Cons of forem/forem

  • Lobsters has a more focused and minimalist approach, with a smaller and more tightly-knit community that values simplicity and privacy.
  • The Lobsters codebase is generally more lightweight and easier to understand, making it more accessible for contributors.
  • Lobsters has a more robust and reliable invitation-only system, which helps maintain the quality and exclusivity of the community.

Code Comparison

Lobsters/Lobsters:

class StoriesController < ApplicationController
  before_action :require_logged_in_user, except: [:index, :show, :suggest]

  def index
    @page = (params[:page].to_i <= 0) ? 1 : params[:page].to_i
    @stories = Story.active.order('id DESC').offset((@page - 1) * 25).limit(25)

    respond_to do |format|
      format.html { render :index }
      format.rss { render :index, layout: false }
    end
  end

Forem/Forem:

class ForumsController < Forem::ApplicationController
  load_and_authorize_resource :forum, parent: false

  def index
    @forums = @forums.includes(:category).order('forem_categories.position, forem_forums.position')
    @categories = Forem::Category.all.includes(:forums)
  end

  def show
    @topics = @forum.topics.includes(:user, :last_post).page(params[:page]).per(Forem.per_page)
  end
21,885

For empowering community 🌱

Pros of forem/forem

  • Forem provides a more feature-rich and customizable platform for building online communities, with support for various content types, user profiles, and moderation tools.
  • The project has a larger and more active community, with more contributors and a more extensive ecosystem of plugins and integrations.
  • Forem's codebase is more actively maintained and updated, with regular releases and bug fixes.

Cons of forem/forem

  • Lobsters has a more focused and minimalist approach, with a smaller and more tightly-knit community that values simplicity and privacy.
  • The Lobsters codebase is generally more lightweight and easier to understand, making it more accessible for contributors.
  • Lobsters has a more robust and reliable invitation-only system, which helps maintain the quality and exclusivity of the community.

Code Comparison

Lobsters/Lobsters:

class StoriesController < ApplicationController
  before_action :require_logged_in_user, except: [:index, :show, :suggest]

  def index
    @page = (params[:page].to_i <= 0) ? 1 : params[:page].to_i
    @stories = Story.active.order('id DESC').offset((@page - 1) * 25).limit(25)

    respond_to do |format|
      format.html { render :index }
      format.rss { render :index, layout: false }
    end
  end

Forem/Forem:

class ForumsController < Forem::ApplicationController
  load_and_authorize_resource :forum, parent: false

  def index
    @forums = @forums.includes(:category).order('forem_categories.position, forem_forums.position')
    @categories = Forem::Category.all.includes(:forums)
  end

  def show
    @topics = @forum.topics.includes(:user, :last_post).page(params[:page]).per(Forem.per_page)
  end

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Lobsters Rails Project build status

This is the quite sad source code to the ghost town at https://lobste.rs. It is a Rails codebase and uses a SQL (MariaDB in production) backend for the database.

You are free to use this code to start your own sister site because the code is available under a permissive license (3-clause BSD). We welcome bug reports and code contributions that help use improve lobste.rs. As a volunteer project we're reluctant to take on work that's not useful to our site, so please understand if we don't want to adopt your custom feature.

Contributing bugfixes and new features

We'd love to have your help. Please see the CONTRIBUTING file for details. If you have questions, there is usually someone in our chat room who's familiar with the code.

Development setup

Use the steps below for a local install or lobsters-ansible for our production deployment config. There's an external project docker-lobsters if you want to use Docker.

  • Install and start MariaDB. On Linux use your package manager. On MacOS you can install with brew. On Windows there's an installer.

  • Install the Ruby version specified in .ruby-version

  • Checkout the lobsters git tree from Github

    $ git clone git@github.com:lobsters/lobsters.git
    $ cd lobsters
    lobsters$
    
  • Install Nodejs, needed (or other execjs) for uglifier

    Fedora: sudo yum install nodejs
    Ubuntu: sudo apt-get install nodejs
    OSX: brew install nodejs
    
  • Run bin/setup to install dependencies and set up db

    lobsters$ bin/setup
    
  • On your production server, copy config/initializers/production.rb.sample to config/initalizers/production.rb and customize it with your site's domain and name. (You don't need this on your dev machine).

  • On your personal computer, you probably want to add some sample data.

    lobsters$ rails fake_data
    
  • Run the Rails server in development mode. You should be able to login to http://localhost:3000 with your new test user:

    lobsters$ rails server
    
  • Deploying the site in production requires setting up a web server and running the app in production mode. There are more tools and options available than we can describe; find a guide or an expert. The lobsters-ansible repo has our config files to crib from. Some app-specific notes:

  • Set up crontab or another scheduler to run regular jobs:

    */5 * * * *  cd /path/to/lobsters && env RAILS_ENV=production sh -c 'bundle exec ruby script/mail_new_activity; bundle exec ruby script/mastodon_sync.rb; bundle exec ruby script/traffic_range'
    
  • See config/initializers/production.rb.sample for GitHub/Mastodon integration help.

  • You probably want to use git-imerge to pull in changes from Lobsters to your site.

Administration

Basic moderation happens on-site, but most other administrative tasks require use of the rails console in production. Administrators can create and edit tags at /tags.