SkillAgentSearch skills...

Stacker.news

moderating forums with money

Install / Use

/learn @stackernews/Stacker.news
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<p align="center"> <a href="https://stacker.news"> <img height="50" alt="sn banner" src="https://github.com/stackernews/stacker.news/assets/34140557/a8ccc5dc-c453-46dc-be74-60dd0a42ce09"> </a> </p>
  • Stacker News moderates forums with money
  • What You See is What We Ship (look ma, I invented an initialism)
  • 100% FOSS
  • We pay bitcoin for PRs, issues, documentation, code reviews and more
  • Next.js, postgres, graphql, and lnd
<br>

Getting started

Launch a fully featured SN development environment in a single command.

$ ./sndev start

Go to localhost:3000.

<br>

Installation

  • Clone the repo
    • ssh: git clone git@github.com:stackernews/stacker.news.git
    • https: git clone https://github.com/stackernews/stacker.news.git
  • Install docker
    • If you're running MacOS or Windows, I highly recommend using OrbStack instead of Docker Desktop
  • Please make sure that at least 10 GB of free space is available, otherwise you may encounter issues while setting up the development environment.
<br>

GitHub Codespaces

Open in GitHub Codespaces

You can run Stacker News on Github Codespaces

Setup

  1. Open the repository on GitHub and click the "Code" button
  2. Select the Codespaces tab and create a new codespace.
    • You can also configure your codespace to run select services based on COMPOSE_PROFILES as well as in a different region and machine type by clicking "..." and selecting "New with options...". Check Modifying services for more information on COMPOSE_PROFILES
  3. Wait for the environment to set up (this may take several minutes the first time)
  4. Once ready, you'll see a terminal with the environment initialized

Usage

After the codespace is created, the development environment will be automatically set up and services started.

Access your running application at the URL shown in the forwarded ports panel (typically https://your-codespace-name-3000.app.github.dev).

Port Configuration

⚠️ Important: For various internal services and external access to work properly, you must set forwarded ports to Public in the Ports tab:

  1. In your codespace, look for the "PORTS" tab in the bottom panel
  2. Click the lock icon to change visibility from "Private" to "Public" <br>

Usage

Start the development environment

$ ./sndev start

View all available commands

$ ./sndev help

                            888
                            888
                            888
      .d8888b  88888b.  .d88888  .d88b.  888  888
     88K      888 '88b d88' 888 d8P  Y8b 888  888
     'Y8888b. 888  888 888  888 88888888 Y88  88P
          X88 888  888 Y88b 888 Y8b.      Y8bd8P
      88888P' 888  888  'Y88888  'Y8888    Y88P

manages a docker based stacker news development environment

USAGE
  $ sndev [COMMAND]
  $ sndev help [COMMAND]

COMMANDS
  help                    show help

  env:
    start                 start env
    stop                  stop env
    restart               restart env
    status                status of env
    logs                  logs from env
    delete                delete env

  sn:
    login                 login as a nym
    set_balance           set the balance of a nym

  lightning:
    fund                   pay a bolt11 for funding
    withdraw               create a bolt11 for withdrawal

  db:
    psql                   open psql on db
    prisma                 run prisma commands

  domains:
    domains                custom domains dev management

  dev:
    pr                     fetch and checkout a pr
    lint                   run linters
    test                   run tests

  other:
    cli                    service cli passthrough
    open                   open service GUI in browser
    onion                  service onion address
    cert                   service tls cert
    compose                docker compose passthrough

Modifying services

Running specific services

By default all services will be run. If you want to exclude specific services from running, set COMPOSE_PROFILES in a .env.local file to one or more of minimal,images,search,payments,wallets,email,capture. To only run mininal necessary without things like payments in .env.local:

COMPOSE_PROFILES=minimal

To run with images and payments services:

COMPOSE_PROFILES=images,payments

Merging compose files

By default sndev start will merge docker-compose.yml with docker-compose.override.yml. Specify any overrides you want to merge with docker-compose.override.yml.

For example, if you want to replace the db seed with a custom seed file located in docker/db/another.sql, you'd create a docker-compose.override.yml file with the following:

services:
  db:
    volumes:
      - ./docker/db/another.sql:/docker-entrypoint-initdb.d/seed.sql

You can read more about docker compose override files.

Enabling semantic search

Semantic search is now enabled automatically in dev when the search profile is active.

  • Ensure search is in COMPOSE_PROFILES:

    COMPOSE_PROFILES=...,search,...
    
  • Start your environment with ./sndev start.

  • On first boot, OpenSearch downloads and deploys the embedding model, then creates a neural-ready index. This can take a couple minutes.

No manual script run or container restart is required for the default setup.

If you need to manually repair or recreate semantic search resources, restart from a fresh dev volume with ./sndev delete and then run ./sndev start.

Local DNS via dnsmasq

To enable dnsmasq:

  • domains should be enabled in COMPOSE_PROFILES:

    COMPOSE_PROFILES=...,domains,...
    

To add/remove DNS records you can now use ./sndev domains dns. More on this here.

<br>

Table of Contents

<br>

Contributing

We want your help.

<br>

We pay bitcoin for contributions

  • pull requests closing existing issues
  • code review
  • issue specification whether for bugs, features, or enhancements
  • discovery of security vulnerabilities
  • discovery of privacy vulnerabilities
  • improvements to development documentation
  • helpfulness

View a current list of granted awards

<br>

Just in case

This document in no way legally entitles you to payments for contributions, entitles you to being a contributor, or entitles you to the attention of other contributors. This document lays out the system we can use to determine contribution awards which we generally intend to abide by but importantly we reserve the right to refuse payments or contributions, modify rules and award amounts, make exceptions to rules or reward amounts, and withhold awards for any reason at anytime, even just for the heck of it, at our sole discretion. If you need more certainty than what I've just described, don't participate. We provide awards as an experiment to make FOSS less sucky.

<br>

Pull request awards

Rules

  1. PRs closing an issue will be awarded according to the difficulty tag on an issue, e.g. difficulty:easy pays 100k sats.
  2. Issues are occasionally marked with a priority tag which multiplies the award of a PR closing an issue, e.g. an issue marked with priority:high and difficulty:hard awards 2m sats.
  3. An award is reduced by 10% of the award amount for each substantial change requested to the PR on code review, e.g. if two changes are requested on a PR closing an issue tagged with difficulty:hard, 800k sats will be awarded.
    • Reductions are applied before priority multipliers, e.g. a PR closing a priority:high and difficulty:hard issue that's approved after two changes are requested awards 1.6m sats.
    • You are responsible for understanding the issue and
View on GitHub
GitHub Stars521
CategoryData
Updated2d ago
Forks142

Languages

JavaScript

Security Score

100/100

Audited on Mar 26, 2026

No findings